diff options
| author | Chuck Lever <chuck.lever@oracle.com> | 2026-05-14 23:56:04 +0300 |
|---|---|---|
| committer | Chuck Lever <cel@kernel.org> | 2026-06-09 23:32:59 +0300 |
| commit | f16a1513452edb532fec81e591c64c320866719c (patch) | |
| tree | 3c19eeade5d3893d9da48ebe5145c722ad8eeb5a /include/linux/timerqueue.h | |
| parent | 516403d4d85607fdef3ca41d4a56b54e5566fa9a (diff) | |
| download | linux-f16a1513452edb532fec81e591c64c320866719c.tar.xz | |
lockd: Plug nlm_file leak when nlm_do_fopen() fails
A client can repeatedly drive nlm_do_fopen() failures by presenting
file handles that the underlying export rejects. After kzalloc_obj()
succeeds in nlm_lookup_file(), the freshly allocated nlm_file is not
yet inserted into nlm_files[]. The nlm_do_fopen() failure path jumps
to out_unlock, which releases nlm_file_mutex and returns without
freeing the allocation, so each failure leaks one nlm_file.
Route the failure through out_free so kfree() runs before the
function returns.
Fixes: 7f024fcd5c97 ("Keep read and write fds with each nlm_file")
Cc: stable@vger.kernel.org
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
