Zhang Xiaoxu
7e8436728e
nfs4: Fix kmemleak when allocate slot failed
...
If one of the slot allocate failed, should cleanup all the other
allocated slots, otherwise, the allocated slots will leak:
unreferenced object 0xffff8881115aa100 (size 64):
comm ""mount.nfs"", pid 679, jiffies 4294744957 (age 115.037s)
hex dump (first 32 bytes):
00 cc 19 73 81 88 ff ff 00 a0 5a 11 81 88 ff ff ...s......Z.....
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<000000007a4c434a>] nfs4_find_or_create_slot+0x8e/0x130
[<000000005472a39c>] nfs4_realloc_slot_table+0x23f/0x270
[<00000000cd8ca0eb>] nfs40_init_client+0x4a/0x90
[<00000000128486db>] nfs4_init_client+0xce/0x270
[<000000008d2cacad>] nfs4_set_client+0x1a2/0x2b0
[<000000000e593b52>] nfs4_create_server+0x300/0x5f0
[<00000000e4425dd2>] nfs4_try_get_tree+0x65/0x110
[<00000000d3a6176f>] vfs_get_tree+0x41/0xf0
[<0000000016b5ad4c>] path_mount+0x9b3/0xdd0
[<00000000494cae71>] __x64_sys_mount+0x190/0x1d0
[<000000005d56bdec>] do_syscall_64+0x35/0x80
[<00000000687c9ae4>] entry_SYSCALL_64_after_hwframe+0x46/0xb0
Fixes: abf79bb341bf ("NFS: Add a slot table to struct nfs_client for NFSv4.0 transport blocking")
Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2022-10-27 15:52:11 -04:00
..
2022-08-10 14:04:32 -07:00
2022-07-10 19:00:53 -04:00
2022-10-06 09:52:09 -04:00
2022-06-06 11:53:55 -04:00
2022-09-26 14:02:42 -04:00
2022-02-28 10:26:40 -05:00
2022-01-06 14:00:20 -05:00
2022-10-27 15:52:10 -04:00
2022-10-27 15:52:10 -04:00
2021-06-13 19:36:27 -04:00
2022-10-27 15:52:10 -04:00
2022-08-10 14:04:32 -07:00
2022-10-27 15:52:10 -04:00
2022-10-27 15:52:10 -04:00
2022-01-08 14:42:01 -05:00
2022-10-13 09:58:42 -07:00
2022-10-27 15:52:10 -04:00
2022-05-17 15:39:45 -04:00
2022-05-09 23:12:33 -04:00
2021-11-05 14:54:40 -04:00
2022-10-13 09:58:42 -07:00
2022-10-27 15:52:10 -04:00
2021-04-05 09:04:20 -04:00
2022-04-07 16:19:47 -04:00
2022-01-10 11:53:25 +00:00
2022-10-27 15:52:10 -04:00
2022-10-27 15:52:10 -04:00
2022-03-02 08:43:39 -05:00
2021-08-18 22:08:24 +02:00
2021-08-18 22:08:24 +02:00
2022-10-27 15:52:10 -04:00
2022-09-07 21:53:50 +02:00
2022-03-02 08:43:39 -05:00
2022-10-27 15:52:10 -04:00
2022-10-27 15:52:11 -04:00
2022-08-19 20:31:57 -04:00
2022-10-03 11:26:36 -04:00
2022-10-27 15:52:10 -04:00
2022-10-27 15:52:10 -04:00
2021-05-07 00:26:34 -07:00
2021-11-07 09:23:14 -05:00
2021-11-07 09:23:14 -05:00
2022-10-27 15:52:10 -04:00
2021-01-10 13:32:39 -05:00
2020-01-15 10:54:33 -05:00
2022-10-05 15:47:16 -04:00
2022-05-31 17:09:24 -04:00
2020-07-13 17:52:45 -04:00
2022-10-27 15:52:10 -04:00
2022-10-03 11:26:36 -04:00
2022-10-05 15:29:23 -04:00
2022-10-03 11:26:36 -04:00
2021-04-14 09:36:29 -04:00
2022-08-09 14:11:34 -04:00
2022-05-31 17:09:30 -04:00
2020-12-16 17:25:24 -05:00
2022-10-27 15:52:10 -04:00
2022-10-13 09:58:42 -07:00
2022-10-06 09:52:09 -04:00
2022-02-25 18:50:13 -05:00
2022-06-29 08:51:07 -04:00
2022-10-27 15:52:10 -04:00
2022-05-09 16:36:48 -04:00
2022-02-28 10:09:23 -05:00
2020-10-15 13:31:08 -04:00
2022-05-31 17:09:30 -04:00
2022-09-12 17:53:46 -04:00