+ release-dentry_lock-in-an-error-path-of-nfs_path.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     nfs: release dentry_lock in an error path of nfs_path

has been added to the -mm tree.  Its filename is

     release-dentry_lock-in-an-error-path-of-nfs_path.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: nfs: release dentry_lock in an error path of nfs_path
From: Josh Triplett <josht@xxxxxxxxxx>

In one of the error paths of nfs_path, it may return with dentry_lock still
held; fix this by adding and using a new error path Elong_unlock which
unlocks dentry_lock.

Signed-off-by: Josh Triplett <josh@xxxxxxxxxxxxxxx>
Cc: Trond Myklebust <trond.myklebust@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 fs/nfs/namespace.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff -puN fs/nfs/namespace.c~release-dentry_lock-in-an-error-path-of-nfs_path fs/nfs/namespace.c
--- a/fs/nfs/namespace.c~release-dentry_lock-in-an-error-path-of-nfs_path
+++ a/fs/nfs/namespace.c
@@ -56,7 +56,7 @@ char *nfs_path(const char *base, const s
 		namelen = dentry->d_name.len;
 		buflen -= namelen + 1;
 		if (buflen < 0)
-			goto Elong;
+			goto Elong_unlock;
 		end -= namelen;
 		memcpy(end, dentry->d_name.name, namelen);
 		*--end = '/';
@@ -73,6 +73,8 @@ char *nfs_path(const char *base, const s
 	end -= namelen;
 	memcpy(end, base, namelen);
 	return end;
+Elong_unlock:
+	spin_unlock(&dcache_lock);
 Elong:
 	return ERR_PTR(-ENAMETOOLONG);
 }
_

Patches currently in -mm which might be from josht@xxxxxxxxxx are

release-dentry_lock-in-an-error-path-of-nfs_path.patch
remove-incorrect-unlock_kernel-from-allocation.patch
remove-incorrect-unlock_kernel-from-failure-path-in.patch
add-entry-for-efs-filesystem-to-maintainers-as-orphan.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux