[kernel] Modify sd_revalidate_disk patch to do a WARN_ONCE instead of silently skip

Josh Boyer jwboyer at fedoraproject.org
Tue Feb 14 16:06:45 UTC 2012


commit 7505efca073a1867229f6498bcb2ccf75d7e5f01
Author: Josh Boyer <jwboyer at redhat.com>
Date:   Tue Feb 14 11:01:47 2012 -0500

    Modify sd_revalidate_disk patch to do a WARN_ONCE instead of silently skip

 kernel.spec                                        |    1 +
 ...sd_revalidate_disk-prevent-NULL-ptr-deref.patch |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index eaa7f88..6bbaf4b 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -2350,6 +2350,7 @@ fi
 - Add patch to fix RCU usage during cpu idle (rhbz 789641)
 - Add patch to fix mce rcu splat (rhbz 789644)
 - Patch to enable CONFIG_KEYS_COMPAT on s390 from David Howells (rhbz 790367)
+- Modify sd_revalidate_disk patch to do a WARN_ONCE instead of silently skip
 
 * Tue Feb 14 2012 Josh Boyer <jwboyer at redhat.com> - 3.3.0-0.rc3.git5.1
 - Linux 3.3-rc3-git5 (upstream ce5afed937f0a823d3b00c9459409c3f5f2fbd5d)
diff --git a/scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch b/scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch
index 492376d..48db133 100644
--- a/scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch
+++ b/scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch
@@ -12,7 +12,7 @@
  	SCSI_LOG_HLQUEUE(3, sd_printk(KERN_INFO, sdkp,
  				      "sd_revalidate_disk\n"));
  
-+	if (!sdkp)
++	if (WARN_ONCE((!sdkp), "Invalid scsi_disk from %p\n", disk))
 +		goto out;
 +
 +	sdp = sdkp->device;


More information about the scm-commits mailing list