Re: JFFS2 deadlock

From: Thomas . Betker
Date: Mon Feb 01 2016 - 13:54:40 EST


Hello David:

> > Subject: [PATCH] Revert "jffs2: Fix lock acquisition order bug in
> > jffs2_write_begin"
> > http://article.gmane.org/gmane.linux.drivers.mtd/62951
> >
> > This is a patch revising my original patch, which I sent to linux-mtd
on
> > 10-Nov-2015. I didn't see a response yet, but it's one of the
outstanding
> > patches above.
>
> That looks necessary but not sufficient. I think we need this
> (untested) patch on top of it, to ensure that we *always* take the page
> lock before f->sem?
>
> Please could you try what's in the tree at
> http://git.infradead.org/users/dwmw2/jffs2-fixes.git

I have been using a variant of Deng Chao's patch here for a long time, so
that one has been tested quite a bit:
http://lists.infradead.org/pipermail/linux-mtd/2013-August/048352.html.
The problem with that patch was that it modified mm/filemap.c and
include/linux/pagemap.h, which we were not too happy about.

Your patch looks much simpler, and I will definitely test it. It may take
a few days, though, as I have to unearth the test scripts, and find a time
slot for testing.

Best regards,
Thomas Betker