Re: [PATCH net] vrf: fix double free and memory corruption on register_netdevice failure

2015-11-23 Thread David Miller
From: Nikolay Aleksandrov Date: Sat, 21 Nov 2015 19:46:19 +0100 > From: Nikolay Aleksandrov > > When vrf's ->newlink is called, if register_netdevice() fails then it > does free_netdev(), but that's also done by rtnl_newlink() so a second > free happens and memory gets corrupted, to reproduce e

Re: [PATCH net] vrf: fix double free and memory corruption on register_netdevice failure

2015-11-21 Thread David Ahern
On 11/21/15 11:46 AM, Nikolay Aleksandrov wrote: From: Nikolay Aleksandrov When vrf's ->newlink is called, if register_netdevice() fails then it does free_netdev(), but that's also done by rtnl_newlink() so a second free happens and memory gets corrupted, to reproduce execute the following line

[PATCH net] vrf: fix double free and memory corruption on register_netdevice failure

2015-11-21 Thread Nikolay Aleksandrov
From: Nikolay Aleksandrov When vrf's ->newlink is called, if register_netdevice() fails then it does free_netdev(), but that's also done by rtnl_newlink() so a second free happens and memory gets corrupted, to reproduce execute the following line a couple of times (1 - 5 usually is enough): $ for