From: Cong Wang Date: Tue, 11 Feb 2014 23:51:30 +0000 (-0800) Subject: net: correct error path in rtnl_newlink() X-Git-Tag: v3.14-rc4~30^2~43 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e0eee2465df77bcec2e8ff75432b8e57897b143;p=pandora-kernel.git 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 Cc: Eric Dumazet Signed-off-by: Cong Wang Signed-off-by: Cong Wang Signed-off-by: David S. Miller --- Reading git-diff-tree failed