Skip to contentSkip to conversation

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

Ocfs2-devel New Srinivas Eeda 1 participant 2 messages Mar 28, 2014 OCFS2

lore
Share & tools
lore
#0 lore raw

Hi Andrew,

can you please pull the following patch from Tetsuo Handa. It fixes a regression in ocfs2/mainline and linux-next

Thanks,
--Srini

#1 lore raw

PATCH 1/1 ocfs2: Fix panic on kfree(xattr->name)

From: Tetsuo Handa <[email protected]>

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().

---
 fs/ocfs2/namei.c |    2 --
 1 file changed, 2 deletions(-)
fs/ocfs2/namei.c +0 -2
index 3683643..feed025f 100644
@@ -450,7 +450,6 @@ leave:
 
 	brelse(new_fe_bh);
 	brelse(parent_fe_bh);
-	kfree(si.name);
 	kfree(si.value);
 
 	ocfs2_free_dir_lookup_result(&lookup);
@@ -1855,7 +1854,6 @@ bail:
 
 	brelse(new_fe_bh);
 	brelse(parent_fe_bh);
-	kfree(si.name);
 	kfree(si.value);
 	ocfs2_free_dir_lookup_result(&lookup);
 	if (inode_ac)
Signature · 1 line
1.7.9.5