|To:||Ralf Baechle <firstname.lastname@example.org>|
|Subject:||Re: [PATCH] Staging: Octeon Ethernet: Fix memory allocation.|
|From:||David Daney <email@example.com>|
|Date:||Wed, 27 Jan 2010 14:11:24 -0800|
|User-agent:||Thunderbird 184.108.40.206 (X11/20090320)|
Ralf Baechle wrote:
On Wed, Jan 27, 2010 at 01:22:53PM -0800, David Daney wrote: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: David Daney <firstname.lastname@example.org> --- The original in the linux-queue tree is broken as it assumes the kmalloc returns aligned blocks. This is not the case when slab debugging is enabled.Queue updated - but shouldn't the magic numbers 128 rsp 256 all over this patch be replaced by L1_CACHE_SHIFT rsp 2 * L1_CACHE_SHIFT?
Although the cache line size and alignment happen to match the size and alignment used by the FPA, they are different things. So Probably it could be a different symbolic constant with a value of 128.
|<Prev in Thread]||Current Thread||[Next in Thread>|
|Previous by Date:||Re: [PATCH -queue] Loongson: Cleanup the halt and poweroff action, Ralf Baechle|
|Next by Date:||Re: [PATCH v2] MIPS: Alchemy: fix dbdma ring destruction memory debugcheck., Ralf Baechle|
|Previous by Thread:||Re: [PATCH] Staging: Octeon Ethernet: Fix memory allocation., Ralf Baechle|
|Next by Thread:||[PATCH] MIPS: pnx833x: remove unused prom_getcmdline(), Yoichi Yuasa|
|Indexes:||[Date] [Thread] [Top] [All Lists]|