From: Marc Dionne Date: Sat, 7 Nov 2009 15:51:52 +0000 (-0500) Subject: Linux: always use afs_maybe_unlock_kernel X-Git-Tag: openafs-devel-1_5_67~79 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=457303440042ad43e61652b6ca11c84fab390b82;p=packages%2Fo%2Fopenafs.git Linux: always use afs_maybe_unlock_kernel In one error case in afs_linux_lookup unlock_kernel() is called directly instead of using the conditional "maybe" form. If the config is such that the BKL is not taken, this can result in an attempt to unlock when the lock has not been taken, and can cause an oops. Change-Id: I27d5db58e9b9d45d925b24e27bc43960499c6ead Reviewed-on: http://gerrit.openafs.org/790 Reviewed-by: Simon Wilkinson Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear --- diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index 3d65d8969..553e0700e 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -1073,7 +1073,7 @@ afs_linux_lookup(struct inode *dip, struct dentry *dp) dput(alias); } else { iput(ip); - unlock_kernel(); + afs_maybe_unlock_kernel(); crfree(credp); return alias; }