Skip to content
Commit 166bdaa9 authored by David Daney's avatar David Daney Committed by Ralf Baechle
Browse files

Staging: Octeon Ethernet: Fix memory allocation.



After aligning the blocks returned by kmalloc, we need to save the original
pointer so they can be correctly freed.

There are no guarantees about the alignment of SKB data, so we need to
handle worst case alignment.

Since right shifts over subtraction have no distributive property, we need
to fix the back pointer calculation.

Signed-off-by: default avatarDavid Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/884/


Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 6568a234
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment