android_kernel_samsung_msm8976/fs/nfsd
Boaz Harrosh c18c821fd4 nfsd41: Fix a crash when a callback is retried
If a callback is retried at nfsd4_cb_recall_done() due to
some error, the returned rpc reply crashes here:

@@ -514,6 +514,7 @@ decode_cb_sequence(struct xdr_stream *xdr, struct nfsd4_cb_sequence *res,
 	u32 dummy;
 	__be32 *p;

 +	BUG_ON(!res);
 	if (res->cbs_minorversion == 0)
 		return 0;

[BUG_ON added for demonstration]

This is because the nfsd4_cb_done_sequence() has NULLed out
the task->tk_msg.rpc_resp pointer.

Also eventually the rpc would use the new slot without making
sure it is free by calling nfsd41_cb_setup_sequence().

This problem was introduced by a 4.1 protocol addition patch:
	[0421b5c5] nfsd41: Backchannel: Implement cb_recall over NFSv4.1

Which was overlooking the possibility of an RPC callback retries.
For not-4.1 case redoing the _prepare is harmless.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2010-08-06 17:05:39 -04:00
..
auth.c nfsd: remove pointless paths in file headers 2009-12-15 15:01:47 -05:00
auth.h nfsd: minor fs/nfsd/auth.h cleanup 2008-02-01 16:42:05 -05:00
cache.h nfsd: remove pointless paths in file headers 2009-12-15 15:01:47 -05:00
export.c Merge commit 'v2.6.34-rc6' 2010-05-04 11:29:05 -04:00
Kconfig nfsd : Define NFSD only when FILE_LOCKING is enabled 2009-03-18 17:30:48 -04:00
lockd.c nfsd: remove pointless paths in file headers 2009-12-15 15:01:47 -05:00
Makefile knfsd: trivial makefile cleanup 2007-05-09 12:30:54 -07:00
nfs2acl.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
nfs3acl.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
nfs3proc.c nfsd: minor nfsd read api cleanup 2010-07-30 12:54:54 -04:00
nfs3xdr.c nfsd: remove pointless paths in file headers 2009-12-15 15:01:47 -05:00
nfs4acl.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
nfs4callback.c nfsd41: Fix a crash when a callback is retried 2010-08-06 17:05:39 -04:00
nfs4idmap.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
nfs4proc.c nfsd4: implement reclaim_complete 2010-05-13 12:03:11 -04:00
nfs4recover.c sanitize vfs_fsync calling conventions 2010-05-21 18:31:21 -04:00
nfs4state.c gcc-4.6: nfsd: fix initialized but not read warnings 2010-07-29 19:32:17 -04:00
nfs4xdr.c nfsd: minor nfsd read api cleanup 2010-07-30 12:54:54 -04:00
nfscache.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
nfsctl.c gcc-4.6: nfsd: fix initialized but not read warnings 2010-07-29 19:32:17 -04:00
nfsd.h nfsd4: share file descriptors between stateid's 2010-07-29 18:19:23 -04:00
nfsfh.c nfsd: fix "insecure" export option 2009-12-20 20:19:51 -08:00
nfsfh.h nfsd: move most of nfsfh.h to fs/nfsd 2009-12-15 15:01:46 -05:00
nfsproc.c nfsd: minor nfsd read api cleanup 2010-07-30 12:54:54 -04:00
nfssvc.c nfsd: fix startup/shutdown order bug 2010-08-06 17:05:30 -04:00
nfsxdr.c nfsd: remove pointless paths in file headers 2009-12-15 15:01:47 -05:00
state.h nfsd4: share file descriptors between stateid's 2010-07-29 18:19:23 -04:00
stats.c nfsd: remove pointless paths in file headers 2009-12-15 15:01:47 -05:00
vfs.c nfsd: minor nfsd read api cleanup 2010-07-30 12:54:54 -04:00
vfs.h nfsd: minor nfsd read api cleanup 2010-07-30 12:54:54 -04:00
xdr.h nfsd: remove pointless paths in file headers 2009-12-15 15:01:47 -05:00
xdr3.h nfsd: remove pointless paths in file headers 2009-12-15 15:01:47 -05:00
xdr4.h nfsd4: implement reclaim_complete 2010-05-13 12:03:11 -04:00