* [PATCH 1/2][ATM]: Do not free already unregistered net device.
@ 2008-05-04 7:37 Pavel Emelyanov
2008-05-05 1:00 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Pavel Emelyanov @ 2008-05-04 7:37 UTC (permalink / raw)
To: Chas Williams, Linux Netdev List
Both br2684_push and br2684_exit do so, but unregister_netdev()
releases the device itself.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
---
net/atm/br2684.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/net/atm/br2684.c b/net/atm/br2684.c
index 1b22806..3a74ff8 100644
--- a/net/atm/br2684.c
+++ b/net/atm/br2684.c
@@ -350,7 +350,6 @@ static void br2684_push(struct atm_vcc *atmvcc, struct sk_buff *skb)
list_del(&brdev->br2684_devs);
read_unlock(&devs_lock);
unregister_netdev(net_dev);
- free_netdev(net_dev);
}
return;
}
@@ -771,7 +770,6 @@ static void __exit br2684_exit(void)
list_del(&brdev->br2684_devs);
unregister_netdev(net_dev);
- free_netdev(net_dev);
}
}
--
1.5.3.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2][ATM]: Do not free already unregistered net device.
@ 2008-05-05 16:44 Don Fry
2008-05-05 19:37 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Don Fry @ 2008-05-05 16:44 UTC (permalink / raw)
To: netdev
I do not understand why this change was accepted. All of the network
drivers I just looked at in 2.6.25 do unregister_netdev() followed
sometime soon by free_netdev(). Is there something different about ATM
devices? I did not look at all the drivers.
Don
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2][ATM]: Do not free already unregistered net device.
2008-05-05 16:44 Don Fry
@ 2008-05-05 19:37 ` David Miller
2008-05-06 6:34 ` Pavel Emelyanov
0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2008-05-05 19:37 UTC (permalink / raw)
To: pcnet32; +Cc: netdev, xemul
From: Don Fry <pcnet32@verizon.net>
Date: Mon, 05 May 2008 09:44:40 -0700
> I do not understand why this change was accepted. All of the network
> drivers I just looked at in 2.6.25 do unregister_netdev() followed
> sometime soon by free_netdev(). Is there something different about ATM
> devices? I did not look at all the drivers.
Indeed, this change does look bogus.
Pavel, please take a look, unregister_netdev() indeed does not free
the netdevice, and something (usually the caller) needs to do it.
I think I should revert your change.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2][ATM]: Do not free already unregistered net device.
2008-05-05 19:37 ` David Miller
@ 2008-05-06 6:34 ` Pavel Emelyanov
2008-05-06 6:58 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Pavel Emelyanov @ 2008-05-06 6:34 UTC (permalink / raw)
To: David Miller; +Cc: pcnet32, netdev
David Miller wrote:
> From: Don Fry <pcnet32@verizon.net>
> Date: Mon, 05 May 2008 09:44:40 -0700
>
>> I do not understand why this change was accepted. All of the network
>> drivers I just looked at in 2.6.25 do unregister_netdev() followed
>> sometime soon by free_netdev(). Is there something different about ATM
>> devices? I did not look at all the drivers.
>
> Indeed, this change does look bogus.
>
> Pavel, please take a look, unregister_netdev() indeed does not free
> the netdevice, and something (usually the caller) needs to do it.
Indeed :( My bad, I've overlooked the fact, that this device doesn't
have a ->destructor callback set (which most of the others set to the
free_netdev), so the free_netdev is to be called manually.
> I think I should revert your change.
Agree. Sorry, for the confusion.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-05-06 6:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-04 7:37 [PATCH 1/2][ATM]: Do not free already unregistered net device Pavel Emelyanov
2008-05-05 1:00 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2008-05-05 16:44 Don Fry
2008-05-05 19:37 ` David Miller
2008-05-06 6:34 ` Pavel Emelyanov
2008-05-06 6:58 ` 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).