Re: [PATCH resend] xhci: Do not use GFP_KERNEL in (potentially) atomic context
From: Mathias Nyman
Date: Wed Apr 21 2021 - 03:45:02 EST
On 20.4.2021 15.32, Christophe JAILLET wrote:
> 'xhci_urb_enqueue()' is passed a 'mem_flags' argument, because "URBs may be
> submitted in interrupt context" (see comment related to 'usb_submit_urb()'
> in 'drivers/usb/core/urb.c')
> So this flag should be used in all the calling chain.
> Up to now, 'xhci_check_maxpacket()' which is only called from
> 'xhci_urb_enqueue()', uses GFP_KERNEL.
> Be safe and pass the mem_flags to this function as well.
> Fixes: ddba5cd0aeff ("xhci: Use command structures when queuing commands on the command ring")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
> I'm not 100% sure of the Fixes tag. The commit is the only that introduced
> this GFP_KERNEL, but I've not checked what was the behavior before that.
> If the patch is correct, I guess that a cc stable should be welcome.
> This patch was proposed on 14/08/20. It has been rebased on latest -next tree.
Added to queue, and added stable tag