Re: [PATCH] usb: gadget: u_serial: Add null pointer check in gs_close

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 04, 2023 at 06:54:55PM +0800, Jiazi.Li wrote:
> If kfifo_alloc return err in gs_open, tty->driver_data will not
> be assigned a legal value.

How can kfifo_alloc fail under normal operation?

Have you seen this happen?

> This will result in a NULL pointer issue when calling gs_close in
> the following error handling:
> tty_open
>     ->tty_release
>         ->gs_close		

Odd trailing whitespace :(

> Add a null pointer check in gs_close to prevent this.
> 
> Signed-off-by: Jiazi.Li <jiazi.li@xxxxxxxxxxxxx>

Doesn't match your From: line :(

thanks,

greg k-h




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux