]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
macvlan: fix panic if lowerdev in a bond
authorEric Dumazet <eric.dumazet@gmail.com>
Fri, 20 May 2011 18:59:23 +0000 (14:59 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 3 Jun 2011 01:33:56 +0000 (10:33 +0900)
commit39d073d0ce6fb9c45bbaeb314100c92c0c350552
tree42668e29450f8a6875b551bcf4ceb33292f213ae
parent039b2d693940cec4fec438a8731720141d755f79
macvlan: fix panic if lowerdev in a bond

[ Upstream commit d93515611bbc70c2fe4db232e5feb448ed8e4cc9 ]

commit a35e2c1b6d905 (macvlan: use rx_handler_data pointer to store
macvlan_port pointer V2) added a bug in macvlan_port_create()

Steps to reproduce the bug:

# ifenslave bond0 eth0 eth1

# ip link add link eth0 up name eth0#1 type macvlan
->error EBUSY

# ip link add link eth0 up name eth0#1 type macvlan
->panic

Fix: Dont set IFF_MACVLAN_PORT in error case.

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>
drivers/net/macvlan.c