summaryrefslogtreecommitdiff
path: root/scripts/stackusage
diff options
context:
space:
mode:
authorNamjae Jeon <linkinjeon@kernel.org>2026-08-14 11:18:38 +0900
committerNamjae Jeon <linkinjeon@kernel.org>2026-08-17 22:38:22 +0900
commit215e8816b1ac25176d911abb8704390413ccee4b (patch)
tree7dfe5a1739aaa50427e6bd8fa5a06a5af5fb015c /scripts/stackusage
parent5b90f78dc22a3ee2f9dabbb41100f029bb799727 (diff)
downloadlinux-215e8816b1ac25176d911abb8704390413ccee4b.tar.gz
linux-215e8816b1ac25176d911abb8704390413ccee4b.zip
ksmbd: detach blocked lock requests before freeing
A file_lock retained by ksmbd for byte-range lock bookkeeping can still be part of the VFS blocked-request graph. In particular, the VFS can chain a new waiter below an already blocked request through flc_blocked_requests. The ksmbd_file reference count does not cover that graph. Both __ksmbd_close_fd() and the cross-request unlock path free these retained file_lock objects directly. If a dependent waiter is still attached, locks_release_private() hits BUG_ON(!list_empty(&flc->flc_blocked_requests)). The same lifetime mismatch can leave a freed ksmbd_lock reachable through its request-local llist. Detach the file_lock from the blocked-request graph before freeing it in the close, cross-request unlock, and rollback paths. locks_delete_block() also wakes requests chained below the object. Remove llist when a completed lock is published so a globally visible ksmbd_lock no longer points into the submitting worker's stack. Fixes: d63528eb0d43 ("ksmbd: free ksmbd_lock when file is closed") Reported-by: Kyenghwan Hwang <obnred@gmail.com> Tested-by: Kyenghwan Hwang <obnred@gmail.com> Tested-by: ChenXiaoSong <chenxiaosong@kylinos.cn> Reviewed-by: ChenXiaoSong <chenxiaosong@kylinos.cn> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions