Prev: [091/117] net: Fix oops from tcp_collapse() when using splice()
Next: [02/98] p54usb: Add usbid for Corega CG-WLUSB2GT.
From: Greg KH on 10 May 2010 19:30 2.6.33-stable review patch. If anyone has any objections, please let us know. ------------------ From: Dan Carpenter <error27(a)gmail.com> commit b338cc8207eae46640a8d534738fda7b5e48511d upstream. There is a typo here. We should be testing "*dentry" instead of "dentry". If "*dentry" is an ERR_PTR, it gets dereferenced in either mkdir() or create() which would cause an OOPs. Signed-off-by: Dan Carpenter <error27(a)gmail.com> Signed-off-by: James Morris <jmorris(a)namei.org> Signed-off-by: Greg Kroah-Hartman <gregkh(a)suse.de> --- security/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/security/inode.c +++ b/security/inode.c @@ -161,13 +161,13 @@ static int create_by_name(const char *na mutex_lock(&parent->d_inode->i_mutex); *dentry = lookup_one_len(name, parent, strlen(name)); - if (!IS_ERR(dentry)) { + if (!IS_ERR(*dentry)) { if ((mode & S_IFMT) == S_IFDIR) error = mkdir(parent->d_inode, *dentry, mode); else error = create(parent->d_inode, *dentry, mode); } else - error = PTR_ERR(dentry); + error = PTR_ERR(*dentry); mutex_unlock(&parent->d_inode->i_mutex); return error; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |