From: Jiri Slaby <jslaby@suse.cz>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Greg KH <greg@kroah.com>, Greg Kroah-Hartman <gregkh@suse.de>,
LKML <linux-kernel@vger.kernel.org>,
ML netdev <netdev@vger.kernel.org>,
Kay Sievers <kay.sievers@vrfy.org>
Subject: Re: [PATCH] sysfs: Update the name hash when renaming sysfs entries
Date: Tue, 31 Jan 2012 15:41:36 +0100 [thread overview]
Message-ID: <4F27FDA0.6090806@suse.cz> (raw)
In-Reply-To: <m1zkd45411.fsf_-_@fess.ebiederm.org>
On 01/31/2012 03:40 PM, Eric W. Biederman wrote:
>
> This fixes a bug introduced with sysfs name hashes where renaming a
> network device appears to succeed but silently makes the sysfs files for
> that network device inaccessible.
>
> In at least one configuration this bug has stopped networking from
> coming up during boot.
>
> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
It works for me. Thanks.
Tested-by: Jiri Slaby <jslaby@suse.cz>
> ---
> fs/sysfs/dir.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
> index ea64d01..dd3779c 100644
> --- a/fs/sysfs/dir.c
> +++ b/fs/sysfs/dir.c
> @@ -872,6 +872,7 @@ int sysfs_rename(struct sysfs_dirent *sd,
>
> dup_name = sd->s_name;
> sd->s_name = new_name;
> + sd->s_hash = sysfs_name_hash(sd->s_ns, sd->s_name);
> }
>
> /* Move to the appropriate place in the appropriate directories rbtree. */
--
js
suse labs
next prev parent reply other threads:[~2012-01-31 14:41 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4F27120A.4040106@suse.cz>
[not found] ` <CAPXgP12Sr2KzGJ9RA13QBOCkctb-z3O4+1uHOjANgMDDv2pxaQ@mail.gmail.com>
2012-01-31 10:41 ` network regression: cannot rename netdev twice Jiri Slaby
2012-01-31 10:52 ` Kay Sievers
2012-01-31 11:00 ` Jiri Slaby
2012-01-31 11:13 ` Kay Sievers
2012-01-31 11:17 ` Jiri Slaby
2012-01-31 11:58 ` Kay Sievers
2012-01-31 14:18 ` Eric W. Biederman
2012-01-31 14:40 ` [PATCH] sysfs: Update the name hash when renaming sysfs entries Eric W. Biederman
2012-01-31 14:41 ` Jiri Slaby [this message]
2012-01-31 14:55 ` Greg KH
2012-02-04 2:14 ` network regression: cannot rename netdev twice Henrique de Moraes Holschuh
2012-02-06 20:03 ` Kay Sievers
2012-02-08 2:00 ` Henrique de Moraes Holschuh
2012-02-08 3:50 ` Kay Sievers
2012-02-08 6:42 ` Valdis.Kletnieks
2012-02-08 10:57 ` Kay Sievers
2012-02-08 20:06 ` Valdis.Kletnieks
2012-02-08 20:27 ` Stephen Hemminger
2012-02-08 23:48 ` Kay Sievers
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=4F27FDA0.6090806@suse.cz \
--to=jslaby@suse.cz \
--cc=ebiederm@xmission.com \
--cc=greg@kroah.com \
--cc=gregkh@suse.de \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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).