[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z7enOheevlbS1xpH@codewreck.org>
Date: Fri, 21 Feb 2025 07:05:46 +0900
From: Dominique Martinet <asmadeus@...ewreck.org>
To: Matthew Wilcox <willy@...radead.org>
Cc: syzbot <syzbot+c0dc46208750f063d0e0@...kaller.appspotmail.com>,
v9fs@...ts.linux.dev, dhowells@...hat.com, jlayton@...nel.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
netfs@...ts.linux.dev, syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [netfs?] kernel BUG in folio_unlock (3)
Matthew Wilcox wrote on Thu, Feb 20, 2025 at 04:15:53PM +0000:
> On Thu, Feb 20, 2025 at 08:00:24AM -0800, syzbot wrote:
> > ------------[ cut here ]------------
> > kernel BUG at mm/filemap.c:1499!
>
> Tried to unlock a folio that wasn't locked.
>
> The entire log is interesting:
>
> https://syzkaller.appspot.com/x/log.txt?x=12af2fdf980000
>
> It injects a failure which hits p9_tag_alloc() (so adding the 9p people
> to the cc)
9p is calling iov_iter_revert() in p9_client_write() on failure, but at
this point of the failure copy_from_iter_full (which advanced the iter)
wasn't called yet because the format processing happens after
allocation...
This was changed by Al Viro in 2015 so it's a "fairly old" bug, but it's
a bug on 9p side alright - thanks for the cc
Now to figure out how to decide if we want to revert or not... I
honestly don't have any bright idea, but I don't know the iov API well
at all -- perhaps it's possible to copy without advancing and only
advance the iov if IO worked?
--
Dominique Martinet | Asmadeus
Powered by blists - more mailing lists