Re: [RFC/PATCH] Add sysfs control to modify a user's cpu share

Srivatsa Vaddagiri
2007-10-01T15:22:23Z

On Mon, Oct 01, 2007 at 04:44:02PM +0200, Ingo Molnar wrote:
> but there seems to be a bug in it, i get this:
>
> kobject_add failed for 500 with -EEXIST, don't try to register things with the same name in the same directory.

Looks like a remove_dir/create_dir race ..

free_user() alloc_uid()

uid_hash_remove(up);

uid_hash_insert(new, hashent);

schedule_work()
user_kobject_create();
kobject_add(); -> Boom!

remove_user_sysfs_dir();

/me looks up sysfs programming examples ..

--
Regards,
vatsa