[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <A4F3E461-E5BE-4707-B63A-BD6AAC3DBD02@gmail.com>
Date: Tue, 30 May 2023 14:11:36 +0300
From: George Valkov <gvalkov@...il.com>
To: Paolo Abeni <pabeni@...hat.com>,
Foster Snowhill <forst@....gy>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Simon Horman <simon.horman@...igine.com>,
Jan Kiszka <jan.kiszka@...mens.com>,
linux-usb <linux-usb@...r.kernel.org>,
Linux Netdev List <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next v3 1/2] usbnet: ipheth: fix risk of NULL pointer
deallocation
Hi Paolo!
Sorry, I attached the old version by mistake. Here is the new version:
Download attachment "0001-usbnet-ipheth-cleanup-the-initialization-error-path.patch" of type "application/octet-stream" (1135 bytes)
Georgi Valkov
httpstorm.com
nano RTOS
> On 30 May 2023, at 2:02 PM, Paolo Abeni <pabeni@...hat.com> wrote:
>
> Hi,
>
> On Sat, 2023-05-27 at 15:03 +0200, Foster Snowhill wrote:
>> From: Georgi Valkov <gvalkov@...il.com>
>>
>> The cleanup precedure in ipheth_probe will attempt to free a
>> NULL pointer in dev->ctrl_buf if the memory allocation for
>> this buffer is not successful. While kfree ignores NULL pointers,
>> and the existing code is safe, it is a better design to rearrange
>> the goto labels and avoid this.
>>
>> Signed-off-by: Georgi Valkov <gvalkov@...il.com>
>> Signed-off-by: Foster Snowhill <forst@....gy>
>
> If you are going to repost (due to changes in patch 2) please update
> this patch subj, too. Currently is a bit confusing, something alike
> "cleanup the initialization error path" would be more clear.
>
> Thanks,
>
> Paolo
>
Powered by blists - more mailing lists