2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 04:34:11 +08:00
linux-next/include
Herbert Xu deea84b0ae [NET]: Fix SKB_WITH_OVERHEAD calculation
The calculation in SKB_WITH_OVERHEAD is incorrect in that it can cause
an overflow across a page boundary which is what it's meant to prevent.
In particular, the header length (X) should not be lumped together with
skb_shared_info.  The latter needs to be aligned properly while the header
has no choice but to sit in front of wherever the payload is.

Therefore the correct calculation is to take away the aligned size of
skb_shared_info, and then subtract the header length.  The resulting
quantity L satisfies the following inequality:

	SKB_DATA_ALIGN(L + X) + sizeof(struct skb_shared_info) <= PAGE_SIZE

This is the quantity used by alloc_skb to do the actual allocation.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-22 02:59:53 -07:00
..
acpi
asm-alpha ide: add CONFIG_IDE_ARCH_OBSOLETE_INIT 2007-10-20 00:32:32 +02:00
asm-arm Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-10-19 20:36:17 -07:00
asm-arm26 softlockup: make asm/irq_regs.h available on every platform 2007-10-17 08:42:47 -07:00
asm-avr32 forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-blackfin Blackfin arch: dma add some API and cleanup bf54x DMA definition 2007-10-22 00:02:14 +08:00
asm-cris ide: add hwif->ack_intr hook 2007-10-20 00:32:32 +02:00
asm-frv forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-generic Linux Kernel Markers 2007-10-19 11:53:54 -07:00
asm-h8300 include/asm-*/system.h: remove unused set_rmb(), set_wmb() macros 2007-10-20 02:30:47 +02:00
asm-ia64 ide: add CONFIG_IDE_ARCH_OBSOLETE_INIT 2007-10-20 00:32:32 +02:00
asm-m32r ide: add CONFIG_IDE_ARCH_OBSOLETE_INIT 2007-10-20 00:32:32 +02:00
asm-m68k ide: add hwif->ack_intr hook 2007-10-20 00:32:32 +02:00
asm-m68knommu include/asm-*/system.h: remove unused set_rmb(), set_wmb() macros 2007-10-20 02:30:47 +02:00
asm-mips Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-10-19 20:36:17 -07:00
asm-parisc Merge branch 'master' of hera.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6 2007-10-20 20:19:15 -07:00
asm-powerpc Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-10-19 20:36:17 -07:00
asm-ppc remove asm/bitops.h includes 2007-10-19 11:53:41 -07:00
asm-s390 forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-sh Fix misspellings of "system", "controller", "interrupt" and "necessary". 2007-10-19 23:10:43 +02:00
asm-sh64 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-10-19 20:36:17 -07:00
asm-sparc ide: add CONFIG_IDE_ARCH_OBSOLETE_INIT 2007-10-20 00:32:32 +02:00
asm-sparc64 ide: add CONFIG_IDE_ARCH_OBSOLETE_INIT 2007-10-20 00:32:32 +02:00
asm-um forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
asm-v850 include/asm-*/system.h: remove unused set_rmb(), set_wmb() macros 2007-10-20 02:30:47 +02:00
asm-x86 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-10-19 20:36:17 -07:00
asm-xtensa forbid asm/bitops.h direct inclusion 2007-10-19 11:53:41 -07:00
crypto [CRYPTO] sha: Add header file for SHA definitions 2007-10-10 16:55:50 -07:00
keys KEYS: Make request_key() and co fundamentally asynchronous 2007-10-17 08:42:57 -07:00
linux [NET]: Fix SKB_WITH_OVERHEAD calculation 2007-10-22 02:59:53 -07:00
math-emu
media v4l: copy_to_user() is not a good method name 2007-10-13 09:58:59 -07:00
mtd
net [Bluetooth] Add support for handling simple eSCO links 2007-10-22 02:59:47 -07:00
pcmcia pcmcia: use DMA_MASK_NONE for the default for all pcmcia devices 2007-10-16 09:42:50 -07:00
rdma
rxrpc
scsi do not export /usr/include/scsi in make headers_install 2007-10-17 08:42:52 -07:00
sound [ALSA] version 1.0.15 2007-10-16 16:57:46 +02:00
video define global BIT macro 2007-10-19 11:53:42 -07:00
xen xen: fix incorrect vcpu_register_vcpu_info hypercall argument 2007-10-16 11:51:31 -07:00
Kbuild do not export /usr/include/scsi in make headers_install 2007-10-17 08:42:52 -07:00