From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5912D33CFD; Fri, 24 Nov 2023 19:00:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="HCx/D9kP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D9F2FC433C7; Fri, 24 Nov 2023 19:00:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1700852424; bh=bwhZnmFPijPJ6if2ScgXeTlG4zj95K1vynMMNXmbBis=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HCx/D9kPQHpiEt8e7tJTUNSSRrbcJGZ9RnlLcJvDWm2kWwZp6i5Jel+qwVg4u5JCf 2PNd4Jc2+8uI2BDvLrmZmPGZKywixflWJslPdSiEDLWBUrWn1emYPnFxmUupQ/0HvF qSOH6SXFFbrH3SL7o9tFq2N+A/k1k7UVsGJZyY0E= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Mahmoud Adam , Jeff Layton , NeilBrown , Chuck Lever Subject: [PATCH 6.1 327/372] nfsd: fix file memleak on client_opens_release Date: Fri, 24 Nov 2023 17:51:54 +0000 Message-ID: <20231124172021.288496805@linuxfoundation.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231124172010.413667921@linuxfoundation.org> References: <20231124172010.413667921@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mahmoud Adam commit bc1b5acb40201a0746d68a7d7cfc141899937f4f upstream. seq_release should be called to free the allocated seq_file Cc: stable@vger.kernel.org # v5.3+ Signed-off-by: Mahmoud Adam Reviewed-by: Jeff Layton Fixes: 78599c42ae3c ("nfsd4: add file to display list of client's opens") Reviewed-by: NeilBrown Tested-by: Jeff Layton Signed-off-by: Chuck Lever Signed-off-by: Greg Kroah-Hartman --- fs/nfsd/nfs4state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -2799,7 +2799,7 @@ static int client_opens_release(struct i /* XXX: alternatively, we could get/drop in seq start/stop */ drop_client(clp); - return 0; + return seq_release(inode, file); } static const struct file_operations client_states_fops = {