From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2AE9DECDE46 for ; Wed, 24 Oct 2018 18:57:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D190B207DD for ; Wed, 24 Oct 2018 18:57:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D190B207DD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lip6.fr Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727444AbeJYD0p (ORCPT ); Wed, 24 Oct 2018 23:26:45 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:30225 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727010AbeJYD0p (ORCPT ); Wed, 24 Oct 2018 23:26:45 -0400 X-IronPort-AV: E=Sophos;i="5.54,421,1534802400"; d="scan'208";a="352679581" Received: from 30.9-255-62.static.virginmediabusiness.co.uk (HELO [172.16.5.17]) ([62.255.9.30]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Oct 2018 20:57:29 +0200 Date: Wed, 24 Oct 2018 19:57:27 +0100 (BST) From: Julia Lawall X-X-Sender: jll@hadrien To: Chunming Zhou cc: kbuild-all@01.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, =?ISO-8859-15?Q?Christian_K=F6nig?= , Gustavo Padovan , Maarten Lankhorst , Sean Paul , David Airlie , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm: fix call_kern.cocci warnings (fwd) Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-944385150-1540407448=:3776" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-944385150-1540407448=:3776 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT The containing function is called with a spin_lock held, so GFP_KERNEL can't be used. julia ---------- Forwarded message ---------- Date: Tue, 23 Oct 2018 17:14:25 +0800 From: kbuild test robot To: kbuild@01.org Cc: Julia Lawall Subject: [PATCH] drm: fix call_kern.cocci warnings CC: kbuild-all@01.org CC: intel-gfx@lists.freedesktop.org CC: dri-devel@lists.freedesktop.org TO: Chunming Zhou CC: "Christian König" CC: Gustavo Padovan CC: Maarten Lankhorst CC: Sean Paul CC: David Airlie CC: dri-devel@lists.freedesktop.org CC: linux-kernel@vger.kernel.org From: kbuild test robot drivers/gpu/drm/drm_syncobj.c:202:4-14: ERROR: function drm_syncobj_find_signal_pt_for_point called on line 390 inside lock on line 389 but uses GFP_KERNEL Find functions that refer to GFP_KERNEL but are called with locks held. Semantic patch information: The proposed change of converting the GFP_KERNEL is not necessarily the correct one. It may be desired to unlock the lock, or to not call the function under the lock in the first place. Generated by: scripts/coccinelle/locks/call_kern.cocci Fixes: 48197bc564c7 ("drm: add syncobj timeline support v9") CC: Chunming Zhou Signed-off-by: kbuild test robot --- tree: git://anongit.freedesktop.org/drm/drm-tip drm-tip head: 8d7ffd2298c607c3e1a16f94d51450d7940fd6a7 commit: 48197bc564c7a1888c86024a1ba4f956e0ec2300 [1968/2033] drm: add syncobj timeline support v9 :::::: branch date: 4 hours ago :::::: commit date: 5 days ago Please take the patch only if it's a positive warning. Thanks! drm_syncobj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/drm_syncobj.c +++ b/drivers/gpu/drm/drm_syncobj.c @@ -199,7 +199,7 @@ static struct dma_fence (point <= syncobj->timeline)) { struct drm_syncobj_stub_fence *fence = kzalloc(sizeof(struct drm_syncobj_stub_fence), - GFP_KERNEL); + GFP_ATOMIC); if (!fence) return NULL; --8323329-944385150-1540407448=:3776-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julia Lawall Subject: [PATCH] drm: fix call_kern.cocci warnings (fwd) Date: Wed, 24 Oct 2018 19:57:27 +0100 (BST) Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-944385150-1540407448=:3776" Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Chunming Zhou Cc: David Airlie , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, =?ISO-8859-15?Q?Christian_K=F6nig?= , kbuild-all@01.org List-Id: dri-devel@lists.freedesktop.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-944385150-1540407448=:3776 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT The containing function is called with a spin_lock held, so GFP_KERNEL can't be used. julia ---------- Forwarded message ---------- Date: Tue, 23 Oct 2018 17:14:25 +0800 From: kbuild test robot To: kbuild@01.org Cc: Julia Lawall Subject: [PATCH] drm: fix call_kern.cocci warnings CC: kbuild-all@01.org CC: intel-gfx@lists.freedesktop.org CC: dri-devel@lists.freedesktop.org TO: Chunming Zhou CC: "Christian König" CC: Gustavo Padovan CC: Maarten Lankhorst CC: Sean Paul CC: David Airlie CC: dri-devel@lists.freedesktop.org CC: linux-kernel@vger.kernel.org From: kbuild test robot drivers/gpu/drm/drm_syncobj.c:202:4-14: ERROR: function drm_syncobj_find_signal_pt_for_point called on line 390 inside lock on line 389 but uses GFP_KERNEL Find functions that refer to GFP_KERNEL but are called with locks held. Semantic patch information: The proposed change of converting the GFP_KERNEL is not necessarily the correct one. It may be desired to unlock the lock, or to not call the function under the lock in the first place. Generated by: scripts/coccinelle/locks/call_kern.cocci Fixes: 48197bc564c7 ("drm: add syncobj timeline support v9") CC: Chunming Zhou Signed-off-by: kbuild test robot --- tree: git://anongit.freedesktop.org/drm/drm-tip drm-tip head: 8d7ffd2298c607c3e1a16f94d51450d7940fd6a7 commit: 48197bc564c7a1888c86024a1ba4f956e0ec2300 [1968/2033] drm: add syncobj timeline support v9 :::::: branch date: 4 hours ago :::::: commit date: 5 days ago Please take the patch only if it's a positive warning. Thanks! drm_syncobj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/drm_syncobj.c +++ b/drivers/gpu/drm/drm_syncobj.c @@ -199,7 +199,7 @@ static struct dma_fence (point <= syncobj->timeline)) { struct drm_syncobj_stub_fence *fence = kzalloc(sizeof(struct drm_syncobj_stub_fence), - GFP_KERNEL); + GFP_ATOMIC); if (!fence) return NULL; --8323329-944385150-1540407448=:3776 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4Cg== --8323329-944385150-1540407448=:3776--