From: David Miller <davem@davemloft.net>
To: herbert@gondor.hengli.com.au
Cc: bhutchings@solarflare.com, netdev@vger.kernel.org
Subject: Re: [PATCH net 2/2] net: WARN if skb_checksum_help() is called on skb requiring segmentation
Date: Tue, 17 Jan 2012 10:32:39 -0500 (EST) [thread overview]
Message-ID: <20120117.103239.724200729662879608.davem@davemloft.net> (raw)
In-Reply-To: <20120117061115.GA14918@gondor.apana.org.au>
From: Herbert Xu <herbert@gondor.hengli.com.au>
Date: Tue, 17 Jan 2012 17:11:15 +1100
> On Mon, Jan 16, 2012 at 10:43:38PM +0000, Ben Hutchings wrote:
>> skb_checksum_help() has never done anything useful with skbs that
>> require segmentation. Setting skb->ip_summed = CHECKSUM_NONE makes
>> them invalid and provokes a later WARNing in skb_gso_segment().
>>
>> Passing such an skb to skb_checksum_help() indicates a bug, so we
>> should warn about it immediately. Move the warning from
>> skb_gso_segment() into a shared function, and add the calling function
>> name, gso_type and gso_size to it.
>>
>> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
>> ---
>> The price for writing the warning format only once is having to pass in
>> the calling function name. Not sure whether it's a good trade-off.
>
> Do we really need the name since we should get a back trace?
Agreed.
next prev parent reply other threads:[~2012-01-17 15:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-16 22:38 [PATCH net 1/2] net: Use device model to get driver name in skb_gso_segment() Ben Hutchings
2012-01-16 22:41 ` Herbert Xu
2012-01-17 15:32 ` David Miller
2012-01-16 22:43 ` [PATCH net 2/2] net: WARN if skb_checksum_help() is called on skb requiring segmentation Ben Hutchings
2012-01-17 6:11 ` Herbert Xu
2012-01-17 15:32 ` David Miller [this message]
2012-01-17 17:15 ` Ben Hutchings
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=20120117.103239.724200729662879608.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=bhutchings@solarflare.com \
--cc=herbert@gondor.hengli.com.au \
--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).