]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 May 2011 18:59:23 +0000 (14:59 -0400)
commitdb6023b1f1a38a5fe6afc21aeefa590bbb099703
tree7db1c770bd3a7ac1f27a5e9ccc231719ae3aa6c5
parent3fddeffbc83cb70b41163c18770e641121f9937f
macvlan: fix panic if lowerdev in a bond

commit 00dace5f16e0d (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>
drivers/net/macvlan.c