slimbus: Use GFP_ATOMIC under spin lock
authorWei Yongjun <weiyongjun1@huawei.com>
Tue, 2 Jan 2018 17:54:22 +0000 (17:54 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Jan 2018 16:00:13 +0000 (17:00 +0100)
A spin lock is taken here so we should use GFP_ATOMIC.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/slimbus/messaging.c

index 8b2c77f516b9587eaf39b2627877ae8e2f1fc65d..a9a6dc4af0da97ea0d75b95342dc2257b4c61225 100644 (file)
@@ -98,7 +98,7 @@ int slim_do_transfer(struct slim_controller *ctrl, struct slim_msg_txn *txn)
        if (need_tid) {
                spin_lock_irqsave(&ctrl->txn_lock, flags);
                tid = idr_alloc(&ctrl->tid_idr, txn, 0,
-                               SLIM_MAX_TIDS, GFP_KERNEL);
+                               SLIM_MAX_TIDS, GFP_ATOMIC);
                txn->tid = tid;
 
                if (!txn->msg->comp)