linux/fs/nfs
Trond Myklebust 905f8d16e3 NFSv4: Don't call put_rpccred() from an rcu callback
Doing so would require us to introduce bh-safe locks into put_rpccred().
This patch fixes the lockdep complaint reported by Marc Dietrich:

inconsistent {softirq-on-W} -> {in-softirq-W} usage.
swapper/0 [HC0[0]:SC1[1]:HE1:SE0] takes:
 (rpc_credcache_lock){-+..}, at: [<c01dc487>]
_atomic_dec_and_lock+0x17/0x60
{softirq-on-W} state was registered at:
  [<c013e870>] __lock_acquire+0x650/0x1030
  [<c013f2b1>] lock_acquire+0x61/0x80
  [<c02db9ac>] _spin_lock+0x2c/0x40
  [<c01dc487>] _atomic_dec_and_lock+0x17/0x60
  [<dced55fd>] put_rpccred+0x5d/0x100 [sunrpc]
  [<dced56c1>] rpcauth_unbindcred+0x21/0x60 [sunrpc]
  [<dced3fd4>] a0 [sunrpc]
  [<dcecefe0>] rpc_call_sync+0x30/0x40 [sunrpc]
  [<dcedc73b>] rpcb_register+0xdb/0x180 [sunrpc]
  [<dced65b3>] svc_register+0x93/0x160 [sunrpc]
  [<dced6ebe>] __svc_create+0x1ee/0x220 [sunrpc]
  [<dced7053>] svc_create+0x13/0x20 [sunrpc]
  [<dcf6d722>] nfs_callback_up+0x82/0x120 [nfs]
  [<dcf48f36>] nfs_get_client+0x176/0x390 [nfs]
  [<dcf49181>] nfs4_set_client+0x31/0x190 [nfs]
  [<dcf49983>] nfs4_create_server+0x63/0x3b0 [nfs]
  [<dcf52426>] nfs4_get_sb+0x346/0x5b0 [nfs]
  [<c017b444>] vfs_kern_mount+0x94/0x110
  [<c0190a62>] do_mount+0x1f2/0x7d0
  [<c01910a6>] sys_mount+0x66/0xa0
  [<c0104046>] syscall_call+0x7/0xb
  [<ffffffff>] 0xffffffff
irq event stamp: 5277830
hardirqs last  enabled at (5277830): [<c017530a>] kmem_cache_free+0x8a/0xc0
hardirqs last disabled at (5277829): [<c01752d2>] kmem_cache_free+0x52/0xc0
softirqs last  enabled at (5277798): [<c0124173>] __do_softirq+0xa3/0xc0
softirqs last disabled at (5277817): [<c01241d7>] do_softirq+0x47/0x50

other info that might help us debug this:
no locks held by swapper/0.

stack backtrace:
 [<c0104fda>] show_trace_log_lvl+0x1a/0x30
 [<c0105c02>] show_trace+0x12/0x20
 [<c0105d15>] dump_stack+0x15/0x20
 [<c013ccc3>] print_usage_bug+0x153/0x160
 [<c013d8b9>] mark_lock+0x449/0x620
 [<c013e824>] __lock_acquire+0x604/0x1030
 [<c013f2b1>] lock_acquire+0x61/0x80
 [<c02db9ac>] _spin_lock+0x2c/0x40
 [<c01dc487>] _atomic_dec_and_lock+0x17/0x60
 [<dced55fd>] put_rpccred+0x5d/0x100 [sunrpc]
 [<dcf6bf83>] nfs_free_delegation_callback+0x13/0x20 [nfs]
 [<c012f9ea>] __rcu_process_callbacks+0x6a/0x1c0
 [<c012fb52>] rcu_process_callbacks+0x12/0x30
 [<c0124218>] tasklet_action+0x38/0x80
 [<c0124125>] __do_softirq+0x55/0xc0
 [<c01241d7>] do_softirq+0x47/0x50
 [<c0124605>] irq_exit+0x35/0x40
 [<c0112463>] smp_apic_timer_interrupt+0x43/0x80
 [<c0104a77>] apic_timer_interrupt+0x33/0x38
 [<c02690df>] cpuidle_idle_call+0x6f/0x90
 [<c01023c3>] cpu_idle+0x43/0x70
 [<c02d8c27>] rest_init+0x47/0x50
 [<c03bcb6a>] start_kernel+0x22a/0x2b0
 [<00000000>] 0x0
 =======================

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2007-08-07 15:15:57 -04:00
..
callback_proc.c [PATCH] fs/nfs/callback* passes error values big-endian 2006-10-20 10:26:40 -07:00
callback_xdr.c NFSv4: debug print ntohl(status) in nfs client callback xdr code 2007-07-19 15:21:40 -04:00
callback.c Freezer: make kernel threads nonfreezable by default 2007-07-17 10:23:02 -07:00
callback.h NFS: Fix more sparse warnings 2007-05-14 19:33:46 -04:00
client.c Make NFS client use seq_list_xxx helpers 2007-07-16 09:05:42 -07:00
delegation.c NFSv4: Don't call put_rpccred() from an rcu callback 2007-08-07 15:15:57 -04:00
delegation.h NFSv4: Use RCU to protect delegations 2007-07-10 23:40:41 -04:00
dir.c SUNRPC: Clean up the sillyrename code 2007-07-19 15:21:39 -04:00
direct.c mm: Remove slab destructors from kmem_cache_create(). 2007-07-20 10:11:58 +09:00
file.c locks: make posix_test_lock() interface more consistent 2007-07-18 19:17:19 -04:00
getroot.c NFS: Kill the obsolete NFS_PARANOIA 2007-05-09 17:58:01 -04:00
idmap.c NFS: use __set_current_state() 2007-05-09 17:58:01 -04:00
inode.c NFS: Fix put_nfs_open_context 2007-08-07 15:13:17 -04:00
internal.h NFS: Clean-up: use correct type when converting NFS blocks to local blocks 2007-07-10 23:40:44 -04:00
iostat.h NFSv4: Fix an oops in nfs4_fill_super 2006-03-20 13:44:48 -05:00
Makefile NFS: Remake nfsroot_mount as a permanent part of NFS client 2007-07-10 23:40:46 -04:00
mount_clnt.c NFS: Improve debugging output in NFS in-kernel mount client 2007-07-10 23:40:47 -04:00
namespace.c [PATCH] mark struct inode_operations const 2 2007-02-12 09:48:46 -08:00
nfs2xdr.c NFS: Introduce struct nfs_removeargs+nfs_removeres 2007-07-19 15:21:39 -04:00
nfs3acl.c NFSv3: Client-side nfsacl caching fix 2006-06-09 09:34:11 -04:00
nfs3proc.c SUNRPC: Clean up the sillyrename code 2007-07-19 15:21:39 -04:00
nfs3xdr.c NFS: Introduce struct nfs_removeargs+nfs_removeres 2007-07-19 15:21:39 -04:00
nfs4_fs.h NFSv4: 'constify' lookup arguments. 2007-07-19 15:09:03 -04:00
nfs4namespace.c NFSv4: /proc/mounts displays the wrong server name for referrals 2007-02-03 15:35:10 -08:00
nfs4proc.c NFS: Fix NFSv4 open stateid regressions 2007-08-07 15:13:19 -04:00
nfs4renewd.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
nfs4state.c NFSv4: Fix a locking regression in nfs4_set_mode_locked() 2007-08-07 15:13:18 -04:00
nfs4xdr.c NFS: Introduce struct nfs_removeargs+nfs_removeres 2007-07-19 15:21:39 -04:00
nfsroot.c NFS: Remake nfsroot_mount as a permanent part of NFS client 2007-07-10 23:40:46 -04:00
pagelist.c mm: Remove slab destructors from kmem_cache_create(). 2007-07-20 10:11:58 +09:00
proc.c SUNRPC: Clean up the sillyrename code 2007-07-19 15:21:39 -04:00
read.c mm: Remove slab destructors from kmem_cache_create(). 2007-07-20 10:11:58 +09:00
super.c fix broken handling of port=... in NFS option parsing 2007-07-22 11:15:18 -07:00
symlink.c header cleaning: don't include smp_lock.h when not used 2007-05-08 11:15:07 -07:00
sysctl.c [PATCH] nfs: fix congestion control 2007-03-16 19:25:05 -07:00
unlink.c SUNRPC: Clean up the sillyrename code 2007-07-19 15:21:39 -04:00
write.c mm: Remove slab destructors from kmem_cache_create(). 2007-07-20 10:11:58 +09:00