lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101223100956.GA15625@htj.dyndns.org>
Date:	Thu, 23 Dec 2010 11:09:56 +0100
From:	Tejun Heo <htejun@...il.com>
To:	James Bottomley <James.Bottomley@...e.de>
Cc:	Jens Axboe <axboe@...nel.dk>,
	linux-scsi <linux-scsi@...r.kernel.org>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: Boot failure with block/for-next

Hello, James.

On Wed, Dec 22, 2010 at 10:31:13PM -0600, James Bottomley wrote:
 > Actually, surprisingly, bisection confirms it's this patch:
 > 
 > Author: Tejun Heo <tj@...nel.org>
 > Date:   Wed Dec 8 20:57:42 2010 +0100
 > 
 >     sd: implement sd_check_events()
 > 
 > I can't quite see how yet.

Does the following patch fix the problem?  Thanks.

Subject: sd: don't clear media presence unless it's removable

set_media_not_present() can be called for a non-removable device if it
raises UA for whatever reason; however, block layer calls into
sd_check_events() only if the device is removable.  As the function is
responsible for setting media presence, sd continues to think that
media is missing on the non-removable device making it inaccessible.

This patch makes set_media_not_present() clear media presence iff the
device is removable.

Signed-off-by: Tejun Heo <tj@...nel.org>
---
 drivers/scsi/sd.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Index: work/drivers/scsi/sd.c
===================================================================
--- work.orig/drivers/scsi/sd.c
+++ work/drivers/scsi/sd.c
@@ -993,8 +993,11 @@ static void set_media_not_present(struct
 {
 	if (sdkp->media_present)
 		sdkp->device->changed = 1;
-	sdkp->media_present = 0;
-	sdkp->capacity = 0;
+
+	if (sdkp->device->removable) {
+		sdkp->media_present = 0;
+		sdkp->capacity = 0;
+	}
 }
 
 static int media_not_present(struct scsi_disk *sdkp,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ