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)
committerSteve Conklin <sconklin@canonical.com>
Fri, 15 Jul 2011 17:20:56 +0000 (12:20 -0500)
commitd8ea1e49682c7875644ebdefe58062713e2e9877
tree3400bdaf7949b2cda207b5abbfc63608ff4cd609
parent5ab4f472cf2df372dfb6652c65c360e1efe7e908
macvlan: fix panic if lowerdev in a bond

BugLink: http://bugs.launchpad.net/bugs/793702

[ 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>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/net/macvlan.c