[dm-devel] [PATCH] dm free minor after unlink gendisk

Jun'ichi Nomura j-nomura at ce.jp.nec.com
Fri Feb 24 17:27:34 UTC 2006


Hello,

free_dev() releases minor number before unregistering gendisk.
It creates a window where two registered gendisk with same number
exist, which will cause problem.

Typically, if you run the following script,
you will hit WARN_ON() in kref_get().

#!/bin/sh
(while dmsetup create a --notable; do dmsetup remove a; done) &
(while dmsetup create b --notable; do dmsetup remove b; done) &

Attached patch fixes this problem.

-- 
Jun'ichi Nomura, NEC Solutions (America), Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dm-free-minor-after-del_gendisk.patch
Type: text/x-patch
Size: 813 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20060224/e90366ce/attachment.bin>


More information about the dm-devel mailing list