[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1153786679.31581.27.camel@josh-work.beaverton.ibm.com>
Date: Mon, 24 Jul 2006 17:17:59 -0700
From: Josh Triplett <josht@...ibm.com>
To: linux-kernel@...r.kernel.org
Cc: Andrew Morton <akpm@...l.org>, Daniel Pirkl <daniel.pirkl@...il.cz>
Subject: [PATCH] [ufs] Remove incorrect unlock_kernel from failure path in
ufs_symlink
ufs_symlink, in one of its error paths, calls unlock_kernel without ever
having called lock_kernel(); fix this by creating and jumping to a new label
out_notlocked rather than the out label used after calling lock_kernel().
Signed-off-by: Josh Triplett <josh@...edesktop.org>
---
fs/ufs/namei.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/fs/ufs/namei.c b/fs/ufs/namei.c
index abd5f23..d344b41 100644
--- a/fs/ufs/namei.c
+++ b/fs/ufs/namei.c
@@ -129,7 +129,7 @@ static int ufs_symlink (struct inode * d
struct inode * inode;
if (l > sb->s_blocksize)
- goto out;
+ goto out_notlocked;
lock_kernel();
inode = ufs_new_inode(dir, S_IFLNK | S_IRWXUGO);
@@ -155,6 +155,7 @@ static int ufs_symlink (struct inode * d
err = ufs_add_nondir(dentry, inode);
out:
unlock_kernel();
+out_notlocked:
return err;
out_fail:
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists