[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090331.151028.42671906.davem@davemloft.net>
Date: Tue, 31 Mar 2009 15:10:28 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: oliver@...kum.org
Cc: Larry.Finger@...inger.net, jgarzik@...ox.com,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH 1/2 V2] kaweth: Fix locking to be SMP-safe
From: Oliver Neukum <oliver@...kum.org>
Date: Wed, 1 Apr 2009 00:13:04 +0200
> Am Dienstag 31 März 2009 20:45:49 schrieb Larry Finger:
>
> > @@ -796,7 +799,7 @@ static int kaweth_start_xmit(struct sk_b
>
> > @@ -848,7 +851,7 @@ skip:
> > net->trans_start = jiffies;
> > }
> >
> > - spin_unlock(&kaweth->device_lock);
> > + spin_unlock_irq(&kaweth->device_lock);
>
> Here you enable interrupts. Are you sure ndo_start_xmit is never
> called with interrupts disabled?
It must never be invoked that way, this would break so many
drivers.
On the other hand, all of these driver paths never execute
in a real hardware interrupt context, the deepest it gets
into is software interrupts. So spin_*lock*_bh() might be
more appropriate.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists