diff options
author | Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | 2014-04-03 17:47:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-03 19:20:56 -0400 |
commit | f81c20158f8d5f7938d5eb86ecc42ecc09273ce6 (patch) | |
tree | df83ec2d74fa6c32792fc008967029b09c9f8f4b /fs | |
parent | f7cf4f5bfe073ad792ab49c04f247626b3e38db6 (diff) |
ocfs2: fix panic on kfree(xattr->name)
Commit 9548906b2bb7 ('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: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reported-by: Tariq Saeed <tariq.x.saeed@oracle.com>
Tested-by: Tariq Saeed <tariq.x.saeed@oracle.com>
Reviewed-by: Srinivas Eeda <srinivas.eeda@oracle.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: <stable@vger.kernel.org> [3.12+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ocfs2/namei.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index 931fd50a971f..4a797f22239d 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c | |||
@@ -450,7 +450,6 @@ leave: | |||
450 | 450 | ||
451 | brelse(new_fe_bh); | 451 | brelse(new_fe_bh); |
452 | brelse(parent_fe_bh); | 452 | brelse(parent_fe_bh); |
453 | kfree(si.name); | ||
454 | kfree(si.value); | 453 | kfree(si.value); |
455 | 454 | ||
456 | ocfs2_free_dir_lookup_result(&lookup); | 455 | ocfs2_free_dir_lookup_result(&lookup); |
@@ -1856,7 +1855,6 @@ bail: | |||
1856 | 1855 | ||
1857 | brelse(new_fe_bh); | 1856 | brelse(new_fe_bh); |
1858 | brelse(parent_fe_bh); | 1857 | brelse(parent_fe_bh); |
1859 | kfree(si.name); | ||
1860 | kfree(si.value); | 1858 | kfree(si.value); |
1861 | ocfs2_free_dir_lookup_result(&lookup); | 1859 | ocfs2_free_dir_lookup_result(&lookup); |
1862 | if (inode_ac) | 1860 | if (inode_ac) |