lkml.org 
[lkml]   [2020]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH net-next] rtnetlink: Fix memory(net_device) leak when ->newlink fails
From
Date
On 2020/7/14 3:02, David Miller wrote:
> From: Weilong Chen <chenweilong@huawei.com>
> Date: Mon, 13 Jul 2020 15:55:28 +0800
>
>> When vlan_newlink call register_vlan_dev fails, it might return error
>> with dev->reg_state = NETREG_UNREGISTERED. The rtnl_newlink should
>> free the memory. But currently rtnl_newlink only free the memory which
>> state is NETREG_UNINITIALIZED.
> ...
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Signed-off-by: Weilong Chen <chenweilong@huawei.com>
>
> This needs a Fixes: tag.
>
> Also, can't this bug happen in mainline too? It's a bug fix and therefore
> should target 'net' instead of 'net-next'.
>> .
>
Yes, it can happend in mainline, I'll send a v2 PATCH.

\
 
 \ /
  Last update: 2020-07-14 08:47    [W:0.044 / U:0.988 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site