From: ebiederm@xmission.com (Eric W. Biederman)
To: Takashi Iwai <tiwai@suse.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>,
Tristan Ye <tristan.ye@suse.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] proc: Fix unbalanced hard link numbers
Date: Fri, 28 Apr 2017 21:06:56 -0500 [thread overview]
Message-ID: <877f24vuf3.fsf@xmission.com> (raw)
In-Reply-To: <20170428130015.14775-1-tiwai@suse.de> (Takashi Iwai's message of "Fri, 28 Apr 2017 15:00:15 +0200")
Takashi Iwai <tiwai@suse.de> writes:
> proc_create_mount_point() forgot to increase the parent's nlink, and
> it resulted in unbalanced hard link numbers, e.g. /proc/fs shows one
> less than expected.
Applied. Thanks.
>
> Fixes: eb6d38d5427b ("proc: Allow creating permanently empty directories...")
> Cc: stable@vger.kernel.org
> Reported-by: Tristan Ye <tristan.ye@suse.com>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
> fs/proc/generic.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/proc/generic.c b/fs/proc/generic.c
> index ee27feb34cf4..9425c0d97262 100644
> --- a/fs/proc/generic.c
> +++ b/fs/proc/generic.c
> @@ -472,6 +472,7 @@ struct proc_dir_entry *proc_create_mount_point(const char *name)
> ent->data = NULL;
> ent->proc_fops = NULL;
> ent->proc_iops = NULL;
> + parent->nlink++;
> if (proc_register(parent, ent) < 0) {
> kfree(ent);
> parent->nlink--;
prev parent reply other threads:[~2017-04-29 2:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-28 13:00 [PATCH] proc: Fix unbalanced hard link numbers Takashi Iwai
2017-04-29 2:06 ` Eric W. Biederman [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=877f24vuf3.fsf@xmission.com \
--to=ebiederm@xmission.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tiwai@suse.de \
--cc=tristan.ye@suse.com \
--cc=viro@zeniv.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.