* [PATCH] jffs2: fix unbalanced locking
@ 2013-09-23 8:52 Li Zefan
0 siblings, 0 replies; only message in thread
From: Li Zefan @ 2013-09-23 8:52 UTC (permalink / raw)
To: David Woodhouse; +Cc: LKML, linux-mtd
In the failure path in jffs2_do_crccheck_inode() the lock isn't released
before returning.
This probably won't cause real bug, because the structure that contains
the lock is freed in this case.
Signed-off-by: Li Zefan <lizefan@huawei.com>
---
fs/jffs2/readinode.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c
index ae81b01..55cf63d 100644
--- a/fs/jffs2/readinode.c
+++ b/fs/jffs2/readinode.c
@@ -1425,7 +1425,8 @@ int jffs2_do_crccheck_inode(struct jffs2_sb_info *c, struct jffs2_inode_cache *i
jffs2_do_clear_inode(c, f);
}
jffs2_xattr_do_crccheck_inode(c, ic);
- kfree (f);
+ mutex_unlock(&f->sem);
+ kfree(f);
return ret;
}
--
1.8.0.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-09-23 8:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-23 8:52 [PATCH] jffs2: fix unbalanced locking Li Zefan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox