]> git.baikalelectronics.ru Git - kernel.git/commit
SMB3: Add missing locks to protect deferred close file list
authorBharath SM <bharathsm@microsoft.com>
Thu, 20 Apr 2023 13:54:33 +0000 (13:54 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 May 2023 14:03:36 +0000 (23:03 +0900)
commit33ce3a50bc83bee19c53922cd810d4a64362dbd0
tree031cdb846d73e0f3b704ce57b5ecc2c6d0e07453
parent39d302501ee9e7b7902e0cbdacb5b5a163ae762f
SMB3: Add missing locks to protect deferred close file list

[ Upstream commit ab9ddc87a9055c4bebd6524d5d761d605d52e557 ]

cifs_del_deferred_close function has a critical section which modifies
the deferred close file list. We must acquire deferred_lock before
calling cifs_del_deferred_close function.

Fixes: a03ab0b094c6 ("cifs: Fix memory leak on the deferred close")
Signed-off-by: Bharath SM <bharathsm@microsoft.com>
Acked-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Acked-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/cifs/misc.c