Re: 2.6.6-mm1: nameif causes oops

From: Chris Wright
Date: Thu May 13 2004 - 13:12:56 EST


* Jurriaan (thunder7@xxxxxxxxx) wrote:
> In my untainted 2.6.6-mm1 kernel, I see an oops (the one with the turtle
> graphics) when booting, caused by the usage of nameif (which renames
> ethernet interfaces from 'eth0' to 'adsl' for example).

This has been reported a few other times and Maneesh Soni <maneesh@xxxxxxxxxx>
posted a patch already. I added it below.

thanks,
-chris
--
Linux Security Modules http://lsm.immunix.org http://lsm.bkbits.net


ok it is sysfs related and because of the backing store patches from me.

And here is the fix. Hope this solves your problem.


Thanks
Maneesh

o Fix sysfs_rename_dir(). The sysfs_lookup() does not hash
negative dentries so just hash it before calling d_move

fs/sysfs/dir.c | 1 +
1 files changed, 1 insertion(+)

diff -puN fs/sysfs/dir.c~sysfs-backing-store-sysfs_rename_dir-fix fs/sysfs/dir.c
--- linux-2.6.6-mm1/fs/sysfs/dir.c~sysfs-backing-store-sysfs_rename_dir-fix 2004-10-06 15:21:37.000000000 +0530
+++ linux-2.6.6-mm1-maneesh/fs/sysfs/dir.c 2004-10-06 15:22:03.000000000 +0530
@@ -314,6 +314,7 @@ void sysfs_rename_dir(struct kobject * k
new_dentry = sysfs_get_dentry(parent, new_name);
if (!IS_ERR(new_dentry)) {
if (!new_dentry->d_inode) {
+ d_add(new_dentry, NULL);
d_move(kobj->dentry, new_dentry);
kobject_set_name(kobj,new_name);
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/