From: Olga Kornievskaia <aglo@umich.edu>
To: Dan Carpenter <dan.carpenter@oracle.com>,
"J. Bruce Fields" <bfields@redhat.com>
Cc: Olga Kornievskaia <kolga@netapp.com>,
Chuck Lever <chuck.lever@oracle.com>,
linux-nfs <linux-nfs@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] nfsd4: fix double free in nfsd4_do_async_copy()
Date: Tue, 21 Jan 2020 16:56:31 -0500 [thread overview]
Message-ID: <CAN-5tyEEPq6JX7mMRwX+7DTJJ3zy3-=SVqfqQyXvvbOQxqgDJQ@mail.gmail.com> (raw)
In-Reply-To: <20200113132307.frp6ur5zhzolu5ys@kili.mountain>
On Mon, Jan 13, 2020 at 8:24 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> This frees "copy->nf_src" before and again after the goto.
>
> Fixes: ce0887ac96d3 ("NFSD add nfs4 inter ssc to nfsd4_copy")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> fs/nfsd/nfs4proc.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
> index 1e14b3ed5674..c90c24c35b2e 100644
> --- a/fs/nfsd/nfs4proc.c
> +++ b/fs/nfsd/nfs4proc.c
> @@ -1469,7 +1469,6 @@ static int nfsd4_do_async_copy(void *data)
> copy->nf_src->nf_file = nfs42_ssc_open(copy->ss_mnt, ©->c_fh,
> ©->stateid);
> if (IS_ERR(copy->nf_src->nf_file)) {
> - kfree(copy->nf_src);
> copy->nfserr = nfserr_offload_denied;
> nfsd4_interssc_disconnect(copy->ss_mnt);
> goto do_callback;
> --
> 2.11.0
>
Reviewed-by: Olga Kornievskaia <kolga@netapp.com>
Bruce, can you add this to your nfsd-next?
next prev parent reply other threads:[~2020-01-21 21:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-13 13:23 [PATCH] nfsd4: fix double free in nfsd4_do_async_copy() Dan Carpenter
2020-01-21 21:56 ` Olga Kornievskaia [this message]
2020-01-30 14:56 ` J. Bruce Fields
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='CAN-5tyEEPq6JX7mMRwX+7DTJJ3zy3-=SVqfqQyXvvbOQxqgDJQ@mail.gmail.com' \
--to=aglo@umich.edu \
--cc=bfields@redhat.com \
--cc=chuck.lever@oracle.com \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kolga@netapp.com \
--cc=linux-nfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).