Re: [Bug 2013] New: Oops from create_dir (sysfs)

From: Greg KH
Date: Wed Feb 04 2004 - 16:08:00 EST


On Wed, Feb 04, 2004 at 02:27:22PM -0600, John Rose wrote:
> In the last couple of weeks, I've come across this crash a few times.
> In each case, my code was kobject_add()'ing a kobject to a kset that
> already contained a kobject of the same name.
>
> Granted that these additions reflected faulty logic on the part of my
> code, but I was suprised that kobject_add didn't have a more intelligent
> response than crashing while creating the redundant sysfs dir.
>
> Thoughts?

The kobject code quickly pointed out the flaw in your code. Sounds like
the proper response to me :)

thanks,

greg k-h
-
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/