Re: [PATCH] net: mlx5: Add a missing check on idr_find

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

 




On 3/19/2019 12:18 AM, Aditya Pakki wrote:
> idr_find() can return a NULL value to 'flow' which is used without a check.
> The patch adds a check to avoid potential NULL pointer dereference.

Did you encounter this in practice?
This flow you are suggesting shouldn't be possible, because the handle 
is always there until the socket is destroyed in sk_destruct.

But, I wouldn't mind some defensive coding here.
Maybe also a WARN_ONCE :)

Could you also release buf in case of an error returned from 
mlx5_fpga_sbu_conn_sendmsg below?
Otherwise, I could submit a patch for this.




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux