All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [PATCH] usb: host: xhci: fix call_kern.cocci warnings
Date: Thu, 27 May 2021 02:45:26 +0800	[thread overview]
Message-ID: <20210526184526.GA70606@46d740ed29fc> (raw)
In-Reply-To: <202105270225.Pvv20Idt-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1793 bytes --]

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210526130037.856068-22-lee.jones@linaro.org>
References: <20210526130037.856068-22-lee.jones@linaro.org>
TO: Lee Jones <lee.jones@linaro.org>
TO: lee.jones(a)linaro.org
CC: linux-kernel(a)vger.kernel.org
CC: Mathias Nyman <mathias.nyman@intel.com>
CC: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
CC: linux-usb(a)vger.kernel.org

From: kernel test robot <lkp@intel.com>

drivers/usb/host/xhci.c:2791:48-58: ERROR: function xhci_reserve_bandwidth called on line 2911 inside lock on line 2885 but uses GFP_KERNEL

 Find functions that refer to GFP_KERNEL but are called with locks held.

Semantic patch information:
 The proposed change of converting the GFP_KERNEL is not necessarily the
 correct one.  It may be desired to unlock the lock, or to not call the
 function under the lock in the first place.

Generated by: scripts/coccinelle/locks/call_kern.cocci

CC: Lee Jones <lee.jones@linaro.org>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

url:    https://github.com/0day-ci/linux/commits/Lee-Jones/Rid-W-1-warnings-from-USB/20210526-210403
base:   https://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git for-usb-next
:::::: branch date: 6 hours ago
:::::: commit date: 6 hours ago

Please take the patch only if it's a positive warning. Thanks!

 xhci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -2788,7 +2788,7 @@ static int xhci_reserve_bandwidth(struct
 		return -ENOMEM;
 	}
 
-	ep_bw_info = kzalloc(sizeof(*ep_bw_info) * 31, GFP_KERNEL);
+	ep_bw_info = kzalloc(sizeof(*ep_bw_info) * 31, GFP_ATOMIC);
 	if (!ep_bw_info)
 		return -ENOMEM;
 

      reply	other threads:[~2021-05-26 18:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-26 18:45 [PATCH 21/24] usb: host: xhci: Move array of structs from the stack onto the heap kernel test robot
2021-05-26 18:45 ` kernel test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210526184526.GA70606@46d740ed29fc \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.