From: Greg KH <gregkh@linuxfoundation.org>
To: jianqi.ren.cn@windriver.com
Cc: stable@vger.kernel.org, patches@lists.linux.dev,
linux-kernel@vger.kernel.org, penguin-kernel@i-love.sakura.ne.jp,
akpm@linux-foundation.org, daniel.starke@siemens.com,
torvalds@linux-foundation.org
Subject: Re: [PATCH 5.15.y] tty: add the option to have a tty reject a new ldisc
Date: Mon, 12 May 2025 16:09:37 +0200 [thread overview]
Message-ID: <2025051221-creature-refund-8fe0@gregkh> (raw)
In-Reply-To: <20250509091454.3241846-1-jianqi.ren.cn@windriver.com>
On Fri, May 09, 2025 at 05:14:54PM +0800, jianqi.ren.cn@windriver.com wrote:
> From: Linus Torvalds <torvalds@linux-foundation.org>
>
> [ Upstream commit 6bd23e0c2bb6c65d4f5754d1456bc9a4427fc59b ]
>
> ... 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.
WHy do you want this in 5.15 and older kernels? You have already
disabledf n_gsm from your kernels already so this isn't an issue, right?
Unless you have this hardware, and explicitly know what is talking to
it, that is the recommendation for this code.
And how was this and the 5.10.y backport tested? Did you see the above
"BUG:" line without it?
thanks,
greg k-h
next prev parent reply other threads:[~2025-05-12 14:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-09 9:14 [PATCH 5.15.y] tty: add the option to have a tty reject a new ldisc jianqi.ren.cn
2025-05-12 14:09 ` Greg KH [this message]
2025-05-14 1:59 ` Ren, Jianqi (Jacky) (CN)
2025-05-12 19:20 ` Sasha Levin
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=2025051221-creature-refund-8fe0@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=akpm@linux-foundation.org \
--cc=daniel.starke@siemens.com \
--cc=jianqi.ren.cn@windriver.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@lists.linux.dev \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=stable@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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