lkml.org 
[lkml]   [2006]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch 3/6] [RFC] Add MMC Password Protection (lock/unlock) support V5
Date
On Sunday 29 October 2006 1:49 am, Pierre Ossman wrote:

> > + data_buf = kmalloc(data_size, GFP_KERNEL);
> >
>
> For something that can be at most 34 bytes, a kmalloc seems excessive.
> Put it on the stack. Just remember to have checks so we do not overflow.

It does seem excessive, but stack-allocated buffers are not guaranteed
to be DMA-safe. See Documentation/DMA-mapping.txt right in the first
major section "What memory is DMA'able?"...


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-10-30 04:11    [W:0.063 / U:1.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site