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 13E3E3173F; Fri, 24 Nov 2023 19:09:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ikOqGsju" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 936F2C433C7; Fri, 24 Nov 2023 19:09:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1700852979; bh=w7EaFGhvK0ngk2qZumHE1vylde6iqbVs127pOtOBGZ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ikOqGsjuEK6SuN/isqWlCXzMhfnArBuRw5noM3iyoLLmkxQnwcq5UtdrA1BThPkuD eWH14ndDFBeCiO88c0mrysTg41UfVAWW+KObAHyPeJiKEVhx+MYmANGjTr9iRZ01IS NbZcNO/slxMyYME7fQlXExLrJewvBdclNi863/1k= 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 5.10 175/193] nfsd: fix file memleak on client_opens_release Date: Fri, 24 Nov 2023 17:55:02 +0000 Message-ID: <20231124171954.179015656@linuxfoundation.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231124171947.127438872@linuxfoundation.org> References: <20231124171947.127438872@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 5.10-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 @@ -2647,7 +2647,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 = {