[lvc-project] [PATCH 5.10/5.15 1/1] tty: add the option to have a tty reject a new ldisc
Fedor Pchelkin
pchelkin at ispras.ru
Fri Sep 20 17:13:24 MSK 2024
On Fri, 20. Sep 07:08, Gavrilov Ilia wrote:
> From: Linus Torvalds <torvalds at linux-foundation.org>
>
> commit 6bd23e0c2bb6c65d4f5754d1456bc9a4427fc59b upstream.
>
> ... and use it to limit the virtual terminals to just N_TTY. They are
> kind of special, and in particular, the "con_write()" routine violates
> the "writes cannot sleep" rule that some ldiscs rely on.
>
> This avoids the
>
> BUG: sleeping function called from invalid context at kernel/printk/printk.c:2659
>
> when N_GSM has been attached to a virtual console, and gsmld_write()
> calls con_write() while holding a spinlock, and con_write() then tries
> to get the console lock.
>
> Tested-by: Tetsuo Handa <penguin-kernel at i-love.sakura.ne.jp>
> Cc: Jiri Slaby <jirislaby at kernel.org>
> Cc: Andrew Morton <akpm at linux-foundation.org>
> Cc: Daniel Starke <daniel.starke at siemens.com>
> Reported-by: syzbot <syzbot+dbac96d8e73b61aa559c at syzkaller.appspotmail.com>
> Closes: https://syzkaller.appspot.com/bug?extid=dbac96d8e73b61aa559c
> Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
> Link: https://lore.kernel.org/r/20240423163339.59780-1-torvalds@linux-foundation.org
> Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
> [Ilia: In order to adapt this patch to branches 5.10 and 5.15,
> the ldisc_ok() function description has been corrected in the old style.]
> Signed-off-by: Gavrilov Ilia <Ilia.Gavrilov at infotecs.ru>
Патч добавлен в LVC-5.10 ветку. В публичном репозитории появится при выходе
следующего релиза. Спасибо!
More information about the lvc-project
mailing list