netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: frank.blaschka@de.ibm.com
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org
Subject: Re: [patch 2/2] [PATCH] qeth: l3 hw tx csum circumvent hw bug
Date: Wed, 12 Jan 2011 23:47:35 -0800 (PST)	[thread overview]
Message-ID: <20110112.234735.160088590.davem@davemloft.net> (raw)
In-Reply-To: <20110113064310.729751199@de.ibm.com>

From: frank.blaschka@de.ibm.com
Date: Thu, 13 Jan 2011 07:42:25 +0100

> --- a/drivers/s390/net/qeth_l3_main.c
> +++ b/drivers/s390/net/qeth_l3_main.c
> @@ -2998,7 +2998,9 @@ static inline void qeth_l3_hdr_csum(stru
>  	 */
>  	if (iph->protocol == IPPROTO_UDP)
>  		hdr->hdr.l3.ext_flags |= QETH_HDR_EXT_UDP;
> -	hdr->hdr.l3.ext_flags |= QETH_HDR_EXT_CSUM_TRANSP_REQ;
> +	hdr->hdr.l3.ext_flags |= QETH_HDR_EXT_CSUM_TRANSP_REQ |
> +		QETH_HDR_EXT_CSUM_HDR_REQ;
> +	iph->check = 0;
>  	if (card->options.performance_stats)
>  		card->perf_stats.tx_csum++;
>  }

You may not change the packet header contents blindly like this.
Otherwise unpredictable contents will be seen by tcpdump and any
other code path which has a clone of this packet.

Thus, you'll need to guard this change with something like:

		if (skb_header_cloned(skb) &&
		    pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) {
			dev_kfree_skb(skb);
			goto tx_fail;
		}

Please fix this and resubmit your two patches.

  reply	other threads:[~2011-01-13  7:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-13  6:42 [patch 0/2] s390: qeth bug fixes for 2.6.38 next rc frank.blaschka
2011-01-13  6:42 ` [patch 1/2] [PATCH] qeth: postpone open till recovery is finished frank.blaschka
2011-01-13  6:42 ` [patch 2/2] [PATCH] qeth: l3 hw tx csum circumvent hw bug frank.blaschka
2011-01-13  7:47   ` David Miller [this message]
2011-01-13  8:23     ` Frank Blaschka
2011-01-16  4:46       ` 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=20110112.234735.160088590.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=frank.blaschka@de.ibm.com \
    --cc=linux-s390@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).