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 <brendanhigg...@google.com>
Signed-off-by: Julia Lawall <julia.law...@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang...@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));

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openipmi-developer mailing list
Openipmi-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openipmi-developer

Reply via email to