Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 27922b4260f65d317aabda37e42bbbff > files > 334

kernel-2.6.18-238.el5.src.rpm

From: Tomas Henzl <thenzl@redhat.com>
Date: Sun, 29 Aug 2010 15:49:30 -0400
Subject: [block] cciss: no check busy initializing in cciss open
Message-id: <1283097002-3341-32-git-send-email-thenzl@redhat.com>
Patchwork-id: 27894
O-Subject: [RHEL6 PATCH 31/63] cciss: dont check busy initializing in cciss open
Bugzilla: 568830
RH-Acked-by: Neil Horman <nhorman@redhat.com>

Don't check h->busy_initializing in cciss_open().  Open won't be
called before things are ready, but h->busy_initializing won't be
unset until after the initial rebuild_lun_table is finished.  But,
to read the partitions, cciss_open will be called for each logical
drive during rebuild_lun_table.  If cciss_open checks h->busy_initializing,
then the reading of the partition information during the initial
rebuild_lun_table will fail, which is especially bad news if it
happens to be your boot device.

diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 67dba64..d8ec45c 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -881,7 +881,7 @@ static int cciss_open(struct inode *inode, struct file *filep)
 	printk(KERN_DEBUG "cciss_open %s\n", inode->i_bdev->bd_disk->disk_name);
 #endif				/* CCISS_DEBUG */
 
-	if (host->busy_initializing || drv->busy_configuring)
+	if (drv->busy_configuring)
 		return -EBUSY;
 	/*
 	 * Root is allowed to open raw volume zero even if it's not configured