Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1139243ybf; Thu, 27 Feb 2020 05:46:26 -0800 (PST) X-Google-Smtp-Source: APXvYqwQHbd+N1o4xyRket7CxXpRGia9OhcCSpeKgVFz5nmsEkk5n5gLL7hlZ3ml7GN3ZBOBi2Xj X-Received: by 2002:a9d:61c5:: with SMTP id h5mr3419444otk.85.1582811186639; Thu, 27 Feb 2020 05:46:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582811186; cv=none; d=google.com; s=arc-20160816; b=vBaiJJEan0grK3hvg0im/te94Sv2LbErzf4uIeVDYXY8G1o+dsa6gdELYHgxzedRQ8 68mJ1DKcZzjWJvqa8XbWekCZZnat9tXSc5UuMCKBvNg6iqzcXKZt+oy8oEEv0HzLouef em1BEymKVxNUHBotMWzj7cmMJDfAExxInGDUAGdu1eHfDvjwq+zdos9b737UvLj/7JiW orwj5NCpBsb7hruTQXQ5F/ged6feXb9lgnEu7hXJ4iX9OGJe2DOo6RMfWla6afpThPkV RLPUcdqnsnAwf9BCbPl+lMQ4M/zvMhxmaepAkSWGPHUHf//bUCtnu/QtSSWLqO4KBC44 K4Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vtGxFYkJDQzUnxY1mtZgqJ8zMhy73dbnx0gPVHvGm6E=; b=sM4pdYyg9jqhZS4TFG0V/za4gZXBS0COjNdsm+dIQiYbwdWgO1Fwsqp47d3oU9qcyB P7hkpN3zUBo5AWxwqDqa0K95Wo9yAXCveM8YLDiUbz5WYMqfC1zyX22mp91vdBFvZ8Yf T6rJCFzs1A14TT5JWA3LHY2hLw8j5emzN3lbCiT+xRuAkzxDMuDZEeVgjrmyUeiluEU7 z13LUPa4gPEsO9jK6CWg4Lt0sUcq9OXFJyWIZyHvl3HSlqS8CEuvuv1NYw6jZZ21NHpy CMPUd7fEUwpy2HMa42DJv5ZFTQsehaGHjmZYxPU7I9K/zfuUkiyH0HFgITGxPXiUDrzC htSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tClYiJE4; 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 l19si1624540otp.4.2020.02.27.05.46.14; Thu, 27 Feb 2020 05:46:26 -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=@kernel.org header.s=default header.b=tClYiJE4; 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 S1730182AbgB0NoS (ORCPT + 99 others); Thu, 27 Feb 2020 08:44:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:39728 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730178AbgB0NoP (ORCPT ); Thu, 27 Feb 2020 08:44:15 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9AA0720578; Thu, 27 Feb 2020 13:44:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582811055; bh=SBthw1y1SCy+Et+NPmFWXARheYZUgLQBwqsZ6puPn8I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tClYiJE45bUD6Wvx0Dw6rGR91l34+wehsu9FCng1oIRxdVgQ9zs3cDRanTnSzvTN0 2GxJKR2mvXb3zBLiN4rPIzpPmUZJre8LAMUk5dViIbiLKOFQHVCqrXPtH6/VGQR2Za AvakV9gNKrHr9HcI6DRNh8BHp2fI62tn/K5VTMKw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, YueHaibing , Ben Skeggs , Sasha Levin Subject: [PATCH 4.4 060/113] drm/nouveau: Fix copy-paste error in nouveau_fence_wait_uevent_handler Date: Thu, 27 Feb 2020 14:36:16 +0100 Message-Id: <20200227132221.353543969@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200227132211.791484803@linuxfoundation.org> References: <20200227132211.791484803@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: YueHaibing [ Upstream commit 1eb013473bff5f95b6fe1ca4dd7deda47257b9c2 ] Like other cases, it should use rcu protected 'chan' rather than 'fence->channel' in nouveau_fence_wait_uevent_handler. Fixes: 0ec5f02f0e2c ("drm/nouveau: prevent stale fence->channel pointers, and protect with rcu") Signed-off-by: YueHaibing Signed-off-by: Ben Skeggs Signed-off-by: Sasha Levin --- 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 574c36b492ee4..fccec23731e24 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fence.c +++ b/drivers/gpu/drm/nouveau/nouveau_fence.c @@ -157,7 +157,7 @@ nouveau_fence_wait_uevent_handler(struct nvif_notify *notify) 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); -- 2.20.1