All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] block: blk-mq-sched: Replace GFP_ATOMIC with GFP_KERNEL in blk_mq_sched_assign_ioc
@ 2018-01-25  2:46 Jia-Ju Bai
  2018-01-25  2:58 ` Al Viro
  2018-01-25  3:34 ` Jens Axboe
  0 siblings, 2 replies; 8+ messages in thread
From: Jia-Ju Bai @ 2018-01-25  2:46 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, linux-kernel, Jia-Ju Bai

The function ioc_create_icq here is not called in atomic context.
Thus GFP_ATOMIC is not necessary, and it can be replaced with GFP_KERNEL.

This is found by a static analysis tool named DCNS written by myself.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
---
 block/blk-mq-sched.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c
index c117bd8..d461e31 100644
--- a/block/blk-mq-sched.c
+++ b/block/blk-mq-sched.c
@@ -42,7 +42,7 @@ void blk_mq_sched_assign_ioc(struct request *rq, struct bio *bio)
 	spin_unlock_irq(q->queue_lock);
 
 	if (!icq) {
-		icq = ioc_create_icq(ioc, q, GFP_ATOMIC);
+		icq = ioc_create_icq(ioc, q, GFP_KERNEL);
 		if (!icq)
 			return;
 	}
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-01-25  7:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-25  2:46 [PATCH] block: blk-mq-sched: Replace GFP_ATOMIC with GFP_KERNEL in blk_mq_sched_assign_ioc Jia-Ju Bai
2018-01-25  2:58 ` Al Viro
2018-01-25  3:13   ` Jia-Ju Bai
2018-01-25  4:16     ` Al Viro
2018-01-25  7:52       ` Jia-Ju Bai
2018-01-25  3:34 ` Jens Axboe
2018-01-25  3:40   ` Jia-Ju Bai
2018-01-25  5:29   ` Ming Lei

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.