From: syzbot <syzbot+5f47a8cea6a12b77a876@syzkaller.appspotmail.com>
To: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
Cc: elver@google.com, fmdefrancesco@gmail.com,
gregkh@linuxfoundation.org, jirislaby@kernel.org,
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] BUG: sleeping function called from invalid context in __might_resched
Date: Tue, 16 Nov 2021 01:03:15 -0800 [thread overview]
Message-ID: <00000000000022f93a05d0e432f3@google.com> (raw)
In-Reply-To: <7655311.pJQ0NNsvTN@localhost.localdomain>
> On Tuesday, November 16, 2021 9:53:53 AM CET Fabio M. De Francesco wrote:
>> On Tuesday, November 16, 2021 9:09:11 AM CET syzbot wrote:
>> > Hello,
>> >
>> > syzbot has tested the proposed patch but the reproducer is still
> triggering
>> an issue:
>> > BUG: sleeping function called from invalid context in __might_resched
>> > [...]
>>
>> The reproducer is still triggering an issue, but this time it looks like it
>> is triggered by a different path of execution.
>>
>> The same invalid "in_interrupt()" test is also in con_flush_chars().
>>
>> Let's try to remove it too...
>>
>> My first idea would be to replace "if (in_interrupt())" with the same
>> "preempt_count() || irqs_disabled()" I used in do_con_write(). However I
>> noticed that both do_con_write() and con_flush_chars() are only called from
>> inside con_write() (which, aside from calling those functions, does nothing
>> else).
>>
>> So why not remove the if (in_interrupt()) from both them and use if
>> (preempt_count() || irqs_disabled()) just once in con_write()?
>>
>> I think this should be the right solution, but I prefer to go one step at a
>> time.
>>
>> Therefore, I'll (1) use the same (redundant, if it was used in con_write())
>> test also in con_flush_chars(), (2) wait for Syzbot to confirm that it
> fixes
>> the bug, and (3) wait for maintainers review and suggestions about whether
> or
>> not moving those tests one level upper.
>>
>> #syz test:
>> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>
>> ---
>> Fabio M. De Francesco
>
> Don't know exactly what happened, so let's retry the test...
>
> #syz test:
want 2 args (repo, branch), got 1
> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
next prev parent reply other threads:[~2021-11-16 9:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-10 10:18 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
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 [this message]
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=00000000000022f93a05d0e432f3@google.com \
--to=syzbot+5f47a8cea6a12b77a876@syzkaller.appspotmail.com \
--cc=elver@google.com \
--cc=fmdefrancesco@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome