Re: [PATCH] usb: dwc2: fix panic for coherent memory allocation

From: John Stultz
Date: Fri Jan 06 2017 - 16:36:49 EST


On Thu, Jan 5, 2017 at 6:50 PM, Leo Yan <leo.yan@xxxxxxxxxx> wrote:
> When use configfs to configure USB port as as ethernet gadget, the
> kernel has panic with below backtrace; it clearly indicates the
> coherent memory allocation is happened in the interrupt context,
> but the function __get_vm_area_node() is possible to be scheduling
> out so function __get_vm_area_node() triggers panic if it's called
> from interrupt context.
>
> To fix this issue, simply to change gfp_flag from GFP_KERNEL to
> GFP_NOWAIT so it can support to allocate coherent memory from
> interrupt context.

This looks like it duplicates the similar patch I'm told should be
queued for 4.10-rc3:
https://lkml.org/lkml/2016/12/1/120

thanks
-john