From: ebiederm@xmission.com (Eric W. Biederman)
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: "Serge E. Hallyn" <serue@us.ibm.com>,
Linux Containers <containers@lists.osdl.org>,
Sachin Sant <sachinp@in.ibm.com>, netdev <netdev@vger.kernel.org>,
David Miller <davem@davemloft.net>,
matthltc@us.ibm.com, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] veth: don't free priv->status until dev->destructor (v2)
Date: Tue, 04 Aug 2009 23:40:47 -0700 [thread overview]
Message-ID: <m1zlaeu5jk.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <20090724124614.6acc5054@nehalam> (Stephen Hemminger's message of "Fri\, 24 Jul 2009 12\:46\:14 -0700")
Stephen Hemminger <shemminger@vyatta.com> writes:
> On Fri, 26 Jun 2009 11:24:18 -0500
> "Serge E. Hallyn" <serue@us.ibm.com> wrote:
>
>> Based on the commit msg on ae0e8e82205c903978a79ebf5e31c670b61fa5b4, it looks
>
>> ether_setup(dev);
>> @@ -306,7 +320,7 @@ static void veth_setup(struct net_device *dev)
>> dev->netdev_ops = &veth_netdev_ops;
>> dev->ethtool_ops = &veth_ethtool_ops;
>> dev->features |= NETIF_F_LLTX;
>> - dev->destructor = free_netdev;
>> + dev->destructor = veth_dev_free;
>>
>
> This is still going to oops if sysfs statistics referenced
> after module unload because module is unloaded (code is gone)
> and veth_dev_free no longer exists.
Has anyone actually seen that cause an oops?
The reason I am asking is that as I read the code we cannot have
this problem. At worst the destructor callback is delayed until:
veth_exit
rtnl_link_unregister
rtnl_unlock
netdev_run_todo
dev->destructor
Similarly even if the sysfs filehandle is open we have called:
netdev_unregister_kobject
...
sysfs_addrm_finish
sysfs_deactivate
Which guarantees that sysfs_get_active_two will fail and all
subsequent actions on that file will fail.
Eric
next prev parent reply other threads:[~2009-08-05 6:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-26 16:24 [PATCH 1/1] veth: don't free priv->status until dev->destructor (v2) Serge E. Hallyn
2009-07-15 15:50 ` David Miller
2009-07-20 21:25 ` Stephen Hemminger
2009-07-22 15:55 ` Serge E. Hallyn
2009-07-24 19:46 ` Stephen Hemminger
2009-08-05 6:40 ` Eric W. Biederman [this message]
2009-08-05 17:10 ` Stephen Hemminger
2009-08-05 22:43 ` Eric W. Biederman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1zlaeu5jk.fsf@fess.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=containers@lists.osdl.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=matthltc@us.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=sachinp@in.ibm.com \
--cc=serue@us.ibm.com \
--cc=shemminger@vyatta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox