Re: [PATCH v2 net] rtnetlink: Fix memory(net_device) leak when ->newlink fails

2020-07-14 Thread David Miller
From: Weilong Chen Date: Tue, 14 Jul 2020 15:32:28 +0800 > Fixes: commit e51fb152318ee6 (rtnetlink: fix a memory leak when ->newlink > fails) As others have pointed out this Fixes: tag is not formatted properly. Please fix this up and resubmit.

Re: [PATCH v2 net] rtnetlink: Fix memory(net_device) leak when ->newlink fails

2020-07-13 Thread Wei Yongjun
On 2020/7/14 15:32, Weilong Chen wrote: > 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. > > BUG:

[PATCH v2 net] rtnetlink: Fix memory(net_device) leak when ->newlink fails

2020-07-13 Thread Weilong Chen
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. BUG: memory leak unreferenced object 0x8881051de000 (si