From patchwork Fri Aug 31 19:01:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 10584357 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AD1EC139B for ; Fri, 31 Aug 2018 19:01:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E75B2C716 for ; Fri, 31 Aug 2018 19:01:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 90DBD2C74A; Fri, 31 Aug 2018 19:01:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB8E32C716 for ; Fri, 31 Aug 2018 19:01:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727201AbeHaXKe (ORCPT ); Fri, 31 Aug 2018 19:10:34 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:36891 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726704AbeHaXKe (ORCPT ); Fri, 31 Aug 2018 19:10:34 -0400 X-IronPort-AV: E=Sophos;i="5.53,312,1531778400"; d="scan'208";a="277355822" Received: from static-72-28-92-218.gtcust.grouptelecom.net (HELO hadrien) ([72.28.92.218]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Aug 2018 21:01:41 +0200 Date: Fri, 31 Aug 2018 12:01:38 -0700 (PDT) From: Julia Lawall X-X-Sender: jll@hadrien To: dennisszhou@gmail.com cc: Jens Axboe , Tejun Heo , Johannes Weiner , Josef Bacik , kernel-team@fb.com, linux-block@vger.kernel.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, "Dennis Zhou (Facebook)" Subject: [PATCH] blkcg: fix call_kern.cocci warnings Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: kbuild test robot block/blk-cgroup.c:243:57-67: ERROR: function blkg_create called on line 1260 inside lock on line 1259 but uses GFP_KERNEL block/blk-cgroup.c:243:57-67: ERROR: function blkg_create called on line 922 inside lock on line 911 but uses GFP_KERNEL Generated by: scripts/coccinelle/locks/call_kern.cocci Fixes: 6ef69a3a0b4a ("blkcg: change blkg reference counting to use percpu_ref") CC: Dennis Zhou (Facebook) Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- url: https://github.com/0day-ci/linux/commits/Dennis-Zhou/blkcg-ref-count-refactor-cleanup-blkcg-avg_lat/20180831-161742 base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next :::::: branch date: 10 hours ago :::::: commit date: 10 hours ago The kbuild report doesn't include enough context to check this. Please check whether this is appropriate and whether another approach would be better. blk-cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -240,7 +240,7 @@ static struct blkcg_gq *blkg_create(stru blkg_get(blkg->parent); } - ret = percpu_ref_init(&blkg->refcnt, __blkg_release, 0, GFP_KERNEL); + ret = percpu_ref_init(&blkg->refcnt, __blkg_release, 0, GFP_ATOMIC); if (ret) goto err_cancel_ref;