Files
linux-legacy/net/core
Eric Dumazet d65e5e5853 net: Fix the rollback test in dev_change_name()
[ Upstream commit 91e9c07bd635353d1a278bdb38dbb56ac371bcb8 ]

net: Fix the rollback test in dev_change_name()

In dev_change_name() an err variable is used for storing the original
call_netdevice_notifiers() errno (negative) and testing for a rollback
error later, but the test for non-zero is wrong, because the err might
have positive value as well - from dev_alloc_name(). It means the
rollback for a netdevice with a number > 0 will never happen. (The err
test is reordered btw. to make it more readable.)

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-18 13:43:56 -08:00
..
2008-11-14 00:53:54 -08:00
2008-11-25 17:35:18 -08:00
2009-08-02 12:20:36 -07:00
2009-06-08 00:40:35 -07:00
2008-11-18 18:52:37 +11:00
2009-10-12 12:40:27 -07:00