Cong Wang 0e0eee2465 net: correct error path in rtnl_newlink()
I saw the following BUG when ->newlink() fails in rtnl_newlink():

[   40.240058] kernel BUG at net/core/dev.c:6438!

this is due to free_netdev() is not supposed to be called before
netdev is completely unregistered, therefore it is not correct
to call free_netdev() here, at least for ops->newlink!=NULL case,
many drivers call it in ->destructor so that rtnl_unlock() will
take care of it, we probably don't need to do anything here.

Cc: David S. Miller <davem@davemloft.net>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Cong Wang <cwang@twopensource.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-02-13 17:08:29 -05:00
..
2014-01-21 18:13:04 -08:00
2014-01-30 16:48:17 -08:00
2014-01-21 18:13:05 -08:00
2014-02-10 17:51:29 -08:00
2014-02-10 15:23:39 -08:00
2013-09-23 16:52:45 -04:00
2013-10-19 19:36:19 -04:00
2014-01-28 18:04:18 -08:00
2013-11-21 13:09:42 -05:00