Bug 185445 - kernel dm: fix free_dev del_gendisk
kernel dm: fix free_dev del_gendisk
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Alasdair Kergon
Brian Brock
: 183664 (view as bug list)
Depends On:
Blocks: 181409
  Show dependency treegraph
Reported: 2006-03-14 15:46 EST by Alasdair Kergon
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version: RHSA-2006-0575
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-08-10 18:40:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Alasdair Kergon 2006-03-14 15:46:14 EST
From: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Don't release the minor number for reuse within device-mapper
until after del_gendisk() has released it.
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-Off-By: Alasdair G Kergon <agk@redhat.com>
Index: linux-2.6.16-rc1/drivers/md/dm.c
--- linux-2.6.16-rc1.orig/drivers/md/dm.c       2006-03-01 21:42:55.000000000 +0000
+++ linux-2.6.16-rc1/drivers/md/dm.c    2006-03-01 21:42:59.000000000 +0000
@@ -849,14 +849,16 @@ static struct mapped_device *alloc_dev(u
 static void free_dev(struct mapped_device *md)
+       unsigned int minor = md->disk->first_minor;
        if (md->suspended_bdev) {
                thaw_bdev(md->suspended_bdev, NULL);
-       free_minor(md->disk->first_minor);
+       free_minor(minor);
Comment 2 Alasdair Kergon 2006-03-14 16:22:19 EST
*** Bug 183664 has been marked as a duplicate of this bug. ***
Comment 3 Jason Baron 2006-03-28 12:48:56 EST
committed in stream u4 build 34.9. A test kernel with this patch is available
from http://people.redhat.com/~jbaron/rhel4/
Comment 7 Red Hat Bugzilla 2006-08-10 18:40:57 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.