From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA0A8C04A6B for ; Fri, 10 May 2019 16:00:18 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9C66320881 for ; Fri, 10 May 2019 16:00:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="emsww7iz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9C66320881 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=perches.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Mime-Version:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cTONyskWw8HA19Oy7YsMrEoKAreAk3/f10zgQZgjK+g=; b=emsww7izPj0BqK qkl7Dsm63bv43CaY1+h8l8zoAoALvuxSXBq/O3X/+fe3pHeMXbQ0bGDCj0LUXigBlnZE/+rD0TLUX EvzsU/erZeE6HJcG+zAbzohvqN/F0fmwPfdowq80VvVCNTkJhOV9v8UNSWO7wj50dFlNvTjBb56K6 l8DDhKWtGMXctaBHY2jcozh4jC4N/lIkX7cwAmUkmzugC0jcvAAn6ehUULZCmPbHZ0IRv5JhmRAn3 Wvs/oSvN+fStRfAgmxlB/wbDLEBJZbAx8eNErvBT6i3m3Dg6w/PJjw4htj5z5zhVkCLcYhxfRUCjq qvlpnEDQ0fFX6Dpsv+Kw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hP7wU-00033c-AC; Fri, 10 May 2019 16:00:14 +0000 Received: from smtprelay0042.hostedemail.com ([216.40.44.42] helo=smtprelay.hostedemail.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hP7wR-0002Wf-M5 for linux-arm-kernel@lists.infradead.org; Fri, 10 May 2019 16:00:13 +0000 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay07.hostedemail.com (Postfix) with ESMTP id 426E0181D396A; Fri, 10 May 2019 15:59:55 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: plot02_906f77e1ab355 X-Filterd-Recvd-Size: 1887 Received: from XPS-9350 (cpe-23-242-196-136.socal.res.rr.com [23.242.196.136]) (Authenticated sender: joe@perches.com) by omf02.hostedemail.com (Postfix) with ESMTPA; Fri, 10 May 2019 15:59:52 +0000 (UTC) Message-ID: <82974f50ad02342abd59b800a802f7adecabc0b9.camel@perches.com> Subject: Re: [PATCH] usb: gadget: udc: lpc32xx: allocate descriptor with GFP_ATOMIC From: Joe Perches To: Alexandre Belloni , Felipe Balbi , Vladimir Zapolskiy , Greg Kroah-Hartman Date: Fri, 10 May 2019 08:59:51 -0700 In-Reply-To: <20190510124248.2430-1-alexandre.belloni@bootlin.com> References: <20190510124248.2430-1-alexandre.belloni@bootlin.com> User-Agent: Evolution 3.30.1-1build1 Mime-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190510_090011_800033_63D23EDF X-CRM114-Status: UNSURE ( 8.07 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-usb@vger.kernel.org, James Grant , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sylvain Lemieux Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 2019-05-10 at 14:42 +0200, Alexandre Belloni wrote: > Gadget drivers may queue request in interrupt context. This would lead to > a descriptor allocation in that context. In that case we would hit > BUG_ON(in_interrupt()) in __get_vm_area_node. [] > diff --git a/drivers/usb/gadget/udc/lpc32xx_udc.c b/drivers/usb/gadget/udc/lpc32xx_udc.c [] > @@ -938,7 +938,7 @@ static struct lpc32xx_usbd_dd_gad *udc_dd_alloc(struct lpc32xx_udc *udc) > struct lpc32xx_usbd_dd_gad *dd; > > dd = (struct lpc32xx_usbd_dd_gad *) dma_pool_alloc( > - udc->dd_cache, (GFP_KERNEL | GFP_DMA), &dma); > + udc->dd_cache, (GFP_ATOMIC | GFP_DMA), &dma); trivia: This could fit nicely on a single line without the unnecessary cast and the unnecessary parentheses around the GFP_ types. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel