netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] [NET] [0/2] pskb_expand_head() bugfix
@ 2008-03-25 18:39 Hideo AOKI
  2008-03-25 18:41 ` [RFC PATCH] [NET] [1/2] revert audit_expand() Hideo AOKI
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Hideo AOKI @ 2008-03-25 18:39 UTC (permalink / raw)
  To: netdev, David Miller, Herbert Xu; +Cc: Hideo AOKI

Hello,

This patch set fixes a potential bug in pskb_expand_head().

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.

To solve above problems, this patch set does the following:

  - updating truesize in pskb_expand_head()
  - removing turesize update due to pskb_expand_head() from caller
    functions

This patch set can be applied to net-2.6.

Comments and suggestions are welcome.

Best regards,
Hideo Aoki

-- 
Hitachi Computer Products (America) Inc.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2008-03-29  1:22 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2008-03-29  1:11     ` David Miller
2008-03-29  1:21       ` Hideo AOKI

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).