All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: oliver@neukum.org
Cc: Larry.Finger@lwfinger.net, jgarzik@pobox.com,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 1/2 V2] kaweth: Fix locking to be SMP-safe
Date: Tue, 31 Mar 2009 15:10:28 -0700 (PDT)	[thread overview]
Message-ID: <20090331.151028.42671906.davem@davemloft.net> (raw)
In-Reply-To: <200904010013.05494.oliver@neukum.org>

From: Oliver Neukum <oliver@neukum.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.

  reply	other threads:[~2009-03-31 22:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-31 18:45 [PATCH 1/2 V2] kaweth: Fix locking to be SMP-safe Larry Finger
2009-03-31 21:50 ` Oliver Neukum
2009-03-31 22:04   ` David Miller
2009-03-31 23:01   ` Larry Finger
2009-03-31 22:13 ` Oliver Neukum
2009-03-31 22:10   ` David Miller [this message]
2009-03-31 23:06     ` Oliver Neukum

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=20090331.151028.42671906.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=Larry.Finger@lwfinger.net \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oliver@neukum.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.