[kernel] r14812 - in dists/lenny/linux-2.6/debian: . patches/bugfix/s390 patches/series
Dann Frazier
dannf at alioth.debian.org
Thu Dec 24 08:23:39 UTC 2009
Author: dannf
Date: Thu Dec 24 08:23:37 2009
New Revision: 14812
Log:
s390: dasd diag - add support for read-only minidisks (Closes: #550898)
Added:
dists/lenny/linux-2.6/debian/patches/bugfix/s390/dasd-support-DIAG-access-for-ro-devices.patch
Modified:
dists/lenny/linux-2.6/debian/changelog
dists/lenny/linux-2.6/debian/patches/series/21
Modified: dists/lenny/linux-2.6/debian/changelog
==============================================================================
--- dists/lenny/linux-2.6/debian/changelog Thu Dec 24 08:18:19 2009 (r14811)
+++ dists/lenny/linux-2.6/debian/changelog Thu Dec 24 08:23:37 2009 (r14812)
@@ -38,6 +38,7 @@
(CVE-2009-4138)
* ext4: Avoid null pointer dereference when decoding EROFS w/o a journal
(CVE-2009-4308)
+ * s390: dasd diag - add support for read-only minidisks (Closes: #550898)
-- Ben Hutchings <ben at decadent.org.uk> Sat, 24 Oct 2009 23:45:45 +0100
Added: dists/lenny/linux-2.6/debian/patches/bugfix/s390/dasd-support-DIAG-access-for-ro-devices.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/lenny/linux-2.6/debian/patches/bugfix/s390/dasd-support-DIAG-access-for-ro-devices.patch Thu Dec 24 08:23:37 2009 (r14812)
@@ -0,0 +1,66 @@
+commit 22825ab7693fd29769518a0d25ba43c01a50092a
+Author: Stefan Weinhuber <wein at de.ibm.com>
+Date: Mon Dec 7 12:51:48 2009 +0100
+
+ [S390] dasd: support DIAG access for read-only devices
+
+ When a DASD device is used with the DIAG discipline, the DIAG
+ initialization will indicate success or error with a respective
+ return code. So far we have interpreted a return code of 4 as error,
+ but it actually means that the initialization was successful, but
+ the device is read-only. To allow read-only devices to be used with
+ DIAG we need to accept a return code of 4 as success.
+
+ Re-initialization of the DIAG access is also part of the DIAG error
+ recovery. If we find that the access mode of a device has been
+ changed from writable to read-only while the device was in use,
+ we print an error message.
+
+ Signed-off-by: Stefan Weinhuber <wein at de.ibm.com>
+ Signed-off-by: Martin Schwidefsky <schwidefsky at de.ibm.com>
+
+Backported to Debian's 2.6.26 by dann frazier <dannf at debian.org>
+
+diff -urpN linux-source-2.6.26.orig/drivers/s390/block/dasd_diag.c linux-source-2.6.26/drivers/s390/block/dasd_diag.c
+--- linux-source-2.6.26.orig/drivers/s390/block/dasd_diag.c 2008-07-13 15:51:29.000000000 -0600
++++ linux-source-2.6.26/drivers/s390/block/dasd_diag.c 2009-12-24 01:16:01.000000000 -0700
+@@ -143,6 +143,15 @@ dasd_diag_erp(struct dasd_device *device
+
+ mdsk_term_io(device);
+ rc = mdsk_init_io(device, device->block->bp_block, 0, NULL);
++ if (rc == 4) {
++ if (!(device->features & DASD_FEATURE_READONLY)) {
++ dev_warn(&device->cdev->dev,
++ "The access mode of a DIAG device changed"
++ " to read-only");
++ device->features |= DASD_FEATURE_READONLY;
++ }
++ rc = 0;
++ }
+ if (rc)
+ DEV_MESSAGE(KERN_WARNING, device, "DIAG ERP unsuccessful, "
+ "rc=%d", rc);
+@@ -428,16 +437,20 @@ dasd_diag_check_device(struct dasd_devic
+ for (sb = 512; sb < bsize; sb = sb << 1)
+ block->s2b_shift++;
+ rc = mdsk_init_io(device, block->bp_block, 0, NULL);
+- if (rc) {
++ if (rc && (rc != 4)) {
+ DEV_MESSAGE(KERN_WARNING, device, "DIAG initialization "
+ "failed (rc=%d)", rc);
+ rc = -EIO;
+ } else {
++ if (rc == 4)
++ device->features |= DASD_FEATURE_READONLY;
+ DEV_MESSAGE(KERN_INFO, device,
+- "(%ld B/blk): %ldkB",
++ "(%ld B/blk): %ldkB%s",
+ (unsigned long) block->bp_block,
+ (unsigned long) (block->blocks <<
+- block->s2b_shift) >> 1);
++ block->s2b_shift) >> 1,
++ (rc == 4) ? ", read-only device" : "");
++ rc = 0;
+ }
+ out:
+ free_page((long) label);
Modified: dists/lenny/linux-2.6/debian/patches/series/21
==============================================================================
--- dists/lenny/linux-2.6/debian/patches/series/21 Thu Dec 24 08:18:19 2009 (r14811)
+++ dists/lenny/linux-2.6/debian/patches/series/21 Thu Dec 24 08:23:37 2009 (r14812)
@@ -41,3 +41,4 @@
+ bugfix/x86/kvm-limit-instructions-to-15-bytes.patch
+ bugfix/all/firewire-ohci-handle-receive-packets-with-a-data-length-of-zero.patch
+ bugfix/all/ext4-avoid-null-pointer-deref-when-decoding-EROFS-wo-a-journal.patch
++ bugfix/s390/dasd-support-DIAG-access-for-ro-devices.patch
More information about the Kernel-svn-changes
mailing list