public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ipmi: bt-i2c: fix call_kern.cocci warnings
@ 2017-08-05 21:32 Julia Lawall
  0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2017-08-05 21:32 UTC (permalink / raw)
  Cc: corbet, kbuild-all, robh+dt, mark.rutland, arnd, gregkh, minyard,
	joel, benh, benjaminfair, linux-doc, devicetree,
	openipmi-developer, openbmc, linux-kernel, Brendan Higgins

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));

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-08-05 21:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-05 21:32 [PATCH] ipmi: bt-i2c: fix call_kern.cocci warnings Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox