Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1939730ybv; Fri, 14 Feb 2020 08:34:03 -0800 (PST) X-Google-Smtp-Source: APXvYqyw1jUI/gYiJKh/mhmVFpGzF8swrYWuUZxDc/KKS4BSwY9Z+t0Mj5DH/DYE9OmmgYauIuHg X-Received: by 2002:aca:ad47:: with SMTP id w68mr2391813oie.63.1581698043574; Fri, 14 Feb 2020 08:34:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581698043; cv=none; d=google.com; s=arc-20160816; b=eNMnDbxoDh4KnUn2vQZkzj3c4WO0Ues2etk++EaBxFwdFoYPCOi7MGw80gCtgeL/jX YVwshYAxQHU1iIJdhlSyNg/cK7hKTPaLR8DAtkW/pkMkA/C6GmxmLZN6aPUwmjnRzp55 j9DVK7KUoYYsZQHgFQ90s3C7opQ8kINz1tQFfQNv4Z2HO7uaAqn39sLPQziIauBR8p4y HPt8IsUjkdBWXI8xaDxTnBiNGu8gS7AGEqnDgUDJPi2u5igX3W+Nm0DBVcwFj1gsN4zE anyjtSBcNPuc2eJxp+fBn5W8EPinp4Kr1UGDqiWnTtwBgpZqWB+nMiYKhpHw3LKCMCdt Syyg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sUtW1LimxZJeo7ZNFCEBIexQSWKGgSrhvgY5Bggto0Q=; b=KQ99fNfwNDOPG09AWJ8yr3Iox+HdJInlibSnj4V/piKfSrWAT3TbY/0ZPhkrHFQj5R hFhQeTh0YGmghEXJ/j4e2nBBNyPaaevKKgKV0zFy4+ebonmEsi6cq1h/TQ2oNBZNcuFG 5VE1kBtsjWiEmZQRI9GIlAV2pNEtT1812RvuvPWx21l4vjvQuye23dA/WUEFoMuc4bKM M7gUgZkR87RT01YHGLrnHN1dahMciwxsdu5McwzLpgZV0/Nly9AVQxAl8WY0xKR9djMs MXWMcEKrBS5Mu5prokQtS4OJ7i6d68utV8s7NSxZRBjDQXTayEj/emy6Y6O+mvYUv3R6 EBpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WDlgS6Wl; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u23si3287004otj.242.2020.02.14.08.33.51; Fri, 14 Feb 2020 08:34:03 -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=WDlgS6Wl; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406138AbgBNQZd (ORCPT + 99 others); Fri, 14 Feb 2020 11:25:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:59718 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405647AbgBNQX1 (ORCPT ); Fri, 14 Feb 2020 11:23:27 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BD0A024772; Fri, 14 Feb 2020 16:23:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581697406; bh=cmKVbbgAr5m81ZEiOmdFPQRU8WvKgIECNgEV/u5oFNQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WDlgS6Wl8Ad/hdfgUwrDv93jH5PszxVrJEkBNgEwzgjE8bWiJ3iqNyXv26rNVJZ0C jaU8nfHuYy9dFO5HnldkJpy1Tr3B8lSb3AUjP5eZ1jH/E4lwuMJdj9GMBGO4/CvHSg 4SQQGzK6ItFB0nu949rQ1+fzdGLhFNG5tYliIIcc= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: YueHaibing , Ben Skeggs , Sasha Levin , dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org Subject: [PATCH AUTOSEL 4.9 099/141] drm/nouveau: Fix copy-paste error in nouveau_fence_wait_uevent_handler Date: Fri, 14 Feb 2020 11:20:39 -0500 Message-Id: <20200214162122.19794-99-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200214162122.19794-1-sashal@kernel.org> References: <20200214162122.19794-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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 4bb9ab892ae19..78e521d00251c 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fence.c +++ b/drivers/gpu/drm/nouveau/nouveau_fence.c @@ -158,7 +158,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