From: "J. Bruce Fields" <bfields@fieldses.org>
To: Dan Carpenter <error27@gmail.com>
Cc: Neil Brown <neilb@suse.de>,
Trond Myklebust <Trond.Myklebust@netapp.com>,
linux-nfs@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] nfsd: potential ERR_PTR dereference on exp_export() error paths.
Date: Thu, 22 Apr 2010 11:59:48 -0400 [thread overview]
Message-ID: <20100422155948.GE5926@fieldses.org> (raw)
In-Reply-To: <20100422093059.GJ29647@bicker>
On Thu, Apr 22, 2010 at 11:30:59AM +0200, Dan Carpenter wrote:
> We "goto finish" from several places where "exp" is an ERR_PTR. Also I
> changed the check for "fsid_key" so that it was consistent with the check
> I added.
OK, thanks; applied.
--b.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
>
> diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
> index 872a5ef..bfe6f3f 100644
> --- a/fs/nfsd/export.c
> +++ b/fs/nfsd/export.c
> @@ -1071,9 +1071,9 @@ exp_export(struct nfsctl_export *nxp)
> err = 0;
> finish:
> kfree(new.ex_pathname);
> - if (exp)
> + if (!IS_ERR_OR_NULL(exp))
> exp_put(exp);
> - if (fsid_key && !IS_ERR(fsid_key))
> + if (!IS_ERR_OR_NULL(fsid_key))
> cache_put(&fsid_key->h, &svc_expkey_cache);
> path_put(&path);
> out_put_clp:
prev parent reply other threads:[~2010-04-22 15:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-22 9:30 [patch] nfsd: potential ERR_PTR dereference on exp_export() error paths Dan Carpenter
2010-04-22 15:59 ` J. Bruce Fields [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=20100422155948.GE5926@fieldses.org \
--to=bfields@fieldses.org \
--cc=Trond.Myklebust@netapp.com \
--cc=error27@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
/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