From: "J. Bruce Fields" <bfields@fieldses.org>
To: Masatake YAMATO <yamato@redhat.com>
Cc: linux-nfs@vger.kernel.org, steved@redhat.com
Subject: Re: [PATCH] closing fd associated with /proc/fs/nfsd/export_features
Date: Tue, 12 Jul 2011 06:46:52 -0400 [thread overview]
Message-ID: <20110712104652.GA2162@fieldses.org> (raw)
In-Reply-To: <20110712.114700.814616059257545652.yamato@redhat.com>
On Tue, Jul 12, 2011 at 11:47:00AM +0900, Masatake YAMATO wrote:
> A fd associated with /proc/fs/nfsd/export_features opened in get_export_features is
> not closed.
>
>
> Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Acked-by: J. Bruce Fields <bfields@redhat.com>
>
> diff --git a/support/nfs/exports.c b/support/nfs/exports.c
> index c250383..819a18a 100644
> --- a/support/nfs/exports.c
> +++ b/support/nfs/exports.c
> @@ -787,6 +787,7 @@ struct export_features *get_export_features(void)
> fd = read(fd, buf, 50);
> if (fd == -1)
> goto err;
> + close(fd);
> c = sscanf(buf, "%x %x", &ef.flags, &ef.secinfo_flags);
> if (c != 2)
> goto err;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-07-12 10:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-12 2:47 [PATCH] closing fd associated with /proc/fs/nfsd/export_features Masatake YAMATO
2011-07-12 10:46 ` J. Bruce Fields [this message]
2011-07-12 12:38 ` [PATCH v2] " Masatake YAMATO
2011-07-12 13:01 ` [PATCH v3] " Masatake YAMATO
2011-07-12 14:03 ` Steve Dickson
2011-07-12 14:20 ` 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=20110712104652.GA2162@fieldses.org \
--to=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
--cc=steved@redhat.com \
--cc=yamato@redhat.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;
as well as URLs for NNTP newsgroup(s).