aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/macvlan.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2011-05-20 14:59:23 -0400
committerDavid S. Miller <davem@davemloft.net>2011-05-20 14:59:23 -0400
commitd93515611bbc70c2fe4db232e5feb448ed8e4cc9 (patch)
tree7db1c770bd3a7ac1f27a5e9ccc231719ae3aa6c5 /drivers/net/macvlan.c
parent7196cd6c3d4863000ef88b09f34d6dd75610ec3e (diff)
macvlan: fix panic if lowerdev in a bond
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>
Diffstat (limited to 'drivers/net/macvlan.c')
-rw-r--r--drivers/net/macvlan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 07bcb8084d78..bbcf80afaf16 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -585,8 +585,8 @@ static int macvlan_port_create(struct net_device *dev)
585 err = netdev_rx_handler_register(dev, macvlan_handle_frame, port); 585 err = netdev_rx_handler_register(dev, macvlan_handle_frame, port);
586 if (err) 586 if (err)
587 kfree(port); 587 kfree(port);
588 588 else
589 dev->priv_flags |= IFF_MACVLAN_PORT; 589 dev->priv_flags |= IFF_MACVLAN_PORT;
590 return err; 590 return err;
591} 591}
592 592