From: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
To: Marco Elver <elver@google.com>
Cc: gregkh@linuxfoundation.org, jirislaby@kernel.org,
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com,
syzbot <syzbot+5f47a8cea6a12b77a876@syzkaller.appspotmail.com>
Subject: Re: [syzbot] BUG: sleeping function called from invalid context in __might_resched
Date: Fri, 12 Nov 2021 17:05:14 +0100 [thread overview]
Message-ID: <1805242.PYQNYDVmnG@localhost.localdomain> (raw)
In-Reply-To: <CANpmjNMg62oXEQpuSccZdv-cx9txy2TH_4FQphaLEpSQTqZ1cQ@mail.gmail.com>
On Friday, November 12, 2021 2:58:14 PM CET Marco Elver wrote:
> On Fri, 12 Nov 2021 at 13:22, Fabio M. De Francesco
> <fmdefrancesco@gmail.com> wrote:
> [...]
> > I think that this "BUG" is a false positive.
> >
> > In do_con_write(), Just before the call of console_lock() there is an
> > in_interrupt() check that, if it evaluates to true, makes this function
to
> > return "count" and prevents the SAC bug.
>
> It's not complaining about being in an interrupt, but rather
> interrupts disabled, i.e. still an atomic context.
Yes, still in an atomic context.
Actually, I've never talked about being "in an interrupt", but I've just said
that the in_interrupt() macro prevents to fall into the code that might
sleep.
Now I suppose that this is the place for in_atomic(). Isn't it?
I wrongly thought that in_interrupt() returns non-zero from any kind of
atomic context.
Thanks,
Fabio
> > > do_con_write+0x10f/0x1e40 drivers/tty/vt/vt.c:2908
> > > con_write+0x21/0x40 drivers/tty/vt/vt.c:3295
> > > n_hdlc_send_frames+0x24b/0x490 drivers/tty/n_hdlc.c:290
> > > tty_wakeup+0xe1/0x120 drivers/tty/tty_io.c:534
> > > __start_tty drivers/tty/tty_io.c:806 [inline]
> > > __start_tty+0xfb/0x130 drivers/tty/tty_io.c:799
> > > n_tty_ioctl_helper+0x299/0x2d0 drivers/tty/tty_ioctl.c:880
>
> ^^ n_tty_ioctl_helper() disabled interrupts via
> spin_lock_irq(&tty->flow.lock)
>
next prev parent reply other threads:[~2021-11-12 16:05 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-10 10:18 [syzbot] BUG: sleeping function called from invalid context in __might_resched syzbot
2021-11-12 12:22 ` Fabio M. De Francesco
2021-11-12 13:58 ` Marco Elver
2021-11-12 16:05 ` Fabio M. De Francesco [this message]
2021-11-12 16:27 ` Marco Elver
2021-11-12 17:15 ` Fabio M. De Francesco
2021-11-13 20:13 ` syzbot
2021-11-16 7:57 ` Fabio M. De Francesco
2021-11-16 8:09 ` syzbot
2021-11-16 8:53 ` Fabio M. De Francesco
2021-11-16 8:55 ` syzbot
2021-11-16 9:03 ` Fabio M. De Francesco
2021-11-16 9:03 ` syzbot
2021-11-16 9:20 ` syzbot
2021-11-16 9:13 ` Fabio M. De Francesco
2021-11-16 9:38 ` syzbot
2021-11-16 10:24 ` Marco Elver
2021-11-16 11:35 ` 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=1805242.PYQNYDVmnG@localhost.localdomain \
--to=fmdefrancesco@gmail.com \
--cc=elver@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+5f47a8cea6a12b77a876@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.