Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp4061429rdb; Thu, 28 Dec 2023 08:51:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IH8kaoUwHQh9N3JrEnpS7Idn04/hij0TOnPErg63pR6SrtpWY4Cpxhcs8Nc20bKr+xhmjzj X-Received: by 2002:a05:620a:8208:b0:781:2a90:93be with SMTP id ow8-20020a05620a820800b007812a9093bemr14496703qkn.10.1703782287324; Thu, 28 Dec 2023 08:51:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703782287; cv=none; d=google.com; s=arc-20160816; b=eaQwhVIr0h3Gb5QA2Ojda1zq9jCNJHWL6aS9vsrQXU/c9MYfZEpkegCTsustrhb7y2 RFp1LH2xq6s80Bdj39tx1dGFYjwcW8O9fUoGp692/OonxWYWl2JQWrauoDXT2+QojN8i TVp/MD3ogelDPoltn0g7QKtnql4OxhaA3IBhwHzlo8Al6jiyqgqkMTh66GWTfSj8BMja LvsAE0zTrhB5Vi8xle3ZOKC1vgAfJm6uTX35ipy5sllSbLXUawI9UzvGMVIY7nCommPS 3IKYHSVWeiui3DVQVjfYzKrxOpEoDBSUwG/tp8T8OCHtOh9YF/hlPHilz/6qk7bw8P6S HRXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=3p0AMn3aKBanZhGrQfB9QBpnISvcnwLlL9GhUxBZAH4=; fh=8LKjeE3RWwvNLIbvOOwp4Y8VvFvn4idrmVT2xli5eKc=; b=ldTEWyDK4M8tEAGYbo2TT8Crco8aAgMa7yQwqVbe/Lsec5c1mCcFR/FOG41FIm/OJz QADe5db14ctHHjoRHm6UgIT9ntU5xl/r1gh6J2VQVVirZT+oyfU/nrrUYN74Y/sI3zpY ReuKzzub8VuqSozhG5HOACkPapZCeFUt7bszyo8p/KncEJl/rzNBcqU0VdDZG1ka8P8e Dyz8y8x5edVkGFwELtgJtpyQa511SMmkRvQGpg07qW0vlLRgwXQpPO4qA6EVE9W6ofQ/ EYZ9BwngNAifIHRjUnLIT0vGxDvhCQVnaBZwZFmG7HH7KDf/AS4TFQQblJwxZ6nTWsKO yG2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XjY3XksU; spf=pass (google.com: domain of linux-kernel+bounces-12785-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12785-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id p7-20020a05620a22e700b007811b68d9f4si15572660qki.720.2023.12.28.08.51.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 08:51:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-12785-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XjY3XksU; spf=pass (google.com: domain of linux-kernel+bounces-12785-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12785-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C38451C2283F for ; Thu, 28 Dec 2023 16:51:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4D712F51B; Thu, 28 Dec 2023 16:51:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="XjY3XksU" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E8F99F4EC for ; Thu, 28 Dec 2023 16:51:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703782278; x=1735318278; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=XYOTYJ77YKnUFrVlaJSxWr2I93Md1Ed7ac29wDvu4Fg=; b=XjY3XksUTn12S+n8xcjUpru1jnLXPYoxRNT7Nu23x51x+i1cCCjzVXhy LkwsNAEAwf76U1xOsc7u88BaoKFd0xCKb290HKrLSWPWMOG6uhxCc0y67 sRTspJqyA1pI0WmJorqA5eOEKqqIv3bU6RGBXA+KjTXKatgbXu3seSc+0 Ul8TuO0DEd3JztLMjevpC6uSkwVr8Aueq+u/Vqwd77NOEZbc0LCIIYjWf RpIoHAtAk24M9nxAAAjQ05nMfPB8t/r5HYuG6rtYVZDLhYsnPiAb9UF/L S6HeKjxTCdw2L9QknUxomETMLh48x9YOGCIr2ShPkqPB0nYM0yh4U7hQe g==; X-IronPort-AV: E=McAfee;i="6600,9927,10937"; a="395455929" X-IronPort-AV: E=Sophos;i="6.04,312,1695711600"; d="scan'208";a="395455929" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2023 08:51:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10937"; a="848987390" X-IronPort-AV: E=Sophos;i="6.04,312,1695711600"; d="scan'208";a="848987390" Received: from noblecat-mobl.ger.corp.intel.com (HELO localhost) ([10.252.35.63]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2023 08:51:15 -0800 Date: Thu, 28 Dec 2023 15:04:37 +0100 From: Stanislaw Gruszka To: Yaxiong Tian Cc: maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Yaxiong Tian Subject: Re: [PATCH] drm/debugfs: fix memory leak in drm_debugfs_remove_files() Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Dec 28, 2023 at 04:07:40PM +0800, Yaxiong Tian wrote: > From: Yaxiong Tian > > The dentry returned by debugfs_lookup() needs to be released by calling > dput() which is missing in drm_debugfs_remove_files(). Fix this by adding > dput(). > > Signed-off-by: Yaxiong Tian Reviewed-by: Stanislaw Gruszka > --- > drivers/gpu/drm/drm_debugfs.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c > index f4715a67e340..4d299152c302 100644 > --- a/drivers/gpu/drm/drm_debugfs.c > +++ b/drivers/gpu/drm/drm_debugfs.c > @@ -277,6 +277,7 @@ int drm_debugfs_remove_files(const struct drm_info_list *files, int count, > > drmm_kfree(minor->dev, d_inode(dent)->i_private); > debugfs_remove(dent); > + dput(dent); > } > return 0; > } > -- > 2.25.1 >