On Wed, Jun 13, 2007 at 09:36:31AM -0700, Stephen Hemminger wrote:
> On Wed, 13 Jun 2007 12:45:21 +0300
> Dan Aloni <[EMAIL PROTECTED]> wrote:
>
> > On Mon, May 14, 2007 at 08:58:40AM -0700, Stephen Hemminger wrote:
> > > Kenji Kaneshige found this race between device removal and
> > > registratio
The following patch (based on a patch from Stephen Hemminger
<[EMAIL PROTECTED]>) removes use after free conditions in
the unregister path for the bonding master. Without this patch, an
operation of the form "echo -bond0 > /sys/class/net/bonding_masters"
would trigger a NULL pointer deref
Bonding refers to device after unregistering. This has always been
a dangerous thing. The following UNTESTED should fix the problem.
--- a/drivers/net/bonding/bond_sysfs.c 2007-06-13 15:48:37.0 -0700
+++ b/drivers/net/bonding/bond_sysfs.c 2007-06-13 15:49:17.0 -0700
@@ -164,9 +16
On Wed, 13 Jun 2007 12:45:21 +0300
Dan Aloni <[EMAIL PROTECTED]> wrote:
> On Mon, May 14, 2007 at 08:58:40AM -0700, Stephen Hemminger wrote:
> > Kenji Kaneshige found this race between device removal and
> > registration. On unregister it is possible for the old device to
> > exist, because sysfs
On Mon, May 14, 2007 at 08:58:40AM -0700, Stephen Hemminger wrote:
> Kenji Kaneshige found this race between device removal and
> registration. On unregister it is possible for the old device to
> exist, because sysfs file is still open. A new device with 'eth%d'
> will select the same name, but
Kenji Kaneshige found this race between device removal and
registration. On unregister it is possible for the old device to
exist, because sysfs file is still open. A new device with 'eth%d'
will select the same name, but sysfs kobject register will fial.
The following changes the shutdown order
On Mon, 14 May 2007 10:33:01 +0900
Kenji Kaneshige <[EMAIL PROTECTED]> wrote:
> Hi Stephen,
>
> Thank you for comments. I'll try your patch.
>
> I have one concern about your patch, though I don't know very much
> about netdev codes.
>
> @@ -3411,6 +3410,9 @@ void unregister_netdevice(struct n
Hi,
> How about the following (untested), instead. It hold a removes the sysfs
> entries earlier (on unregister_netdevice), but holds a kobject reference.
> Then when todo runs the actual last put free happens.
I've confirmed the problem is fixed by Stephen's patch on my reproduction
environment.
Hi Stephen,
Thank you for comments. I'll try your patch.
I have one concern about your patch, though I don't know very much
about netdev codes.
@@ -3411,6 +3410,9 @@ void unregister_netdevice(struct net_dev
> /* Notifier chain MUST detach us from master device. */
> BUG_TRAP(!dev->m
On Fri, 11 May 2007 14:40:45 +0900
Kenji Kaneshige <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I encountered the following error when I was hot-plugging network card
> using pci hotplug driver.
>
> kobject_add failed for eth8 with -EEXIST, don't try to register things with
> the same name in the same
On Fri, 11 May 2007 14:40:45 +0900
Kenji Kaneshige <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I encountered the following error when I was hot-plugging network card
> using pci hotplug driver.
>
> kobject_add failed for eth8 with -EEXIST, don't try to register things with
> the same name in the same
Hi,
I encountered the following error when I was hot-plugging network card
using pci hotplug driver.
kobject_add failed for eth8 with -EEXIST, don't try to register things with the
same name in the same directory.
Call Trace:
[] show_stack+0x40/0xa0
sp=e0006
12 matches
Mail list logo