]> git.baikalelectronics.ru Git - kernel.git/commit
libata: prevent devices with blank model names from being DMA blacklisted
authorAndrew Paprocki <andrew@ishiboo.com>
Mon, 15 Oct 2007 19:43:12 +0000 (15:43 -0400)
committerJeff Garzik <jeff@garzik.org>
Mon, 15 Oct 2007 19:44:22 +0000 (15:44 -0400)
commit1e6fcd8a9f10af1890c59adffcfb8d7dc8388a8b
tree43af04f1f7eedd4dca63ad401c4ca65bc4247d5c
parentc7ab05b483ce90a644e65f62e1970a1329a2dba0
libata: prevent devices with blank model names from being DMA blacklisted

The strn_pattern_cmp routine does not handle a blank name parameter
properly. The only patterns which should match a blank name are "*"
and an explicit "". If the function is passed a blank name in current
code, it will always match against the patt parameter. The bug manifests
itself as the device with the empty model name always matching the first
device in the DMA blacklist, forcing it to revert to PIO mode.

Signed-off-by: Andrew Paprocki <andrew@ishiboo.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/libata-core.c