Commit e6713b5e authored by Tetsuo Handa's avatar Tetsuo Handa Committed by Greg Kroah-Hartman
Browse files

ocfs2: fix panic on kfree(xattr->name)

commit f81c2015 upstream.

Commit 9548906b

 ('xattr: Constify ->name member of "struct xattr"')
missed that ocfs2 is calling kfree(xattr->name).  As a result, kernel
panic occurs upon calling kfree(xattr->name) because xattr->name refers
static constant names.  This patch removes kfree(xattr->name) from
ocfs2_mknod() and ocfs2_symlink().
Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reported-by: default avatarTariq Saeed <tariq.x.saeed@oracle.com>
Tested-by: default avatarTariq Saeed <tariq.x.saeed@oracle.com>
Reviewed-by: default avatarSrinivas Eeda <srinivas.eeda@oracle.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 65155d04
......@@ -450,7 +450,6 @@ static int ocfs2_mknod(struct inode *dir,
brelse(new_fe_bh);
brelse(parent_fe_bh);
kfree(si.name);
kfree(si.value);
ocfs2_free_dir_lookup_result(&lookup);
......@@ -1855,7 +1854,6 @@ static int ocfs2_symlink(struct inode *dir,
brelse(new_fe_bh);
brelse(parent_fe_bh);
kfree(si.name);
kfree(si.value);
ocfs2_free_dir_lookup_result(&lookup);
if (inode_ac)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment