]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/2.6.38.8/macvlan-fix-panic-if-lowerdev-in-a-bond.patch
drop drm patch
[thirdparty/kernel/stable-queue.git] / releases / 2.6.38.8 / macvlan-fix-panic-if-lowerdev-in-a-bond.patch
1 From db5a55536b23676675149df8c521d7cb90d9ea36 Mon Sep 17 00:00:00 2001
2 From: Eric Dumazet <eric.dumazet@gmail.com>
3 Date: Fri, 20 May 2011 14:59:23 -0400
4 Subject: macvlan: fix panic if lowerdev in a bond
5
6
7 From: Eric Dumazet <eric.dumazet@gmail.com>
8
9 [ Upstream commit d93515611bbc70c2fe4db232e5feb448ed8e4cc9 ]
10
11 commit a35e2c1b6d905 (macvlan: use rx_handler_data pointer to store
12 macvlan_port pointer V2) added a bug in macvlan_port_create()
13
14 Steps to reproduce the bug:
15
16 # ifenslave bond0 eth0 eth1
17
18 # ip link add link eth0 up name eth0#1 type macvlan
19 ->error EBUSY
20
21 # ip link add link eth0 up name eth0#1 type macvlan
22 ->panic
23
24 Fix: Dont set IFF_MACVLAN_PORT in error case.
25
26 Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
27 Signed-off-by: David S. Miller <davem@davemloft.net>
28 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
29 ---
30 drivers/net/macvlan.c | 4 ++--
31 1 file changed, 2 insertions(+), 2 deletions(-)
32
33 --- a/drivers/net/macvlan.c
34 +++ b/drivers/net/macvlan.c
35 @@ -586,8 +586,8 @@ static int macvlan_port_create(struct ne
36 err = netdev_rx_handler_register(dev, macvlan_handle_frame, port);
37 if (err)
38 kfree(port);
39 -
40 - dev->priv_flags |= IFF_MACVLAN_PORT;
41 + else
42 + dev->priv_flags |= IFF_MACVLAN_PORT;
43 return err;
44 }
45