[dm-devel] [PATCH 3/3] dm: separate device deletion from dm_put()
Alasdair G Kergon
agk at redhat.com
Fri Jul 23 17:59:01 UTC 2010
On Tue, Jun 08, 2010 at 07:27:20PM +0900, Kiyoshi Ueda wrote:
> For the unlikely case of the forced module unload, dm_destroy_nowait(),
> which doesn't wait and forcibly deletes the mapped_device, is also
> introduced and used in dm_hash_remove_all(). Otherwise, "rmmod -f"
> may be stuck and never return.
> And now, because the mapped_device is deleted at this point, subsequent
> accesses to the mapped_device may cause NULL pointer references.
Do we get a warning message logged when this situation occurs
and md->holders is still set or should we add one?
> + if (wait) {
> + while (atomic_read(&md->holders))
> + msleep(1);
Alasdair
More information about the dm-devel
mailing list