RE: [PATCH v3] usbnet/cdc_ncm: Don't use stack variables for DMA

From: Alexey ORISHKO
Date: Tue Aug 02 2011 - 11:30:59 EST


> -----Original Message-----
> From: Joss Boyer [mailto:jwboyer@xxxxxxxxxx]
> Sent: Tuesday, August 02, 2011 4:48 PM
> To: Oliver Neukum; Alexey ORISHKO
> Cc: gregkh@xxxxxxx; linux-usb@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> Subject: [PATCH v3] usbnet/cdc_ncm: Don't use stack variables for DMA
>
> From 1717b6b8b1de95ed4ca53b74d2ccb563fae9b898 Mon Sep 17 00:00:00 2001
> From: Josh Boyer <jwboyer@xxxxxxxxxx>
> Date: Tue, 2 Aug 2011 08:09:56 -0400
> Subject: [PATCH] usbnet/cdc_ncm: Don't use stack variables for DMA buffers
>
> The cdc_ncm driver still has a few places where stack variables are passed
> to the cdc_ncm_do_request function. This triggers a stack trace in
> lib/dma-debug.c if the CONFIG_DEBUG_DMA_API option is set.
>
> Adjust these calls to pass parameters that have been allocated with kzalloc.
>
> Signed-off-by: Josh Boyer <jwboyer@xxxxxxxxxx>
> ---

Tested with hardware on Ubuntu 11.04 64-bit (no CONFIG_DEBUG_DMA_API flag)

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