Commit e18086d
[libata] More robust parsing for IDENTIFY DEVICE multi_count field
Make libata more robust when parsing the multi_count
field from a drive's identify data. This prevents us from
attempting to use dubious multi_count values ad infinitum.
Reset dev->multi_count to zero and reprobe it each time
through this routine, as it can change on device reset.
Also ensure that the reported "maximum" value is valid
and is a power of two, and that the reported "count" value
is valid and also a power of two. And that the "count"
value is not greater than the "maximum" value.
Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>1 parent 000b344 commit e18086d
1 file changed
+11
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
2389 | 2390 | | |
2390 | 2391 | | |
2391 | 2392 | | |
| 2393 | + | |
2392 | 2394 | | |
2393 | 2395 | | |
2394 | 2396 | | |
| |||
2426 | 2428 | | |
2427 | 2429 | | |
2428 | 2430 | | |
2429 | | - | |
2430 | | - | |
| 2431 | + | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
| 2437 | + | |
| 2438 | + | |
| 2439 | + | |
2431 | 2440 | | |
2432 | 2441 | | |
2433 | 2442 | | |
| |||
0 commit comments