Paul Aurich
d9710cc6bd
cifs: Fix leak when handling lease break for cached root fid
commit baf57b56d3604880ccb3956ec6c62ea894f5de99 upstream.
Handling a lease break for the cached root didn't free the
smb2_lease_break_work allocation, resulting in a leak:
unreferenced object 0xffff98383a5af480 (size 128):
comm "cifsd", pid 684, jiffies 4294936606 (age 534.868s)
hex dump (first 32 bytes):
c0 ff ff ff 1f 00 00 00 88 f4 5a 3a 38 98 ff ff ..........Z:8...
88 f4 5a 3a 38 98 ff ff 80 88 d6 8a ff ff ff ff ..Z:8...........
backtrace:
[<0000000068957336>] smb2_is_valid_oplock_break+0x1fa/0x8c0
[<0000000073b70b9e>] cifs_demultiplex_thread+0x73d/0xcc0
[<00000000905fa372>] kthread+0x11c/0x150
[<0000000079378e4e>] ret_from_fork+0x22/0x30
Avoid this leak by only allocating when necessary.
Fixes: a93864d939 ("cifs: add lease tracking to the cached root fid")
Signed-off-by: Paul Aurich <paul@darkrain42.org>
CC: Stable <stable@vger.kernel.org> # v4.18+
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-21 11:05:31 +02:00
..
2019-12-21 10:57:33 +01:00
2019-04-05 22:32:59 +02:00
2019-09-16 08:22:17 +02:00
2020-03-05 16:42:15 +01:00
2019-10-05 13:10:08 +02:00
2019-11-10 11:27:34 +01:00
2019-11-10 11:27:34 +01:00
2020-05-20 08:18:49 +02:00
2020-07-09 09:37:12 +02:00
2020-03-18 07:14:21 +01:00
2020-06-03 08:19:30 +02:00
2020-07-29 10:16:55 +02:00
2019-09-16 08:22:17 +02:00
2019-11-06 13:05:51 +01:00
2019-10-29 09:20:01 +01:00
2020-01-17 19:47:01 +01:00
2019-06-25 11:36:01 +08:00
2020-08-21 11:05:31 +02:00
2020-06-30 23:17:09 -04:00
2020-08-21 11:05:28 +02:00
2019-11-12 19:20:42 +01:00
2019-12-21 10:57:35 +01:00
2019-12-21 10:57:32 +01:00
2019-09-16 08:22:13 +02:00
2020-04-23 10:30:19 +02:00
2019-10-05 13:10:12 +02:00