Files
linux-stable-mirror/fs
Paul AurichandGreg Kroah-Hartman 2ed98e89eb smb: client: Avoid race in open_cached_dir with lease breaks
commit 3ca02e63ed upstream.

A pre-existing valid cfid returned from find_or_create_cached_dir might
race with a lease break, meaning open_cached_dir doesn't consider it
valid, and thinks it's newly-constructed. This leaks a dentry reference
if the allocation occurs before the queued lease break work runs.

Avoid the race by extending holding the cfid_list_lock across
find_or_create_cached_dir and when the result is checked.

Cc: stable@vger.kernel.org
Reviewed-by: Henrique Carvalho <henrique.carvalho@suse.com>
Signed-off-by: Paul Aurich <paul@darkrain42.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-18 08:24:08 +02:00
..
2024-08-19 06:04:25 +02:00
2025-01-17 13:36:11 +01:00
2024-10-22 15:46:20 +02:00
2024-12-14 20:00:21 +01:00
2025-04-25 10:45:48 +02:00
2025-02-08 09:51:42 +01:00
2024-08-19 06:04:25 +02:00
2025-04-25 10:45:27 +02:00
2025-03-22 12:50:41 -07:00
2024-08-19 06:04:25 +02:00