netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hideo AOKI <haoki@redhat.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, herbert@gondor.apana.org.au, haoki@redhat.com
Subject: Re: [RFC] [NET] [0/2] pskb_expand_head() bugfix
Date: Fri, 28 Mar 2008 21:02:41 -0400	[thread overview]
Message-ID: <47ED9531.7060901@redhat.com> (raw)
In-Reply-To: <20080327.164820.194326039.davem@davemloft.net>

Hello David,

David Miller wrote:
> From: Hideo AOKI <haoki@redhat.com>
> Date: Tue, 25 Mar 2008 14:39:04 -0400
> 
>> Current pskb_expand_head() doesn't change truesize, while it
>> reallocates memory. Then, if argument nhead or ntail aren't 0, caller
>> must update truesize.
>>
>> We had this bug at audit_expand() in January and fixed it as commit
>> 406a1d868001423c85a3165288e566e65f424fe6. However, some drivers and
>> subsystems still use pskb_expand_head() without updating truesize.
>>
>> In addition, there is another problem to update truesise. Since
>> pskb_expand_head() aligns memory size before reallocation, caller
>> functions may not update turesize correctly if they just add nhaad
>> and ntail to turesize.
> 
> Drivers may not update truesize, because as I explained in
> Tokyo a fundamental issue is the case where SKB is charged
> already to a socket.  In such a case, skb->truesize may not
> be modified without corrupting socket write queue allocation
> state.
> 
> And at these very spots in drivers, the transmit path, the
> SKB is very likely to be owned by a socket.

Thank you for explaining.

OK. I don't change driver code to avoid double charge.

Best regards,
Hideo

--
Hitachi Computer Products (America) Inc.

  reply	other threads:[~2008-03-29  1:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-25 18:39 [RFC] [NET] [0/2] pskb_expand_head() bugfix Hideo AOKI
2008-03-25 18:41 ` [RFC PATCH] [NET] [1/2] revert audit_expand() Hideo AOKI
2008-03-25 18:41 ` [RFC PATCH] [NET] [2/2] pskb_expand_head() updates truesize Hideo AOKI
2008-03-25 23:55 ` [RFC] [NET] [0/2] pskb_expand_head() bugfix Herbert Xu
2008-03-26 20:47   ` Hideo AOKI
2008-03-27  0:13     ` Herbert Xu
2008-03-29  1:01       ` Hideo AOKI
2008-03-27 23:49     ` David Miller
2008-03-29  1:14       ` Hideo AOKI
2008-03-27 23:48 ` David Miller
2008-03-29  1:02   ` Hideo AOKI [this message]
2008-03-29  1:11     ` David Miller
2008-03-29  1:21       ` Hideo AOKI

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=47ED9531.7060901@redhat.com \
    --to=haoki@redhat.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.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).