summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Boyer <jwboyer@fedoraproject.org>2014-10-08 12:20:56 -0400
committerJosh Boyer <jwboyer@fedoraproject.org>2014-10-08 12:20:58 -0400
commita3dbb48a2c8bd21beda72f66952f08b59d69064a (patch)
tree0b0bf383c80f96cf2bbc555a7894683c3c3eae91
parentda99f20f026faababa016afb0c23cc8af405f4ee (diff)
downloadkernel-a3dbb48a2c8bd21beda72f66952f08b59d69064a.tar.gz
kernel-a3dbb48a2c8bd21beda72f66952f08b59d69064a.tar.xz
kernel-a3dbb48a2c8bd21beda72f66952f08b59d69064a.zip
Add patch to fix ATA blacklist
-rw-r--r--kernel.spec5
-rw-r--r--libata-Un-break-ATA-blacklist.patch51
2 files changed, 56 insertions, 0 deletions
diff --git a/kernel.spec b/kernel.spec
index 0c75739e1..4f395a1ee 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -617,6 +617,8 @@ Patch26029: KEYS-Reinstate-EPERM-for-a-key-type-name-beginning-w.patch
Patch26030: GFS2-Make-rename-not-save-dirent-location.patch
+Patch26031: libata-Un-break-ATA-blacklist.patch
+
# git clone ssh://git.fedorahosted.org/git/kernel-arm64.git, git diff master...devel
Patch30000: kernel-arm64.patch
@@ -1346,6 +1348,8 @@ ApplyPatch KEYS-Reinstate-EPERM-for-a-key-type-name-beginning-w.patch
ApplyPatch GFS2-Make-rename-not-save-dirent-location.patch
+ApplyPatch libata-Un-break-ATA-blacklist.patch
+
%if 0%{?aarch64patches}
ApplyPatch kernel-arm64.patch
%ifnarch aarch64 # this is stupid, but i want to notice before secondary koji does.
@@ -2218,6 +2222,7 @@ fi
- Linux v3.17-2860-gef0625b70dac
- Reenable debugging options.
- Temporarily disable aarch64patches
+- Add patch to fix ATA blacklist
* Tue Oct 07 2014 Josh Boyer <jwboyer@fedoraproject.org>
- Add patch to fix GFS2 regression (from Bob Peterson)
diff --git a/libata-Un-break-ATA-blacklist.patch b/libata-Un-break-ATA-blacklist.patch
new file mode 100644
index 000000000..e8d70ba66
--- /dev/null
+++ b/libata-Un-break-ATA-blacklist.patch
@@ -0,0 +1,51 @@
+From: George Spelvin <linux@horizon.com>
+Date: Tue, 7 Oct 2014 07:26:38 -0400
+Subject: [PATCH] libata: Un-break ATA blacklist
+
+lib/glob.c provides a new glob_match() function, with arguments in
+(pattern, string) order. It replaced a private function with arguments
+in (string, pattern) order, but I didn't swap the call site...
+
+The result was the entire ATA blacklist was effectively disabled.
+
+The lesson for today is "I f***ed up *how* badly *how* many months ago?",
+er, I mean "Nobody Tests RC Kernels On Legacy Hardware".
+
+This was not a subtle break, but it made it through an entire RC
+cycle unreported, presumably because all the people doing testing
+have full-featured hardware.
+
+(FWIW, the reason for the argument swap was because fnmatch() does it that
+way, and for a while implementing a full fnmatch() was being considered.)
+
+Fixes: 428ac5fc056e0 (libata: Use glob_match from lib/glob.c)
+Reported-by: Steven Honeyman <stevenhoneyman@gmail.com>
+Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=71371#c21
+Signed-off-by: George Spelvin <linux@horizon.com>
+Cc: <stable@vger.kernel.org> # 3.17
+Tested-by: Steven Honeyman <stevenhoneyman@gmail.com>
+Signed-off-by: Tejun Heo <tj@kernel.org>
+---
+ drivers/ata/libata-core.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
+index f3e7b9f894cd..6f674906c64c 100644
+--- a/drivers/ata/libata-core.c
++++ b/drivers/ata/libata-core.c
+@@ -4261,10 +4261,10 @@ static unsigned long ata_dev_blacklisted(const struct ata_device *dev)
+ ata_id_c_string(dev->id, model_rev, ATA_ID_FW_REV, sizeof(model_rev));
+
+ while (ad->model_num) {
+- if (glob_match(model_num, ad->model_num)) {
++ if (glob_match(ad->model_num, model_num)) {
+ if (ad->model_rev == NULL)
+ return ad->horkage;
+- if (glob_match(model_rev, ad->model_rev))
++ if (glob_match(ad->model_rev, model_rev))
+ return ad->horkage;
+ }
+ ad++;
+--
+1.9.3
+