Skip to content

RFC pskb_expand_head() bugfix

Hideo AOKI netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2revert audit_expand()kernel/audit.c+1 -50 replies
2/2pskb_expand_head() updates truesizenet/core/skbuff.c net/ipv4/ipcomp.c net/ipv6/ipcomp6.c +1 more+7 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC] [NET] [0/2] pskb_expand_head() bugfix

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

Signature · 1 line
Hitachi Computer Products (America) Inc.