[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070330151926.18fc12a0@gondolin.boeblingen.de.ibm.com>
Date: Fri, 30 Mar 2007 15:19:26 +0200
From: Cornelia Huck <cornelia.huck@...ibm.com>
To: Tejun Heo <htejun@...il.com>
Cc: gregkh@...e.de, hugh@...itas.com, dmitry.torokhov@...il.com,
oneukum@...e.de, maneesh@...ibm.com, rpurdie@...ys.net,
James.Bottomley@...elEye.com, Jeff Garzik <jgarzik@...ox.com>,
lkml <linux-kernel@...r.kernel.org>,
"linux-ide@...r.kernel.org" <linux-ide@...r.kernel.org>,
SCSI Mailing List <linux-scsi@...r.kernel.org>
Subject: Re: [RFD driver-core] Lifetime problems of the current driver model
On Fri, 30 Mar 2007 18:43:02 +0900,
Tejun Heo <htejun@...il.com> wrote:
> One way to solve this problem is to subordinate lifetime rule #b to
> rule #c. Each kobject points to its owning module such that grabbing
> a kobject automatically grabs the module. The problem with this
> approach is that it requires wide update and makes kobject_get
> heavier.
Shouldn't getting/putting the module refcount be solely done in
kobject.c? Grab the module reference when the kobject is created and
release the module reference in kobject_cleanup() after the release
function has been called. This doesn't make kobject_get() heavier, and
it ensures we don't delete the module until after the last kobject it is
supposed to clean up has been released.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists