Commit 1c402799 authored by George Spelvin's avatar George Spelvin Committed by Tejun Heo

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: 428ac5fc (libata: Use glob_match from lib/glob.c)
Reported-by: default avatarSteven Honeyman <stevenhoneyman@gmail.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=71371#c21Signed-off-by: default avatarGeorge Spelvin <linux@horizon.com>
Cc: <stable@vger.kernel.org> # 3.17
Tested-by: default avatarSteven Honeyman <stevenhoneyman@gmail.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 33fb0d01
...@@ -4261,10 +4261,10 @@ static unsigned long ata_dev_blacklisted(const struct ata_device *dev) ...@@ -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)); ata_id_c_string(dev->id, model_rev, ATA_ID_FW_REV, sizeof(model_rev));
while (ad->model_num) { 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) if (ad->model_rev == NULL)
return ad->horkage; return ad->horkage;
if (glob_match(model_rev, ad->model_rev)) if (glob_match(ad->model_rev, model_rev))
return ad->horkage; return ad->horkage;
} }
ad++; ad++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment