[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e5610b7a-2aa8-be54-a559-16106b4c3cca@mellanox.com>
Date: Tue, 19 Mar 2019 15:00:45 +0000
From: Boris Pismenny <borisp@...lanox.com>
To: Leon Romanovsky <leon@...nel.org>
CC: Aditya Pakki <pakki001@....edu>, "kjlu@....edu" <kjlu@....edu>,
Saeed Mahameed <saeedm@...lanox.com>,
"David S. Miller" <davem@...emloft.net>,
Ilya Lesokhin <ilyal@...lanox.com>,
Wei Yongjun <weiyongjun1@...wei.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: mlx5: Add a missing check on idr_find
Hi Leon,
On 3/19/2019 4:35 PM, Leon Romanovsky wrote:
> On Tue, Mar 19, 2019 at 01:41:49PM +0000, Boris Pismenny wrote:
>>
>>
>> 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.
>
> Boris,
>
> Can you please invest ten seconds to read previous emails prior to answering?
> https://lkml.org/lkml/2019/3/19/36
>
The fix you suggested is valid and should be addressed as well.
I didn't comment on your reply, but it doesn't mean that I disagree.
Powered by blists - more mailing lists