Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp740477imm; Thu, 13 Sep 2018 07:05:37 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbT1mVYoTlp1qMTNzl0/w1BOT4jruz7xvZ/0YsFNN+3VMPZZXGZ1n+se6qot1o/L0j+It0J X-Received: by 2002:a65:620d:: with SMTP id d13-v6mr7365984pgv.273.1536847537435; Thu, 13 Sep 2018 07:05:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536847537; cv=none; d=google.com; s=arc-20160816; b=vW+ST+3Jj890xfoVmLwGoiCJS2uCzV/42a+ToQxdr75D/BlSlG58aJTKOBa3qRsZPq NazxlePN6k4JPNNXxCGB33Vkok59XFpyByAB2b6nHauXba5gdzbd75LIlxeW1eXl19wc h7zS5YpkeT8qss6Ll5Xz7/ARoPOXfblTlcy3rZSZE0CbzQRTGn50xASoQDjtHCbkHdkB U3/Pl43GCq15sxuvb2BEbp6Wa9cKLfTs0mNDk8GKkGtiaE2ZUF/ALBvLnM9q5Q7WJBtL u+s1tTPBu/MicmNz6AUgqDlSgYl4O+CFRhYQzQGHFCOjEVRu7ifXaGHFy3yEFsihwNoz CWxg== 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; bh=2Li+D9mtSeTbnwP/DP7Sjr8WidKOJslBwOZS6ZbTucg=; b=LbsM8k+XWoFX7E+Z4wp17A+zDMRkKscKrqoGPE2GJsxtVFXEDjgxCj+UeqS3vsqwAw Px9iP6+PPguc506ycj1writk60u7hX6jFsraRCMzmsAyHK9zhLe/TfghyZKHOvrtS5Ye 5gk6kuhPWfrlm8PoVZGrpaQ8G7eVbDzQ+oCykpXiEFkEpPxjg78a7/owMw4Da+J36TKE 64hf+bV/B3VD4ELhvqDZOAJkI0mQ6wdKWjAPq7lOzi48eEtFI7aTgRdbg9e09KmHHm6+ X1nP1K+rcSCZAUFVwE04/27jrNNrGgGto1WS84BTzD56XjvX8j+V/pbYTGMuF5S1Bjdp fQIg== 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 j8-v6si3849991plk.196.2018.09.13.07.05.11; Thu, 13 Sep 2018 07:05:37 -0700 (PDT) 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 S1732019AbeIMTOi (ORCPT + 99 others); Thu, 13 Sep 2018 15:14:38 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:35452 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731555AbeIMTOi (ORCPT ); Thu, 13 Sep 2018 15:14:38 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 965A2D36; Thu, 13 Sep 2018 14:04:58 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Christian=20K=C3=B6nig?= , Alex Deucher Subject: [PATCH 4.18 179/197] drm/amdgpu: fix incorrect use of fcheck Date: Thu, 13 Sep 2018 15:32:08 +0200 Message-Id: <20180913131848.727522026@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913131841.568116777@linuxfoundation.org> References: <20180913131841.568116777@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Christian König commit bce31d4c1ae8865d6382e3a27b07b4bb8e020ade upstream. The usage isn't RCU protected. Signed-off-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher CC: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c @@ -53,7 +53,7 @@ static int amdgpu_sched_process_priority int fd, enum drm_sched_priority priority) { - struct file *filp = fcheck(fd); + struct file *filp = fget(fd); struct drm_file *file; struct pid *pid; struct amdgpu_fpriv *fpriv; @@ -78,6 +78,8 @@ static int amdgpu_sched_process_priority put_pid(pid); + fput(filp); + return 0; }