linux/fs/nfs
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: 14d1bbb0ca ("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
..
blocklayout lib/vsprintf.c: remove %Z support 2017-02-27 18:43:47 -08:00
filelayout nfs/filelayout: fix NULL pointer dereference in fl_pnfs_update_layout() 2017-04-28 13:06:59 -04:00
flexfilelayout pNFS/flexfiles: missing error code in ff_layout_alloc_lseg() 2017-05-24 07:52:54 -04:00
cache_lib.c sunrpc/nfs: cleanup procfs/pipefs entry in cache_detail 2017-02-08 17:02:45 -05:00
cache_lib.h
callback_proc.c NFSv4: Fix an rcu lock leak 2017-05-08 09:27:59 -04:00
callback_xdr.c NFS: Remove extra dprintk()s from callback_xdr.c 2017-04-20 13:39:33 -04:00
callback.c NFSv4: Fix callback server shutdown 2017-04-27 18:00:16 -04:00
callback.h nfs: add handling for CB_NOTIFY_LOCK in client 2016-09-22 13:56:04 -04:00
client.c NFS client updates for Linux 4.12 2017-05-10 13:03:38 -07:00
delegation.c NFSv4: Optimise away forced revalidation when we know the attributes are OK 2016-12-01 17:21:37 -05:00
delegation.h NFSv4: nfs_inode_find_state_and_recover() should check all stateids 2016-09-27 14:34:35 -04:00
dir.c nfs: use kmap/kunmap directly 2017-05-05 13:01:33 -04:00
direct.c NFS client updates for Linux 4.12 2017-05-10 13:03:38 -07:00
dns_resolve.c
dns_resolve.h
file.c NFSv4: Don't special case "launder" 2017-04-26 13:03:04 -04:00
fscache-index.c NFS: Fabricate fscache server index key correctly 2014-09-25 21:25:18 -04:00
fscache.c nfs: define nfs_inc_fscache_stats and using it as possible 2014-11-24 20:08:47 -05:00
fscache.h
getroot.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
inode.c NFS: always treat the invocation of nfs_getattr as cache hit when noac is on 2017-05-05 13:01:32 -04:00
internal.h NFS append COMMIT after synchronous COPY 2017-05-08 19:01:06 -04:00
io.c NFS: Do not serialise O_DIRECT reads and writes 2016-07-05 19:11:04 -04:00
iostat.h nfs: define nfs_inc_fscache_stats and using it as possible 2014-11-24 20:08:47 -05:00
Kconfig nfs: remove the objlayout driver 2017-04-20 15:51:23 -04:00
Makefile nfs: remove the objlayout driver 2017-04-20 15:51:23 -04:00
mount_clnt.c NFS: Remove unneeded NFS_DEBUG checking before define NFSDBG_FACILITY 2015-10-21 15:49:23 -05:00
namespace.c NFS: Remove extra dprintk()s from namespace.c 2017-04-20 13:39:34 -04:00
netns.h netns: make struct pernet_operations::id unsigned int 2016-11-18 10:59:15 -05:00
nfs.h
nfs2super.c
nfs2xdr.c nfs: save server READ/WRITE/COMMIT status 2015-02-03 11:06:40 -08:00
nfs3_fs.h nfsv3: introduce nfs3_set_ds_client 2015-02-03 11:06:34 -08:00
nfs3acl.c posix_acl: Inode acl caching fixes 2016-03-31 00:30:15 -04:00
nfs3client.c NFS: Remove unused authflavour parameter from nfs_get_client() 2016-12-01 17:46:32 -05:00
nfs3proc.c NFSv3: nfs3_nlm_alloc_call should be declared static 2017-04-25 16:25:06 -04:00
nfs3super.c nfsv3: introduce nfs3_set_ds_client 2015-02-03 11:06:34 -08:00
nfs3xdr.c xprtrdma: Fix large NFS SYMLINK calls 2015-08-05 16:21:28 -04:00
nfs4_fs.h NFS: Use nfs4_setup_sequence() everywhere 2017-01-30 13:14:50 -05:00
nfs4client.c NFSv4.0: Fix a lock leak in nfs40_walk_client_list 2017-05-24 08:05:16 -04:00
nfs4file.c NFSv4: add flock_owner to open context 2016-12-01 17:57:27 -05:00
nfs4getroot.c NFS: Clean up nfs4_get_rootfh() 2017-04-20 13:39:35 -04:00
nfs4idmap.c KEYS: Differentiate uses of rcu_dereference_key() and user_key_payload() 2017-03-02 10:09:00 +11:00
nfs4idmap.h NFS: Move nfs_idmap.h into fs/nfs/ 2015-04-23 15:16:14 -04:00
nfs4namespace.c NFS: Remove extra dprintk()s from nfs4namespace.c 2017-04-20 13:39:35 -04:00
nfs4proc.c NFSv4.1: Work around a Linux server bug... 2017-05-09 15:52:15 -04:00
nfs4renewd.c NFSv4: Set the connection timeout to match the lease period 2017-02-09 14:15:16 -05:00
nfs4session.c NFSv4.1: Fix regression in callback retry handling 2016-12-01 17:21:38 -05:00
nfs4session.h NFS: Make trace_nfs4_setup_sequence() available to NFS v4.0 2017-01-30 13:14:50 -05:00
nfs4state.c NFSv4.1: RECLAIM_COMPLETE must handle NFS4ERR_CONN_NOT_BOUND_TO_SESSION 2017-05-05 12:01:50 -04:00
nfs4super.c NFS: Move nfs_idmap.h into fs/nfs/ 2015-04-23 15:16:14 -04:00
nfs4sysctl.c nfs: do not initialise statics to 0 2015-12-28 09:57:15 -05:00
nfs4trace.c pNFS: Modify pnfs_update_layout tracepoints to use layout stateid 2015-12-28 09:57:14 -05:00
nfs4trace.h NFS: Make trace_nfs4_setup_sequence() available to NFS v4.0 2017-01-30 13:14:50 -05:00
nfs4xdr.c NFSv4: Fix exclusive create attributes encoding 2017-05-08 09:40:59 -04:00
nfs42.h NFS: Add COPY nfs operation 2016-05-17 15:47:55 -04:00
nfs42proc.c NFS fix COMMIT after COPY 2017-05-24 07:52:48 -04:00
nfs42xdr.c NFS append COMMIT after synchronous COPY 2017-05-08 19:01:06 -04:00
nfsroot.c nfsroot: make nfsroot to accept the 1024 bytes long directory name 2015-10-21 15:49:19 -05:00
nfstrace.c NFSv4: Allow tracing of NFSv4 fsync calls 2015-03-27 12:39:34 -04:00
nfstrace.h NFS client updates for Linux 4.8 2016-07-30 16:33:25 -07:00
pagelist.c NFS: Add an iocounter wait function for async RPC tasks 2017-04-21 10:45:01 -04:00
pnfs_dev.c NFSv4.1: Don't cache deviceids that have no notifications 2015-03-27 12:32:24 -04:00
pnfs_nfs.c pNFS: Fix NULL dereference in pnfs_generic_alloc_ds_commits 2017-05-03 12:29:41 -04:00
pnfs.c pnfs: Fix the check for requests in range of layout segment 2017-05-24 07:55:02 -04:00
pnfs.h pnfs: Fix the check for requests in range of layout segment 2017-05-24 07:55:02 -04:00
proc.c lockd: Introduce nlmclnt_operations 2017-04-21 10:45:01 -04:00
read.c NFS: move rw_mode to nfs_pageio_header 2017-04-20 14:00:41 -04:00
super.c nfs: Fix bdi handling for cloned superblocks 2017-05-04 07:57:46 -06:00
symlink.c vfs: remove ".readlink = generic_readlink" assignments 2016-12-09 16:45:04 +01:00
sysctl.c
unlink.c qstr: constify instances in nfs 2016-07-20 23:30:06 -04:00
write.c NFS client updates for Linux 4.12 2017-05-10 13:03:38 -07:00