All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
To: syzbot <syzbot+06fa1063cca8163ea541@syzkaller.appspotmail.com>,
	syzkaller-bugs@googlegroups.com,
	linux-serial <linux-serial@vger.kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [syzbot] [dri?] BUG: scheduling while atomic in drm_atomic_helper_wait_for_flip_done
Date: Thu, 18 Jan 2024 23:18:03 +0900	[thread overview]
Message-ID: <83414cb6-df16-4b6d-92e3-d54d22ba26cc@I-love.SAKURA.ne.jp> (raw)
In-Reply-To: <00000000000039f237060f354ef7@google.com>

#syz set subsystems: serial

include/linux/tty_ldisc.h says "struct tty_ldisc_ops"->write is allowed to sleep.

include/linux/tty_driver.h says "struct tty_operations"->write is not allowed to sleep.

drivers/tty/vt/vt.c implements do_con_write() from con_write() sleeping, violating what
include/linux/tty_driver.h says. But how to fix?

-	if (in_interrupt())
+	if (in_interrupt() || in_atomic())
 		return count;

in do_con_write() and con_flush_chars() ? But include/linux/preempt.h says
in_atomic() cannot know about held spinlocks in non-preemptible kernels.

Is there a way to detect spin_lock_irqsave(&gsm->tx_lock, flags) from gsmld_write() ?
Something like whether irq is disabled?

On 2024/01/18 18:51, syzbot wrote:
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    1b1934dbbdcf Merge tag 'docs-6.8-2' of git://git.lwn.net/l..
> git tree:       upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=1029adbde80000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=68ea41b98043e6e8
> dashboard link: https://syzkaller.appspot.com/bug?extid=06fa1063cca8163ea541
> compiler:       aarch64-linux-gnu-gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
> userspace arch: arm64


  reply	other threads:[~2024-01-18 14:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-18  9:51 [syzbot] [dri?] BUG: scheduling while atomic in drm_atomic_helper_wait_for_flip_done syzbot
2024-01-18 14:18 ` Tetsuo Handa [this message]
2024-01-20 10:34   ` [PATCH] tty: vt: check for atomic context in con_write() Tetsuo Handa
2024-01-21  3:48     ` Hillf Danton
2024-01-21 11:34       ` Tetsuo Handa
2024-01-22  6:48     ` Jiri Slaby
2024-01-22 14:08       ` Tetsuo Handa
2024-01-24 10:06         ` [PATCH] tty: n_gsm: restrict tty devices to attach Tetsuo Handa
2024-01-24 13:14           ` Greg Kroah-Hartman
2024-02-03 13:45             ` Tetsuo Handa
2024-02-06 14:28               ` Greg Kroah-Hartman
2024-04-20 11:17 ` [syzbot] [dri?] BUG: scheduling while atomic in drm_atomic_helper_wait_for_flip_done Tetsuo Handa

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=83414cb6-df16-4b6d-92e3-d54d22ba26cc@I-love.SAKURA.ne.jp \
    --to=penguin-kernel@i-love.sakura.ne.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=syzbot+06fa1063cca8163ea541@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.