[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <C6FF2A09-5208-4A0E-9D63-26F4CC1FE20D@gmail.com>
Date: Tue, 30 May 2023 14:09:52 +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
Thanks Paolo! Something like that?
Download attachment "0001-usbnet-ipheth-avoid-kfree-with-a-NULL-pointer.patch" of type "application/octet-stream" (1129 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