linux/fs/nfs
fanchaoting 5a12cca697 umount oops when remove blocklayoutdriver first
now pnfs client uses block layout, maybe we can remove
blocklayoutdriver first. if we umount later,
it can cause oops in unset_pnfs_layoutdriver.
because nfss->pnfs_curr_ld->clear_layoutdriver is invalid.

reproduce it:
 modprobe  blocklayoutdriver
 mount -t nfs4 -o minorversion=1 pnfsip:/ /mnt/
 rmmod blocklayoutdriver
 umount /mnt

then you can see following

CPU 0
Pid: 17023, comm: umount.nfs4 Tainted: GF          O 3.7.0-rc6-pnfs #1 VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform
RIP: 0010:[<ffffffffa04cfe6d>]  [<ffffffffa04cfe6d>] unset_pnfs_layoutdriver+0x1d/0x70 [nfsv4]
RSP: 0018:ffff8800022d9e48  EFLAGS: 00010286
RAX: ffffffffa04a1b00 RBX: ffff88000b013800 RCX: 0000000000000001
RDX: ffffffff81ae8ee0 RSI: ffff880001ee94b8 RDI: ffff88000b013800
RBP: ffff8800022d9e58 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff880001ee9400
R13: ffff8800105978c0 R14: 00007fff25846c08 R15: 0000000001bba550
FS:  00007f45ae7f0700(0000) GS:ffff880012c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: ffffffffa04a1b38 CR3: 0000000002c0c000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process umount.nfs4 (pid: 17023, threadinfo ffff8800022d8000, task ffff880006e48aa0)
Stack:
ffff8800105978c0 ffff88000b013800 ffff8800022d9e78 ffffffffa04cd0ce
ffff8800022d9e78 ffff88000b013800 ffff8800022d9ea8 ffffffffa04755a7
ffff8800022d9ea8 ffff880002f96400 ffff88000b013800 ffff880002f96400
Call Trace:
[<ffffffffa04cd0ce>] nfs4_destroy_server+0x1e/0x30 [nfsv4]
[<ffffffffa04755a7>] nfs_free_server+0xb7/0x150 [nfs]
[<ffffffffa047d4d5>] nfs_kill_super+0x35/0x40 [nfs]
[<ffffffff81178d35>] deactivate_locked_super+0x45/0x70
[<ffffffff8117986a>] deactivate_super+0x4a/0x70
[<ffffffff81193ee2>] mntput_no_expire+0xd2/0x130
[<ffffffff81194d62>] sys_umount+0x72/0xe0
[<ffffffff8154af59>] system_call_fastpath+0x16/0x1b
Code: 06 e1 b8 ea ff ff ff eb 9e 0f 1f 44 00 00 55 48 89 e5 53 48 83 ec 08 66 66 66 66 90 48 8b 87 80 03 00 00 48 89 fb 48 85 c0 74 29 <48> 8b 40 38 48 85 c0 74 02 ff d0 48 8b 03 3e ff 48 04 0f 94 c2
RIP  [<ffffffffa04cfe6d>] unset_pnfs_layoutdriver+0x1d/0x70 [nfsv4]
RSP <ffff8800022d9e48>
CR2: ffffffffa04a1b38
---[ end trace 29f75aaedda058bf ]---

Signed-off-by: fanchaoting<fanchaoting@cn.fujitsu.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org
2013-02-17 15:40:15 -05:00
..
blocklayout umount oops when remove blocklayoutdriver first 2013-02-17 15:40:15 -05:00
objlayout umount oops when remove blocklayoutdriver first 2013-02-17 15:40:15 -05:00
Kconfig
Makefile NFSv4.1: Cleanup move session slot management to fs/nfs/nfs4session.c 2012-12-06 00:30:45 +01:00
cache_lib.c
cache_lib.h
callback.c
callback.h NFSv4.1: Clean up session draining 2012-12-06 00:30:44 +01:00
callback_proc.c NFSv4.1: Fix bulk recall and destroy of layouts 2013-02-14 13:22:50 -05:00
callback_xdr.c NFSv4.1: Move slot table and session struct definitions to nfs4session.h 2012-12-06 00:30:46 +01:00
client.c NFS: avoid NULL dereference in nfs_destroy_server 2012-12-12 23:55:56 -05:00
delegation.c NFSv4: Ensure delegation recall and byte range lock removal don't conflict 2013-02-11 15:33:13 -05:00
delegation.h NFSv4.1: Don't lose locks when a server reboots during delegation return 2013-02-11 15:33:12 -05:00
dir.c NFS: Fix access to suid/sgid executables 2013-01-03 17:06:27 -05:00
direct.c nfs: fix page dirtying in NFS DIO read codepath 2012-12-12 12:56:19 -05:00
dns_resolve.c
dns_resolve.h
file.c lseek: the "whence" argument is called "whence" 2012-12-17 17:15:12 -08:00
fscache-index.c
fscache.c NFS4: Open files for fscaching 2012-12-20 22:19:42 +00:00
fscache.h NFS: Provide stub nfs_fscache_wait_on_invalidate() for when CONFIG_NFS_FSCACHE=n 2012-12-21 08:06:48 -08:00
getroot.c nfs: remove kfree() redundant null checks 2013-02-17 15:27:21 -05:00
idmap.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2012-12-16 15:40:50 -08:00
inode.c Revert "NFS: add nfs_sb_deactive_async to avoid deadlock" 2013-02-01 10:13:48 -05:00
internal.h Revert "NFS: add nfs_sb_deactive_async to avoid deadlock" 2013-02-01 10:13:48 -05:00
iostat.h
mount_clnt.c
namespace.c NFS: Don't silently fail setattr() requests on mountpoints 2013-01-30 17:41:04 -05:00
netns.h
nfs.h
nfs2super.c
nfs2xdr.c
nfs3acl.c
nfs3client.c
nfs3proc.c SUNRPC handle EKEYEXPIRED in call_refreshresult 2012-12-12 15:36:02 -05:00
nfs3super.c
nfs3xdr.c
nfs4_fs.h NFSv4: Ensure delegation recall and byte range lock removal don't conflict 2013-02-11 15:33:13 -05:00
nfs4client.c NFSv4.1: Ensure that nfs41_walk_client_list() does start lease recovery 2013-01-27 15:51:41 -05:00
nfs4file.c NFS4: Open files for fscaching 2012-12-20 22:19:42 +00:00
nfs4filelayout.c SUNRPC handle EKEYEXPIRED in call_refreshresult 2012-12-12 15:36:02 -05:00
nfs4filelayout.h
nfs4filelayoutdev.c NFSv4.1: Cleanup move session slot management to fs/nfs/nfs4session.c 2012-12-06 00:30:45 +01:00
nfs4getroot.c
nfs4namespace.c
nfs4proc.c NFSv4.1: Don't decode skipped layoutgets 2013-02-17 15:24:16 -05:00
nfs4renewd.c
nfs4session.c NFSv4.1: Deal effectively with interrupted RPC calls. 2012-12-15 15:39:59 -05:00
nfs4session.h NFSv4.1: Deal effectively with interrupted RPC calls. 2012-12-15 15:39:59 -05:00
nfs4state.c NFSv4: Ensure delegation recall and byte range lock removal don't conflict 2013-02-11 15:33:13 -05:00
nfs4super.c NFS: Ensure that we always drop inodes that have been marked as stale 2012-12-14 14:36:36 -05:00
nfs4sysctl.c
nfs4xdr.c Merge branch 'bugfixes' into nfs-for-next 2012-12-11 09:16:26 -05:00
nfsroot.c
pagelist.c
pnfs.c NFSv4.1: Fix bulk recall and destroy of layouts 2013-02-14 13:22:50 -05:00
pnfs.h NFSv4.1: Fix bulk recall and destroy of layouts 2013-02-14 13:22:50 -05:00
pnfs_dev.c
proc.c SUNRPC handle EKEYEXPIRED in call_refreshresult 2012-12-12 15:36:02 -05:00
read.c NFS: Ensure that we free the rpc_task after read and write cleanups are done 2013-01-04 12:59:10 -05:00
super.c Revert "NFS: add nfs_sb_deactive_async to avoid deadlock" 2013-02-01 10:13:48 -05:00
symlink.c
sysctl.c
unlink.c nfs: remove kfree() redundant null checks 2013-02-17 15:27:21 -05:00
write.c NFS: Ensure that we free the rpc_task after read and write cleanups are done 2013-01-04 12:59:10 -05:00