Trond Myklebust b49c15f97c NFSv4.0: Fix a lock leak in nfs40_walk_client_list
Xiaolong Ye's kernel test robot detected the following Oops:
[  299.158991] BUG: scheduling while atomic: mount.nfs/9387/0x00000002
[  299.169587] 2 locks held by mount.nfs/9387:
[  299.176165]  #0:  (nfs_clid_init_mutex){......}, at: [<ffffffff8130cc92>] nfs4_discover_server_trunking+0x47/0x1fc
[  299.201802]  #1:  (&(&nn->nfs_client_lock)->rlock){......}, at: [<ffffffff813125fa>] nfs40_walk_client_list+0x2e9/0x338
[  299.221979] CPU: 0 PID: 9387 Comm: mount.nfs Not tainted 4.11.0-rc7-00021-g14d1bbb #45
[  299.235584] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-20161025_171302-gandalf 04/01/2014
[  299.251176] Call Trace:
[  299.255192]  dump_stack+0x61/0x7e
[  299.260416]  __schedule_bug+0x65/0x74
[  299.266208]  __schedule+0x5d/0x87c
[  299.271883]  schedule+0x89/0x9a
[  299.276937]  schedule_timeout+0x232/0x289
[  299.283223]  ? detach_if_pending+0x10b/0x10b
[  299.289935]  schedule_timeout_uninterruptible+0x2a/0x2c
[  299.298266]  ? put_rpccred+0x3e/0x115
[  299.304327]  ? schedule_timeout_uninterruptible+0x2a/0x2c
[  299.312851]  msleep+0x1e/0x22
[  299.317612]  nfs4_discover_server_trunking+0x102/0x1fc
[  299.325644]  nfs4_init_client+0x13f/0x194

It looks as if we recently added a spin_lock() leak to
nfs40_walk_client_list() when cleaning up the code.

Reported-by: kernel test robot <xiaolong.ye@intel.com>
Fixes: 14d1bbb0ca42 ("NFS: Create a common nfs4_match_client() function")
Cc: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
2017-05-24 08:05:16 -04:00
..
2017-05-08 09:27:59 -04:00
2017-04-27 18:00:16 -04:00
2017-05-10 13:03:38 -07:00
2017-05-05 13:01:33 -04:00
2017-05-10 13:03:38 -07:00
2017-04-26 13:03:04 -04:00
2017-04-20 15:51:23 -04:00
2017-04-20 15:51:23 -04:00
2012-07-30 19:06:41 -04:00
2015-02-03 11:06:34 -08:00
2016-03-31 00:30:15 -04:00
2017-04-20 13:39:35 -04:00
2015-04-23 15:16:14 -04:00
2015-04-23 15:16:14 -04:00
2016-05-17 15:47:55 -04:00
2017-05-24 07:52:48 -04:00
2012-07-30 19:06:52 -04:00
2016-07-30 16:33:25 -07:00
2017-04-21 10:45:01 -04:00
2017-04-20 14:00:41 -04:00
2016-07-20 23:30:06 -04:00
2017-05-10 13:03:38 -07:00