Messages in this thread | | | Date | Tue, 14 Nov 2006 21:48:47 +0100 | From | Pierre Ossman <> | Subject | Re: How to cleanly shut down a block device |
| |
Pierre Ossman wrote: > How about this patch? It is basically the same as the previous, but it > also sets queuedata to NULL and tests for that. It does not address if > someone still has dependencies on the queue but hasn't gotten itself a > reference (as I haven't gotten any word on if that is a problem):
Ok, I've done some more digging through the block layer. A lot of voodoo in there, but gendisk seems to make sure it has its own reference to the queue.
As gendisk drops it reference to the queue in del_gendisk(), I have to assume that is would be invalid for any part of kernel to look at disk->queue at this point (since it might now have been released).
So I think this patch should cover all bases. It cleanly kills of our extra thread and also handles any requests that might be left behind.
I hope you can look at this soon as I'm eager to get rid of this oops.
Rgds
-- -- Pierre Ossman
Linux kernel, MMC maintainer http://www.kernel.org PulseAudio, core developer http://pulseaudio.org rdesktop, core developer http://www.rdesktop.org - 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/
| |