Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1614648pxb; Mon, 11 Oct 2021 09:31:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJafKGRW5NklLNa2imzWfCiPlbL7NWCqliFKNKfnugrAqKkduihD8VHY7mcnEqjlAohNoo X-Received: by 2002:a17:902:e552:b0:13e:249d:1205 with SMTP id n18-20020a170902e55200b0013e249d1205mr25172252plf.27.1633969884119; Mon, 11 Oct 2021 09:31:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633969884; cv=none; d=google.com; s=arc-20160816; b=ZshFzAr7HPBr0tys/BO9zxf7FKHiXGmTa+82Usl0Qt3LFDY3bKl7uHCk0Vytp29QgL 6owpBFzN8Bq986Asq2SSOpi9jiMtIRcX5NLs0JusCrIDY5gEnarTRo6LyIJCWQv+iAK/ VtiW0I7zJ9T6ZLy/T6ler3+wCOhs4I/0Sass+B7ZmuaNHNdxbAlwlRsx13TudwFMsG5b OYzBJZ+AzPcdNIl/5o2mnKTl1I854LLZD/MZXgXdiJ6ryObyvFLmS9pK+7oP8GBK5jtU O9EY1DaD7iOOHk4kDs10/t7/Rczbu5zGJSH1QXq7/HSu4Gk0RGZh2WNpmHhkuptFpEfH E6CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=NXf50T4WZsfwME4T5/9iLKUuterI2gUDQh8WvU7Tdj8=; b=HmKT/Gr4qIMaA8qlg0fI8mAhk5+fN1Il+JD4d2dMfq5wxhkUI2elg3RPOunRyv6Ve6 iWsWXL9x17lOhYuYMQ/CNQYLjamqfGOFYdOf6e2HCzndWJ3k57ivMen/u575EZo70J3d pbjz3fD0D6Ifyn9sjj46ZeFX++aAL0giATEe8Ll5pJO5sSbDsUmb4F5hgLnjYuDSl6gc CXzLIYdYAW9XRqr6pBu8yG00pjYJKdKxsHdeCsu0rKcouRel+N1rXlOCAgchwuW+ls8u /lvT/pDMDXo90Ssc4CcXY6SxJ0nvavszPl/2GQZaUiU6lKLvCH0fPU0EKRM58DBz03UB FiHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rLtIvHgU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e7si8905655pfi.140.2021.10.11.09.31.11; Mon, 11 Oct 2021 09:31:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rLtIvHgU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236494AbhJKN7J (ORCPT + 99 others); Mon, 11 Oct 2021 09:59:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:48266 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236732AbhJKN44 (ORCPT ); Mon, 11 Oct 2021 09:56:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C239761040; Mon, 11 Oct 2021 13:53:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1633960428; bh=lHlgL+PtI8loLZASCAO+rwqLV6OQApavNdR03jGGako=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rLtIvHgUdk1s92zMIdksros0xr242Uh6NUE6nfPzsAkmGpNPClegSJTp6vfg/fyVT EaycTmpSEP456JNziEMFvuu+Z9bXCr5Qa41WPmKOOGtKE5n055YF0x1FRdkDxkVGZi 9/eE8675ouKwMRPeOr9W8bGQX+cK1xSYyVyehM78= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Yang Yingliang , Karol Herbst , Maarten Lankhorst , Sasha Levin Subject: [PATCH 5.10 57/83] drm/nouveau/kms/nv50-: fix file release memory leak Date: Mon, 11 Oct 2021 15:46:17 +0200 Message-Id: <20211011134510.359751755@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211011134508.362906295@linuxfoundation.org> References: <20211011134508.362906295@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yang Yingliang [ Upstream commit 0b3d4945cc7e7ea1acd52cb06dfa83bfe265b6d5 ] When using single_open() for opening, single_release() should be called, otherwise the 'op' allocated in single_open() will be leaked. Fixes: 12885ecbfe62 ("drm/nouveau/kms/nvd9-: Add CRC support") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: Karol Herbst Signed-off-by: Karol Herbst Link: https://patchwork.freedesktop.org/patch/msgid/20210911075023.3969054-1-yangyingliang@huawei.com Signed-off-by: Maarten Lankhorst Signed-off-by: Sasha Levin --- drivers/gpu/drm/nouveau/dispnv50/crc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/nouveau/dispnv50/crc.c b/drivers/gpu/drm/nouveau/dispnv50/crc.c index b8c31b697797..66f32d965c72 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/crc.c +++ b/drivers/gpu/drm/nouveau/dispnv50/crc.c @@ -704,6 +704,7 @@ static const struct file_operations nv50_crc_flip_threshold_fops = { .open = nv50_crc_debugfs_flip_threshold_open, .read = seq_read, .write = nv50_crc_debugfs_flip_threshold_set, + .release = single_release, }; int nv50_head_crc_late_register(struct nv50_head *head) -- 2.33.0