Paul Aurich
7a991df9e5
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: a93864d93977 ("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 13:05:24 +02:00
..
2019-05-30 11:26:35 -07:00
2018-08-07 14:15:41 -05:00
2019-12-21 11:04:43 +01:00
2019-09-16 11:43:38 -05:00
2020-03-25 08:25:43 +01:00
2019-09-16 11:43:38 -05:00
2019-09-21 06:02:26 -05:00
2019-07-10 18:43:43 -07:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2020-03-05 16:43:41 +01:00
2019-09-26 16:37:43 -05:00
2019-06-20 14:19:55 +08:00
2020-03-25 08:25:43 +01:00
2019-09-16 19:18:39 -05:00
2020-03-12 13:00:18 +01:00
2018-11-02 14:09:41 -05:00
2020-03-12 13:00:18 +01:00
2019-09-16 11:43:39 -05:00
2020-05-20 08:20:34 +02:00
2020-07-09 09:37:55 +02:00
2020-02-24 08:36:58 +01:00
2019-05-07 23:24:54 -05:00
2020-03-18 07:17:51 +01:00
2019-06-27 23:02:12 +01:00
2019-07-31 13:31:05 -06:00
2020-06-03 08:21:14 +02:00
2018-08-07 14:15:41 -05:00
2018-08-07 14:15:41 -05:00
2020-07-29 10:18:41 +02:00
2019-09-21 06:02:26 -05:00
2019-09-19 10:32:16 -07:00
2019-05-07 23:24:55 -05:00
2019-09-16 11:43:38 -05:00
2019-08-27 17:25:12 -05:00
2019-10-06 22:04:35 -05:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:45 +02:00
2018-12-23 22:41:31 -06:00
2019-09-23 22:51:57 -05:00
2020-03-12 13:00:18 +01:00
2020-01-17 19:48:27 +01:00
2018-10-23 21:16:04 -05:00
2020-03-12 13:00:18 +01:00
2019-09-16 11:43:38 -05:00
2020-08-21 13:05:24 +02:00
2020-06-30 15:36:51 -04:00
2020-08-21 13:05:19 +02:00
2019-11-06 21:32:18 -06:00
2019-12-21 11:04:45 +01:00
2019-05-07 23:24:54 -05:00
2020-02-01 09:34:37 +00:00
2019-12-21 11:04:43 +01:00
2019-05-30 11:26:37 -07:00
2019-08-22 14:57:34 +10:00
2019-09-24 23:31:32 -05:00
2019-01-24 09:37:33 -06:00
2019-09-16 11:43:39 -05:00
2020-07-22 09:32:52 +02:00
2019-05-30 11:26:35 -07:00
2019-09-23 23:28:59 -05:00