[linux-dvb] [v4l-dvb-maintainer] [patch]dma on stack in dib0700

Oliver Neukum oliver at neukum.org
Tue Aug 26 21:28:42 CEST 2008


Am Dienstag 26 August 2008 20:55:49 schrieb Hans de Goede:
> I see, so basicly the only safe buffer for usb_control_msg is one that is 
> kmalloc -ed all by itself with no other use for that kmalloc block then using 
> it for usb_comtrol_msg, iow the buffer may not be allocated as anything that is 
> part of a larger memory block such as a struct or an array?

That's the rule to follow.

> And we then could allocate 32 bytes, because we might as well as that is the 
> minimum kmalloc block size, or MUST we allocate 32 bytes to make sure we get a 
> cache-line all by ourselves?

Anything kmalloc returns is safe. You might just as well allocate 32 bytes
you don't have to. kmalloc on the affected architectures will round up to
cache line size.

	Regards
		Oliver




More information about the linux-dvb mailing list