From: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
To: Theodore Ts'o <tytso@mit.edu>
Cc: adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org,
syzkaller-bugs@googlegroups.com,
syzbot <syzbot+4acc7d910e617b360859@syzkaller.appspotmail.com>
Subject: Re: [syzbot] [ext4?] BUG: sleeping function called from invalid context in ext4_update_super
Date: Wed, 14 Jun 2023 21:38:00 +0200 [thread overview]
Message-ID: <1830721.atdPhlSkOF@suse> (raw)
In-Reply-To: <20230612001921.GG1436857@mit.edu>
On lunedì 12 giugno 2023 02:19:21 CEST Theodore Ts'o wrote:
> On Sun, Jun 11, 2023 at 09:15:56PM +0200, Fabio M. De Francesco wrote:
> > Thanks!
> >
> > Let me summarize, just to be sure we don't misunderstand each other...
> >
> > To start off, I'll send out _only_ the patch for the bug reported by
Syzbot,
> > the one about dropping the call to ext_error() in ext4_get_group_info().
> >
> > I'll do this by Tuesday. (Sorry, I cannot do it by Monday because I must
> > pass
> > an exam and an interview for a job).
Ted,
Sorry, I sent the patch this morning (local time), that is one day later :-(
It's at https://lore.kernel.org/lkml/20230614100446.14337-1-fmdefrancesco@gmail.com/
> Sure, that'll be fine.
>
> > However, on the other problems with ext4_grp_locked_error() that you
noticed
> > in the final part of your first message in this thread I'll need some days
> > more to better understand the context I'm working in.
>
> Um, I'm not sure what problems you're referring to. What I said is
> that it works, but you just have to be careful in how you use it (and
> the current callers in mballoc.c are careful).
My poor English made me misunderstanding what you wrote in the final part of
you first email. My fault, again sorry.
> And similarly, I don't think it's a problem that you need to be
> careful not to call ext4_error() from an atomic context. You need to
> be careful, and sometimes we screw up. But in this particular case,
> it's pretty obvious how to fix it, and we don't even need a syzkaller
> reproducer. :-)
Sure.
> > > I would strongly recommend that you use gce-xfstests or kvm-xfstests
> > > before submitting ext4 patches.
I'll surely do next time, but this was too trivial to necessitate any test. Do
you agree with me?
> > > In this particular case, it's a
> > > relatively simple patch, but it's a good habit to get into. See [1]
> > > for more details.
> > >
> > > [1] https://thunk.org/gce-xfstests
> >
> > Thanks also for these information.
> >
Well, I think that this means that you indeed agree for this particular case
:-)
> > I'm still in search of a reliable way to let atomic context
> > run idle waiting for a status change.
[...]
> So the question is not how to find a "reliable way to let atomic
> context run > idle waiting for a status change". That's the wrong
> question. The better question is: "how do you restructure code
> running in an atomic context so it doesn't need to wait for a status
> change"?
>
> Cheers,
>
> - Ted
Very interesting discussion.
I skipped the details only for shortening this email.
Again thanks for your precious help,
Fabio
next prev parent reply other threads:[~2023-06-14 19:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-10 13:52 [syzbot] [ext4?] BUG: sleeping function called from invalid context in ext4_update_super syzbot
2023-06-10 20:41 ` Fabio M. De Francesco
2023-06-10 20:49 ` Fabio M. De Francesco
2023-06-11 3:20 ` Theodore Ts'o
2023-06-11 7:05 ` Fabio M. De Francesco
2023-06-11 13:18 ` Theodore Ts'o
2023-06-11 19:15 ` Fabio M. De Francesco
2023-06-12 0:19 ` Theodore Ts'o
2023-06-14 19:38 ` Fabio M. De Francesco [this message]
2023-06-11 9:38 ` Fabio M. De Francesco
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1830721.atdPhlSkOF@suse \
--to=fmdefrancesco@gmail.com \
--cc=adilger.kernel@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=syzbot+4acc7d910e617b360859@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox