[kernel/f15] Revert two SCSI/block patches from 2.6.38.6; drop now-unneeded followon patches
Chuck Ebbert
cebbert at fedoraproject.org
Wed Jul 6 12:35:09 UTC 2011
commit 58f6f59b9e3f244aa5c825d9ca457649fcf9138a
Author: Chuck Ebbert <cebbert at redhat.com>
Date: Wed Jul 6 08:35:22 2011 -0400
Revert two SCSI/block patches from 2.6.38.6; drop now-unneeded followon patches
block-export-blk_-get-put-_queue.patch | 39 ------------------
block-queue-refcount.patch | 43 --------------------
kernel.spec | 14 +++++--
revert-fix-oops-in-scsi_run_queue.patch | 21 ++++++++++
...-put-stricter-guards-on-queue-dead-checks.patch | 34 +++++++++++++++
5 files changed, 65 insertions(+), 86 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index 5211df6..5b47d3b 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -664,8 +664,8 @@ Patch570: linux-2.6-selinux-mprotect-checks.patch
Patch580: linux-2.6-sparc-selinux-mprotect-checks.patch
# scsi / block
-Patch600: block-queue-refcount.patch
-Patch601: block-export-blk_-get-put-_queue.patch
+Patch600: revert-fix-oops-in-scsi_run_queue.patch
+Patch601: revert-put-stricter-guards-on-queue-dead-checks.patch
Patch602: block-blkdev_get-should-access-bd_disk-only-after.patch
Patch603: cfq-iosched-fix-locking-around-ioc-ioc-data-assignment.patch
@@ -1313,8 +1313,10 @@ ApplyPatch x86-pci-preserve-existing-pci-bfsort-whitelist-for-dell-systems.patch
#
# SCSI / block Bits.
#
-ApplyPatch block-queue-refcount.patch
-ApplyPatch block-export-blk_-get-put-_queue.patch
+# Revert SCSI patches from 2.6.38.6 that cause more problems thatn they solve
+ApplyPatch revert-fix-oops-in-scsi_run_queue.patch
+ApplyPatch revert-put-stricter-guards-on-queue-dead-checks.patch
+# Fix potential NULL deref in 2.6.38.8
ApplyPatch block-blkdev_get-should-access-bd_disk-only-after.patch
# rhbz#577968
ApplyPatch cfq-iosched-fix-locking-around-ioc-ioc-data-assignment.patch
@@ -2065,6 +2067,10 @@ fi
# and build.
%changelog
+* Wed Jul 06 2011 Chuck Ebbert <cebbert at redhat.com>
+- Revert SCSI/block patches from 2.6.38.6 that caused more problems
+ than they fixed; drop band-aid patch attempting to fix the fix.
+
* Mon Jun 27 2011 Dave Jones <davej at redhat.com>
- Disable CONFIG_CRYPTO_MANAGER_DISABLE_TESTS, as this also disables FIPS (rhbz 716942)
diff --git a/revert-fix-oops-in-scsi_run_queue.patch b/revert-fix-oops-in-scsi_run_queue.patch
new file mode 100644
index 0000000..3170ed8
--- /dev/null
+++ b/revert-fix-oops-in-scsi_run_queue.patch
@@ -0,0 +1,21 @@
+revert c055f5b2614b4f758ae6cc86733f31fa4c2c5844 from 2.6.38.6
+
+--- b/drivers/scsi/scsi_lib.c
++++ a/drivers/scsi/scsi_lib.c
+@@ -400,15 +400,10 @@
+ static void scsi_run_queue(struct request_queue *q)
+ {
+ struct scsi_device *sdev = q->queuedata;
++ struct Scsi_Host *shost = sdev->host;
+- struct Scsi_Host *shost;
+ LIST_HEAD(starved_list);
+ unsigned long flags;
+
+- /* if the device is dead, sdev will be NULL, so no queue to run */
+- if (!sdev)
+- return;
+-
+- shost = sdev->host;
+ if (scsi_target(sdev)->single_lun)
+ scsi_single_lun_run(sdev);
+
diff --git a/revert-put-stricter-guards-on-queue-dead-checks.patch b/revert-put-stricter-guards-on-queue-dead-checks.patch
new file mode 100644
index 0000000..7acd412
--- /dev/null
+++ b/revert-put-stricter-guards-on-queue-dead-checks.patch
@@ -0,0 +1,34 @@
+reverte 86cbfb5607d4b81b1a993ff689bbd2addd5d3a9b from 2.6.38.6
+
+--- b/drivers/scsi/scsi_sysfs.c
++++ a/drivers/scsi/scsi_sysfs.c
+@@ -322,8 +322,14 @@
+ kfree(evt);
+ }
+
++ if (sdev->request_queue) {
++ sdev->request_queue->queuedata = NULL;
++ /* user context needed to free queue */
++ scsi_free_queue(sdev->request_queue);
++ /* temporary expedient, try to catch use of queue lock
++ * after free of sdev */
++ sdev->request_queue = NULL;
++ }
+- /* NULL queue means the device can't be used */
+- sdev->request_queue = NULL;
+
+ scsi_target_reap(scsi_target(sdev));
+
+@@ -931,12 +937,6 @@
+ if (sdev->host->hostt->slave_destroy)
+ sdev->host->hostt->slave_destroy(sdev);
+ transport_destroy_device(dev);
+-
+- /* cause the request function to reject all I/O requests */
+- sdev->request_queue->queuedata = NULL;
+-
+- /* Freeing the queue signals to block that we're done */
+- scsi_free_queue(sdev->request_queue);
+ put_device(dev);
+ }
+
More information about the scm-commits
mailing list