lkml.org 
[lkml]   [2006]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Bug? Report] kref problem
Greg KH wrote:
> If you use decl_subsys(), you should be fine for this. Use that instead
> of trying to roll your own subsystem kobjects please. That
> infrastructure was written for a reason...
Ok, I see, thanks. I just thought that this subsystem stuff will oblige
me to use the device/driver/bus model which does not suit me.

> Data (kobjects) have a different lifespan than code (modules).
> Seperating them is a good idea, and if not, your reference counting
> issues can be quite nasty. See the recent EDAC fiasco for a good
> example of how easy it is to mess things up in this manner.

My logic was that the lifetime of that kobject = lifetime of my module
because I cannot remove the module because every it's user increments
the module's refcount. So, if refcount of my module is zero then the
kobject's refcount is zero. Why this doesn't this work?

Note, I do not object, I agree that in general you're right, I'm just
wonering.

--
Best Regards,
Artem B. Bityutskiy,
St.-Petersburg, Russia.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-16 19:11    [W:0.125 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site