Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp520029ima; Fri, 1 Feb 2019 06:53:32 -0800 (PST) X-Google-Smtp-Source: ALg8bN6Ok12R/5M0k8C+QNFuc/WtGvAPiecPbPG1mGnIscOra9dyhlothDu/G4TP6f9AK/ygsmye X-Received: by 2002:a17:902:365:: with SMTP id 92mr38063755pld.327.1549032812094; Fri, 01 Feb 2019 06:53:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549032812; cv=none; d=google.com; s=arc-20160816; b=g37F5Z2on5ltySps6IAIN0ZwhOaBDWSKDQe0UOTfFf8wsoJB0mOvhBtvHz0NaU/nPe tg8rRpzRsqrQE0K9q/3hYTVFgiLUYDYaylWjrHfkHHf65SbBFS4BdrLrXnr417uimRoN mdyaUosdlUOA1CypoyskFPUEjv8qkcS2HJX/wdQZBXtc8/NCgaHwpBNsxw/B12maczZN lJQapPcoyb28XzHi10OquG65QBF7J1y+hredjB1x7rD5dAF/5F6pqlu95qG8FR56JLOZ AUpMWXTAZvgiJnGEQyKKeRxx0CgS4yX7SySShDTft+dK5KukBraRknvRZgp415Arcir0 q6pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date; bh=lG4qI/JbSRWzZxrpoq3MeSCZQLy7LquUtLo2NZWdl4M=; b=y+6cLKGHMn75G/0lC+7qcxR7fhEsCpM3UxL1MT3QkbYrDTcZWpXVXQHWH5+3keKzEa 897/ntBlo3qiH1QgjyV/fm1gi57PIq+EziBs5URTPOhvqfOmtc45Qv7JKeEge4X0AqLs 5RUV7zSiMipEvO0tXMyYGqgcNoUudEWuAcDKfxvPNnQFUCxYX8rBrjn7+fumSr3rrEgC tzQdO4TAB6DDuL/bkw98XGzht1seWt3TsIHPsVnG/FGwQPZKZxixCunSNdb6887Phsz9 zNUafSFMzWzf0KXi0GD0Mh5KJLPE3v3sr10t7W7htR+djxyebtkGJpCGt6GhX1mRwUb8 3VLA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 92si7705188pli.220.2019.02.01.06.53.16; Fri, 01 Feb 2019 06:53:32 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729825AbfBAOwR (ORCPT + 99 others); Fri, 1 Feb 2019 09:52:17 -0500 Received: from smtp2-g21.free.fr ([212.27.42.2]:23827 "EHLO smtp2-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727450AbfBAOwR (ORCPT ); Fri, 1 Feb 2019 09:52:17 -0500 Received: from pmoreau.org (unknown [84.198.244.197]) (Authenticated sender: pierre.morrow) by smtp2-g21.free.fr (Postfix) with ESMTPSA id 9BDAF200424; Fri, 1 Feb 2019 15:52:01 +0100 (CET) Date: Fri, 1 Feb 2019 15:51:43 +0100 From: Pierre Moreau To: Ben Skeggs Cc: YueHaibing , David Airlie , nouveau@lists.freedesktop.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [Nouveau] [PATCH -next] drm/nouveau: fix copy-paste error in nouveau_fence_wait_uevent_handler Message-ID: <20190201145143.vwiljlpfa5waqyr7@pmoreau.org> Mail-Followup-To: Ben Skeggs , YueHaibing , David Airlie , nouveau@lists.freedesktop.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org References: <1542284042-153903-1-git-send-email-yuehaibing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1542284042-153903-1-git-send-email-yuehaibing@huawei.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Friendly ping, Ben. I see that in `nouveau_fence_done()` there is a check on `chan` not being NULL prior to passing it to `nouveau_fence_update()`. Would something similar be needed here? Pierre On 2018-11-15 — 12:14, YueHaibing wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/gpu/drm/nouveau/nouveau_fence.c: In function 'nouveau_fence_wait_uevent_handler': > drivers/gpu/drm/nouveau/nouveau_fence.c:156:27: warning: > variable 'chan' set but not used [-Wunused-but-set-variable] > > nouveau_fence_update should use rcu protected 'chan' > rather than 'fence->channel' > > Fixes: 0ec5f02f0e2c ("drm/nouveau: prevent stale fence->channel pointers, and protect with rcu") > Signed-off-by: YueHaibing > --- > drivers/gpu/drm/nouveau/nouveau_fence.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/nouveau_fence.c > index d4964f3..91286d0 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_fence.c > +++ b/drivers/gpu/drm/nouveau/nouveau_fence.c > @@ -157,7 +157,7 @@ > > fence = list_entry(fctx->pending.next, typeof(*fence), head); > chan = rcu_dereference_protected(fence->channel, lockdep_is_held(&fctx->lock)); > - if (nouveau_fence_update(fence->channel, fctx)) > + if (nouveau_fence_update(chan, fctx)) > ret = NVIF_NOTIFY_DROP; > } > spin_unlock_irqrestore(&fctx->lock, flags); > > > > _______________________________________________ > Nouveau mailing list > Nouveau@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/nouveau