[PATCH] jffs2: fix unbalanced locking

Brian Norris computersforpeace at gmail.com
Thu May 7 16:21:36 PDT 2015


On Tue, Feb 25, 2014 at 06:27:40PM -0800, Brian Norris wrote:
> Li Zefan reported an unbalanced locking issue, found by his
> internal debugging feature on runtime. The particular case he was
> looking at doesn't lead to a deadlock, as the structure that this lock
> is embedded in is freed on error. But we should straighten out the error
> handling.
> 
> Because several callers of jffs2_do_read_inode_internal() /
> jffs2_do_read_inode() already handle the locking/unlocking and inode
> clearing at their own level, let's just push any unlocks/clearing down
> to the caller. This consistency is much easier to verify.
> 
> Reported-by: Li Zefan <lizefan at huawei.com>
> Cc: David Woodhouse <dwmw2 at infradead.org>
> Cc: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
> Cc: Andrew Morton <akpm at linux-foundation.org>
> Signed-off-by: Brian Norris <computersforpeace at gmail.com>
> ---
> Not CC'd to -stable this time, since the bug seems non-critical, and it has
> only limited testing (I did a few quick sanity tests, and Li tested an earlier
> revision)

Pushed to l2-mtd.git.



More information about the linux-mtd mailing list