[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070330165251.7beffc7c@gondolin.boeblingen.de.ibm.com>
Date: Fri, 30 Mar 2007 16:52:51 +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 22:58:39 +0900,
Tejun Heo <htejun@...il.com> wrote:
> It's a little bit more convoluted than that. Module reference count of
> zero doesn't indicate that there is no one referencing the module. It
> just means that the module can be unloaded. ie. There still can be any
> number of kobjects with release function backed by the module but as
> long as all of them can be deleted and released by module exit function,
> the module is unloadable at that point.
>
> IOW, module reference count does not count number of objects depending
> on the module. It counts the number of active usages of those objects.
We must make sure that the module is never deleted while there may be
calls to ->release functions - the exit function can only return when
all ->release calls have returned. This can be guaranteed if we (1)
don't allow the module to unload if there are outstanding kobjects (we
may need a "self destruct" knob then) or (2) make sure the ->release
functions are outside of the module (see, for example,
drivers/s390/s390_rdev.c).
(Gah, that stuff is always giving me headaches. Sorry if I'm not making
sense...)
-
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