All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wang Chen <wangchen@cn.fujitsu.com>
To: Julia Lawall <julia@diku.dk>
Cc: fpavlic@de.ibm.com, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org, Jeff Garzik <jgarzik@pobox.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH 3/3] Fix use of skb after netif_rx
Date: Mon, 10 Dec 2007 07:35:10 +0000	[thread overview]
Message-ID: <475CEC2E.4040006@cn.fujitsu.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0712100813440.13319@ask.diku.dk>

Julia Lawall said the following on 2007-12-10 15:18:
>> Julia, seems that your semantic patch misses following place.
>>
>> drivers/s390/net/qeth_main.c:2733
>> ...
>> #endif
>> 			rxrc = netif_rx(skb);
>> 		card->dev->last_rx = jiffies;
>> 		card->stats.rx_packets++;
>> 		card->stats.rx_bytes += skb->len;
>> ...
> 
> Actually, I found this one as well, but I wasn't sure what to do with it.  
> This one is a bit more complicated because the line with the call to 
> netif_rx is in an else branch if the #ifdef above is taken.  So I wasn't 
> sure what would be the best way to solve the problem in this case.
> 
> Perhaps the solution would be just to save the value of the len field 
> in a local variable in this case, as you proposed in your original patch.
> 

I agree.

BTW, please send driver patch to Jeff Garzik <jgarzik@pobox.com> and
cc to netdev@vger.kernel.org.

--
WCN


WARNING: multiple messages have this Message-ID (diff)
From: Wang Chen <wangchen@cn.fujitsu.com>
To: Julia Lawall <julia@diku.dk>
Cc: fpavlic@de.ibm.com, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org, Jeff Garzik <jgarzik@pobox.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH 3/3] Fix use of skb after netif_rx
Date: Mon, 10 Dec 2007 15:35:10 +0800	[thread overview]
Message-ID: <475CEC2E.4040006@cn.fujitsu.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0712100813440.13319@ask.diku.dk>

Julia Lawall said the following on 2007-12-10 15:18:
>> Julia, seems that your semantic patch misses following place.
>>
>> drivers/s390/net/qeth_main.c:2733
>> ...
>> #endif
>> 			rxrc = netif_rx(skb);
>> 		card->dev->last_rx = jiffies;
>> 		card->stats.rx_packets++;
>> 		card->stats.rx_bytes += skb->len;
>> ...
> 
> Actually, I found this one as well, but I wasn't sure what to do with it.  
> This one is a bit more complicated because the line with the call to 
> netif_rx is in an else branch if the #ifdef above is taken.  So I wasn't 
> sure what would be the best way to solve the problem in this case.
> 
> Perhaps the solution would be just to save the value of the len field 
> in a local variable in this case, as you proposed in your original patch.
> 

I agree.

BTW, please send driver patch to Jeff Garzik <jgarzik@pobox.com> and
cc to netdev@vger.kernel.org.

--
WCN


  reply	other threads:[~2007-12-10  7:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-09 20:05 [PATCH 3/3] Fix use of skb after netif_rx Julia Lawall
2007-12-09 20:05 ` Julia Lawall
2007-12-10  2:28 ` Wang Chen
2007-12-10  2:28   ` Wang Chen
2007-12-10  7:18   ` Julia Lawall
2007-12-10  7:18     ` Julia Lawall
2007-12-10  7:35     ` Wang Chen [this message]
2007-12-10  7:35       ` Wang Chen
2007-12-11  1:17 ` David Miller
2007-12-11  1:17   ` David Miller

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=475CEC2E.4040006@cn.fujitsu.com \
    --to=wangchen@cn.fujitsu.com \
    --cc=fpavlic@de.ibm.com \
    --cc=jgarzik@pobox.com \
    --cc=julia@diku.dk \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@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 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.