* [PATCH] bridge: call br_netpoll_disable in br_add_if
@ 2012-12-20 9:41 Gao feng
2012-12-20 10:33 ` Cong Wang
0 siblings, 1 reply; 3+ messages in thread
From: Gao feng @ 2012-12-20 9:41 UTC (permalink / raw)
To: netdev; +Cc: amwang, shemminger, davem, Gao feng
When netdev_set_master faild in br_add_if, we should
call br_netpoll_disable to do some cleanup jobs,such
as free the memory of struct netpoll which allocated
in br_netpoll_enable.
Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
---
net/bridge/br_if.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index 1c8fdc3..37fe693 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -366,11 +366,11 @@ int br_add_if(struct net_bridge *br, struct net_device *dev)
err = netdev_set_master(dev, br->dev);
if (err)
- goto err3;
+ goto err4;
err = netdev_rx_handler_register(dev, br_handle_frame, p);
if (err)
- goto err4;
+ goto err5;
dev->priv_flags |= IFF_BRIDGE_PORT;
@@ -402,8 +402,10 @@ int br_add_if(struct net_bridge *br, struct net_device *dev)
return 0;
-err4:
+err5:
netdev_set_master(dev, NULL);
+err4:
+ br_netpoll_disable(p);
err3:
sysfs_remove_link(br->ifobj, p->dev->name);
err2:
--
1.7.7.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] bridge: call br_netpoll_disable in br_add_if
2012-12-20 9:41 [PATCH] bridge: call br_netpoll_disable in br_add_if Gao feng
@ 2012-12-20 10:33 ` Cong Wang
2012-12-21 21:17 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Cong Wang @ 2012-12-20 10:33 UTC (permalink / raw)
To: Gao feng; +Cc: netdev, shemminger, davem
On Thu, 2012-12-20 at 17:41 +0800, Gao feng wrote:
> When netdev_set_master faild in br_add_if, we should
> call br_netpoll_disable to do some cleanup jobs,such
> as free the memory of struct netpoll which allocated
> in br_netpoll_enable.
>
> Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Looks good!
Acked-by: Cong Wang <amwang@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] bridge: call br_netpoll_disable in br_add_if
2012-12-20 10:33 ` Cong Wang
@ 2012-12-21 21:17 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2012-12-21 21:17 UTC (permalink / raw)
To: amwang; +Cc: gaofeng, netdev, shemminger
From: Cong Wang <amwang@redhat.com>
Date: Thu, 20 Dec 2012 18:33:33 +0800
> On Thu, 2012-12-20 at 17:41 +0800, Gao feng wrote:
>> When netdev_set_master faild in br_add_if, we should
>> call br_netpoll_disable to do some cleanup jobs,such
>> as free the memory of struct netpoll which allocated
>> in br_netpoll_enable.
>>
>> Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
>
> Looks good!
>
> Acked-by: Cong Wang <amwang@redhat.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-12-21 21:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-20 9:41 [PATCH] bridge: call br_netpoll_disable in br_add_if Gao feng
2012-12-20 10:33 ` Cong Wang
2012-12-21 21:17 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).