From: Jeff Layton <jlayton@kernel.org>
To: Mahmoud Adam <mngyadam@amazon.com>, chuck.lever@oracle.com
Cc: neilb@suse.de, kolga@netapp.com, Dai.Ngo@oracle.com,
tom@talpey.com, linux-nfs@vger.kernel.org
Subject: Re: [PATCH] nfsd: fix file memleak on client_opens_relaese
Date: Fri, 10 Nov 2023 16:35:07 -0500 [thread overview]
Message-ID: <22cdd93c7a083fc4b6e6a1a02eeba174bcb8ca24.camel@kernel.org> (raw)
In-Reply-To: <20231110182104.23039-1-mngyadam@amazon.com>
On Fri, 2023-11-10 at 19:21 +0100, Mahmoud Adam wrote:
> 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
Reviewed-by: Jeff Layton <jlayton@kernel.org>
prev parent reply other threads:[~2023-11-10 21:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-10 18:21 [PATCH] nfsd: fix file memleak on client_opens_relaese Mahmoud Adam
2023-11-10 21:31 ` NeilBrown
2023-11-10 21:55 ` Chuck Lever III
2023-11-10 21:35 ` Jeff Layton [this message]
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=22cdd93c7a083fc4b6e6a1a02eeba174bcb8ca24.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=Dai.Ngo@oracle.com \
--cc=chuck.lever@oracle.com \
--cc=kolga@netapp.com \
--cc=linux-nfs@vger.kernel.org \
--cc=mngyadam@amazon.com \
--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