2002-01-17 21:16:20

by Trond Myklebust

[permalink] [raw]
Subject: Re: Linux 2.4.18-pre4 bonding driver...


Marcelo,

Is this code from linux-2.4.18-pre4/drivers/net/bonding.c safe?

static int bond_close(struct net_device *master)
{
write_lock_irqsave(&bond->lock, flags);
<snip>
bond_release_all(master);

write_unlock_irqrestore(&bond->lock, flags);

AFAICS 'bond_release_all()' calls a bunch of lower level networking
functions some of which do sleep. It does nothing to release the
bond->lock when this occurs.

Cheers,
Trond


2002-01-17 21:41:30

by David Miller

[permalink] [raw]
Subject: Re: Linux 2.4.18-pre4 bonding driver...

From: Trond Myklebust <[email protected]>
Date: Thu, 17 Jan 2002 22:15:00 +0100

Is this code from linux-2.4.18-pre4/drivers/net/bonding.c safe?

We don't know, ask the Bonding maintainers as they asked us to merge
in these updates for them.

Franks a lot,
David S. Miller
[email protected]

2002-01-21 19:53:46

by Marcelo Tosatti

[permalink] [raw]
Subject: Re: Linux 2.4.18-pre4 bonding driver...



On Thu, 17 Jan 2002, Trond Myklebust wrote:

>
> Marcelo,
>
> Is this code from linux-2.4.18-pre4/drivers/net/bonding.c safe?
>
> static int bond_close(struct net_device *master)
> {
> write_lock_irqsave(&bond->lock, flags);
> <snip>
> bond_release_all(master);
>
> write_unlock_irqrestore(&bond->lock, flags);
>
> AFAICS 'bond_release_all()' calls a bunch of lower level networking
> functions some of which do sleep. It does nothing to release the
> bond->lock when this occurs.

They are not safe, indeed.

Have you tried to contact the driver authors ?