The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: "David S. Miller" <davem@redhat.com>, Andrew Morton <akpm@osdl.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [NET]: Fix dev_queue_xmit build with older gcc.
Date: Tue, 22 Jun 2004 16:43:18 -0400	[thread overview]
Message-ID: <40D899E6.5060409@pobox.com> (raw)
In-Reply-To: <200406221816.i5MIG9jZ024996@hera.kernel.org>

Linux Kernel Mailing List wrote:
> ChangeSet 1.1822, 2004/06/21 09:32:44-07:00, akm@osdl.org
> 
> 	[NET]: Fix dev_queue_xmit build with older gcc.
> 	
> 	Signed-off-by: Andrew Morton <akpm@osdl.org>
> 	Signed-off-by: David S. Miller <davem@redhat.com>
> 
> 
> 
>  dev.c |    7 +++----
>  1 files changed, 3 insertions(+), 4 deletions(-)
> 
> 
> diff -Nru a/net/core/dev.c b/net/core/dev.c
> --- a/net/core/dev.c	2004-06-22 11:16:18 -07:00
> +++ b/net/core/dev.c	2004-06-22 11:16:18 -07:00
> @@ -1406,13 +1406,12 @@
>  	   Either shot noqueue qdisc, it is even simpler 8)
>  	 */
>  	if (dev->flags & IFF_UP) {
> -		preempt_disable();
> -		int cpu = smp_processor_id();
> +		int cpu = get_cpu();
>  
>  		if (dev->xmit_lock_owner != cpu) {
>  
>  			HARD_TX_LOCK_BH(dev, cpu);
> -			preempt_enable();
> +			put_cpu();
>  
>  			if (!netif_queue_stopped(dev)) {
>  				if (netdev_nit)
> @@ -1430,7 +1429,7 @@
>  				       "queue packet!\n", dev->name);
>  			goto out_enetdown;
>  		} else {
> -			preempt_enable();
> +			put_cpu();


Has this been tested with preempt?

It looks right, but I'm paranoid...

	Jeff



       reply	other threads:[~2004-06-22 20:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200406221816.i5MIG9jZ024996@hera.kernel.org>
2004-06-22 20:43 ` Jeff Garzik [this message]
2004-06-22 21:49   ` [NET]: Fix dev_queue_xmit build with older gcc Ricky Beam

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=40D899E6.5060409@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=akpm@osdl.org \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox