From: Mahmoud Adam <mngyadam@amazon.com>
To: <chuck.lever@oracle.com>, <jlayton@kernel.org>
Cc: <neilb@suse.de>, <kolga@netapp.com>, <Dai.Ngo@oracle.com>,
<tom@talpey.com>, <linux-nfs@vger.kernel.org>,
Mahmoud Adam <mngyadam@amazon.com>
Subject: [PATCH] nfsd: fix file memleak on client_opens_relaese
Date: Fri, 10 Nov 2023 19:21:04 +0100 [thread overview]
Message-ID: <20231110182104.23039-1-mngyadam@amazon.com> (raw)
seq_release should be called to free the allocated seq_file
Cc: stable@vger.kernel.org # v5.3+
Signed-off-by: Mahmoud Adam <mngyadam@amazon.com>
---
fs/nfsd/nfs4state.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 4045c852a450..40415929e2ae 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2804,7 +2804,7 @@ static int client_opens_release(struct inode *inode, struct file *file)
/* 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 = {
--
2.40.1
next reply other threads:[~2023-11-10 18:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-10 18:21 Mahmoud Adam [this message]
2023-11-10 21:31 ` [PATCH] nfsd: fix file memleak on client_opens_relaese NeilBrown
2023-11-10 21:55 ` Chuck Lever III
2023-11-10 21:35 ` Jeff Layton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231110182104.23039-1-mngyadam@amazon.com \
--to=mngyadam@amazon.com \
--cc=Dai.Ngo@oracle.com \
--cc=chuck.lever@oracle.com \
--cc=jlayton@kernel.org \
--cc=kolga@netapp.com \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=tom@talpey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox