Re: [PATCH v2] tty: n_gsm: restrict tty devices to attach

From: Linus Torvalds
Date: Sat Apr 20 2024 - 14:06:23 EST


On Sat, 20 Apr 2024 at 11:02, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> Most other normal tty devices just expect ->write() to be called in
> normal process context, so if we do a line discipline flag, it would
^^^^^^^^^^^^^^^^^^^^
> have to be something like "I'm ok with being called with interrupts
> disabled", and then the n_gsm ->open function would just check that.

Not line discipline - it would be a 'struct tty_operations' flag
saying 'my ->write() function is ok with atomic context".

Linus