2005-03-22 05:42:12

by NeilBrown

[permalink] [raw]
Subject: [PATCH kNFSd 5 of 16] nfsd4: fix use after put() in cb_recall


nfs4_put_delegation() did a dprintk using a pointer that it had just called a
put() on. This could cause a dereference of a pointer to freed memory in some
situations.

Signed-off-by: Andy Adamson <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
Signed-off-by: Neil Brown <[email protected]>

### Diffstat output
./fs/nfsd/nfs4callback.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)

diff ./fs/nfsd/nfs4callback.c~current~ ./fs/nfsd/nfs4callback.c
--- ./fs/nfsd/nfs4callback.c~current~ 2005-03-22 16:35:20.000000000 +1100
+++ ./fs/nfsd/nfs4callback.c 2005-03-22 16:36:35.000000000 +1100
@@ -541,7 +541,7 @@ out:
atomic_set(&clp->cl_callback.cb_set, 0);
/* Success or failure, now we're either waiting for lease expiration
* or deleg_return. */
- nfs4_put_delegation(dp);
dprintk("NFSD: nfs4_cb_recall: dp %p dl_flock %p dl_count %d\n",dp, dp->dl_flock, atomic_read(&dp->dl_count));
+ nfs4_put_delegation(dp);
return;
}


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs