From: Greg Kroah-Hartman Date: Tue, 14 Oct 2014 01:26:24 +0000 (+0200) Subject: 3.17-stable patches X-Git-Tag: v3.17.1~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=28c36d96e8d8660df230e3f5b2dbf0e025db50a7;p=thirdparty%2Fkernel%2Fstable-queue.git 3.17-stable patches added patches: libata-un-break-ata-blacklist.patch --- diff --git a/queue-3.17/libata-un-break-ata-blacklist.patch b/queue-3.17/libata-un-break-ata-blacklist.patch new file mode 100644 index 00000000000..8e47953623f --- /dev/null +++ b/queue-3.17/libata-un-break-ata-blacklist.patch @@ -0,0 +1,53 @@ +From 1c40279960bcd7d52dbdf1d466b20d24b99176c8 Mon Sep 17 00:00:00 2001 +From: George Spelvin +Date: Tue, 7 Oct 2014 07:26:38 -0400 +Subject: libata: Un-break ATA blacklist + +From: George Spelvin + +commit 1c40279960bcd7d52dbdf1d466b20d24b99176c8 upstream. + +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 +Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=71371#c21 +Signed-off-by: George Spelvin +Tested-by: Steven Honeyman +Signed-off-by: Tejun Heo +Cc: Henrique de Moraes Holschuh +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/ata/libata-core.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/ata/libata-core.c ++++ b/drivers/ata/libata-core.c +@@ -4261,10 +4261,10 @@ static unsigned long ata_dev_blacklisted + 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++; diff --git a/queue-3.17/series b/queue-3.17/series index a2babbd1e9d..8033f409a47 100644 --- a/queue-3.17/series +++ b/queue-3.17/series @@ -23,3 +23,4 @@ usb-add-device-quirk-for-asus-t100-base-station-keyboard.patch crypto-caam-fix-addressing-of-struct-member.patch driver-base-node-remove-unnecessary-kfree-of-node-struct-from-unregister_one_node.patch serial-8250-add-quark-x1000-to-8250_pci.c.patch +libata-un-break-ata-blacklist.patch