[PATCH] ipmi: bt-i2c: fix call_kern.cocci warnings
Julia Lawall
julia.lawall at lip6.fr
Sun Aug 6 07:32:37 AEST 2017
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 at google.com>
Signed-off-by: Julia Lawall <julia.lawall at lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu at 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));
More information about the openbmc
mailing list