From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751784AbdHAI2W (ORCPT ); Tue, 1 Aug 2017 04:28:22 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:54545 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751672AbdHAI2V (ORCPT ); Tue, 1 Aug 2017 04:28:21 -0400 X-IronPort-AV: E=Sophos;i="5.41,305,1498514400"; d="scan'208";a="233371209" Date: Tue, 1 Aug 2017 10:28:07 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Lu Baolu cc: Mathias Nyman , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, kbuild-all@01.org Subject: [PATCH] usb: xhci: fix call_kern.cocci warnings Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org GFP_KERNEL used when a lock is held. Convert to GFP_ATOMIC to avoid the possibility of deadlock. Fixes: 725d53536473 ("usb: xhci: Add DbC support in xHCI driver") Signed-off-by: Julia Lawall Signed-off-by: Fengguang Wu --- I don't have access to any more of the context than what is shown so I don't know if this is a real bug. You may want to see if it is instead possible to pull the call out of the lock. tree: baolu/usb/xhci/dbc/beta-v2 head: 671cb76fa0644a2f72a78fe6aac58c3c3347bc38 commit: 725d53536473cb05cdcf2b81a727ded8875a2a2f [3/4] usb: xhci: Add DbC support in xHCI driver xhci-dbgcap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/usb/host/xhci-dbgcap.c +++ b/drivers/usb/host/xhci-dbgcap.c @@ -595,7 +595,7 @@ static int __xhci_dbc_start(struct xhci_ if (ret) return ret; - ret = xhci_dbc_mem_init(xhci, GFP_KERNEL); + ret = xhci_dbc_mem_init(xhci, GFP_ATOMIC); if (ret) return ret;