public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik•org>
To: ram.vepa@neterion•com
Cc: netdev@vger•kernel.org, support@neterion•com
Subject: Re: [PATCH 2.6.24 4/5]S2io: Check for CARD_DOWN before handling traffic
Date: Fri, 31 Aug 2007 09:03:55 -0400	[thread overview]
Message-ID: <46D811BB.5060007@garzik.org> (raw)
In-Reply-To: <1187223149.23940.337.camel@flash>

Ramkrishna Vepa wrote:
> - Added check to return from the traffic handling function, if the card status 
>   is DOWN.
> 
> Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion•com>
> Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion•com>
> Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion•com>
> ---
> diff -Nurp patch3/drivers/net/s2io.c patch4/drivers/net/s2io.c
> --- patch3/drivers/net/s2io.c	2007-08-15 08:57:32.000000000 -0700
> +++ patch4/drivers/net/s2io.c	2007-08-15 08:42:14.000000000 -0700
> @@ -2927,6 +2927,11 @@ static int s2io_poll(struct net_device *
>  	int i;
>  
>  	atomic_inc(&nic->isr_cnt);
> +	if (unlikely(atomic_read(&nic->card_state) == CARD_DOWN)) {
> +		atomic_dec(&nic->isr_cnt);
> +		return IRQ_NONE;
> +	}
> +
>  	mac_control = &nic->mac_control;
>  	config = &nic->config;
>  

invalid return value, for this function

Overall, this looks quite racy -- why does the card state differ from 
net_device state in the first place?


  reply	other threads:[~2007-08-31 13:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-16  0:12 [PATCH 2.6.24 4/5]S2io: Check for CARD_DOWN before handling traffic Ramkrishna Vepa
2007-08-31 13:03 ` Jeff Garzik [this message]
2007-09-01  1:43   ` Ramkrishna Vepa

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=46D811BB.5060007@garzik.org \
    --to=jeff@garzik$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=ram.vepa@neterion$(echo .)com \
    --cc=support@neterion$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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