Subject: Re: [PATCH net 3/3] ice: Add set_termios tty operations handle to GNSS

From: Jiri Slaby <[email-masked]>
Date: Fri, 2 Sep 2022 12:47:01 +0200

On 02. 09. 22, 9:42, Jiri Slaby wrote:
> On 01. 09. 22, 8:44, Johan Hovold wrote:
>> Looks like this was merged in 5.18 with 43113ff73453 ("ice: add TTY for
>> GNSS module for E810T device") without any input from people familiar
>> with tty either.
> 
> FWIW doesn't it crash in ice_gnss_tty_write() on parallel tty opens due to:
>           tty->driver_data = NULL;
> in ice_gnss_tty_open()?

Oh, the driver checks for tty->driver_data in every operation (gee). So 
at least that crash is mitigated. The userspace will "only" receive 
EFAULT from time to time.

> There are many "interesting" constructs in the driver...

The checks belong among this "interesting" constructs too.

> thanks,-- 
js
suse labs