Received: by 10.223.176.46 with SMTP id f43csp1520783wra; Wed, 24 Jan 2018 18:42:40 -0800 (PST) X-Google-Smtp-Source: AH8x224xfuM9qR2kvhIZZN5DU6TyUVtqHVSHKt0VFuCfdZVGchYU+jt+PLmRZVVLkn4lZAumVEHo X-Received: by 10.99.2.203 with SMTP id 194mr12329143pgc.268.1516848160804; Wed, 24 Jan 2018 18:42:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516848160; cv=none; d=google.com; s=arc-20160816; b=GPmCsJLELzeANpNUcP21CArXOpVpsXePsxtcsZ3Q1isVQJqQm3Wpb4G2FAYM2l3Ihs 27OtXf3uLL7rhqleURPKZzuBANkeKn/4x7PN7Vqin5Bt0u2UKrDLB96iDw9LOBKmKo4n tJD+6xxTYxQQujJ22msqN5/ClYSCYybfSmpu4bcosYKilDIq52qrs7Wtsg+i83e6ev+5 ZybJesUZtCihRDjIsXA9cNMhqwc33JKOYyYjbt1045A4wotSY2oMQsGXQwQNCBwMy9dR X0PHRBQl813p9+gnZU2p4vfd2j8O7FI6bUmGggwoMBFug76DZ+axKm0/9A5Cgm0Ldj12 kCaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=EZu2/x5YwxDENkVXTMzRJ5g/hiV5ssx3tfoKBfrmi78=; b=BjMc17kn28tppZlCabN2whhBqtbw7FMygGuYAfLqpkJL1mDf2d410YCOK50VgG/jtm Gw3GOQaGwbHgRp6BpuV1B/fRJa34ma8v+93tLP0Pd4PXARXhOCnm4zPwIZ+moKtxAbsD JuazweqD3wtfeEKmc4/DTXT+PBtJFLaoTh2SrZqCCKwcMiFdO/AhgmWvEfGzgqTt1nWP +JcGD/qChBifq8Phsx+IHfOX0xb1EYqDkt/6zJvE7zRH86c5mhyOn2PNyrdN5/VK9aLf oR0DOA4f24e04DaPsi+oVApEDoEoiqgi2MZK25fha+ClkqlxIFzT060TCl8EpxD/2wqe NLyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AIiRnVm/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a190si879580pgc.708.2018.01.24.18.42.24; Wed, 24 Jan 2018 18:42:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AIiRnVm/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932964AbeAYCl5 (ORCPT + 99 others); Wed, 24 Jan 2018 21:41:57 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:39122 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932637AbeAYClz (ORCPT ); Wed, 24 Jan 2018 21:41:55 -0500 Received: by mail-pg0-f67.google.com with SMTP id w17so4127457pgv.6; Wed, 24 Jan 2018 18:41:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=EZu2/x5YwxDENkVXTMzRJ5g/hiV5ssx3tfoKBfrmi78=; b=AIiRnVm/+s6j8w93StScZS0Oy7m8v8LKuAk+70cHBXzRGsefas5C5zUFaV2NdKWBN5 1NumU1w26gI9Tc5OYR+AyATjZA9VDI8Z+J80fao9ZBbpOQ+nVLTouWse8vLWV1T118pb pRT5Gzwn6/A8QXpMmWF3HW7SSMOEH6U+tFQW9vUrbsvNtkgEd+7R1AaEzmKGK2v61yck cUimpOT3N5vGU/moqDPCvUDlH5eW+RzhMUTYFZvp7B6nEngeoKT3JsmsQowzmnhRxLQZ EsVkmn1H1PTxvQbNksnqS4AEy5gUKpyDrkRJAEsnzIX17Wrc3nellKswSejFXtjuUgFa F0fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=EZu2/x5YwxDENkVXTMzRJ5g/hiV5ssx3tfoKBfrmi78=; b=KjCN8QB+40BtKmthzSTn+EdTLiA8RfjzCxXx1bgNDYM/euES1TiT/q5gA0HYWK5CjG YAVLBufYlCdCGjCHvrS3AbjCvulTuCo8CCZRdpIPeifOFQf+2yQEg1+IyGIGCMGlQjXo zM6z9r2TT5dVTX80l8MYkRTFaMQNGgzRJSVPpSf24uDtd0zbEanb3+Ci4s6TXoV+k7Kd bpn1Ri7Vb/8HXMSUTpCQqlXWvCo0PG0y4APIpHXC/X7Wz02SR5xZvS+NZpJbRckb+ijx BIhWZaj3Ol9dwrJXT+zfW7XJnjULMBpQURYm/KqNMbnkluTyftxSmlnv/GOhhyYTjFvV 34FA== X-Gm-Message-State: AKwxyte9LnGd742npXNVsA9imcZUHDjJq4wV86nYPuvUypR+EB6bgVzh Y6oBCqd6xZ0/czSQcV6ZQRU= X-Received: by 10.98.90.195 with SMTP id o186mr14772378pfb.121.1516848115019; Wed, 24 Jan 2018 18:41:55 -0800 (PST) Received: from bai-oslab.tsinghua.edu.cn ([2402:f000:1:4413:af:5698:7220:1b27]) by smtp.gmail.com with ESMTPSA id x22sm13449952pfa.169.2018.01.24.18.41.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jan 2018 18:41:54 -0800 (PST) From: Jia-Ju Bai To: axboe@kernel.dk Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Jia-Ju Bai Subject: [PATCH] block: blk-mq-sched: Replace GFP_ATOMIC with GFP_KERNEL in blk_mq_sched_assign_ioc Date: Thu, 25 Jan 2018 10:46:26 +0800 Message-Id: <1516848386-5720-1-git-send-email-baijiaju1990@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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