public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
Cc: corbet@lwn.net, kbuild-all@01.org, robh+dt@kernel.org,
	mark.rutland@arm.com, arnd@arndb.de, gregkh@linuxfoundation.org,
	minyard@acm.org, joel@jms.id.au, benh@kernel.crashing.org,
	benjaminfair@google.com, linux-doc@vger.kernel.org,
	devicetree@vger.kernel.org,
	openipmi-developer@lists.sourceforge.net,
	openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	Brendan Higgins <brendanhiggins@google.com>
Subject: [PATCH] ipmi: bt-i2c: fix call_kern.cocci warnings
Date: Sat, 5 Aug 2017 23:32:37 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1708052328140.2025@hadrien> (raw)

Function handle_request called from bt_i2c_slave_cb with bt_slave->lock
held but uses GFP_KERNEL.  Replace GFP_KERNEL by GFP_ATOMIC.

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

Fixes: acd0208e3557 ("ipmi: bt-i2c: added IPMI Block Transfer over I2C BMC side")
CC: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

url:
https://github.com/0day-ci/linux/commits/Brendan-Higgins/ipmi-bt-i2c-added-IPMI-Block-Transfer-over-I2C/20170806-034713

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

--- a/drivers/char/ipmi_bmc/ipmi_bmc_bt_i2c.c
+++ b/drivers/char/ipmi_bmc/ipmi_bmc_bt_i2c.c
@@ -201,7 +201,7 @@ static int handle_request(struct bt_i2c_

 	if (atomic_read(&bt_slave->request_queue_len) >= request_queue_max_len)
 		return -EFAULT;
-	queue_elem = kmalloc(sizeof(*queue_elem), GFP_KERNEL);
+	queue_elem = kmalloc(sizeof(*queue_elem), GFP_ATOMIC);
 	if (!queue_elem)
 		return -ENOMEM;
 	memcpy(&queue_elem->request, &bt_slave->request, sizeof(struct bt_msg));

                 reply	other threads:[~2017-08-05 21:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=alpine.DEB.2.20.1708052328140.2025@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=arnd@arndb.de \
    --cc=benh@kernel.crashing.org \
    --cc=benjaminfair@google.com \
    --cc=brendanhiggins@google.com \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joel@jms.id.au \
    --cc=kbuild-all@01.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=minyard@acm.org \
    --cc=openbmc@lists.ozlabs.org \
    --cc=openipmi-developer@lists.sourceforge.net \
    --cc=robh+dt@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox