Re: [PATCH #upstream-fixes] ahci: fix hang on failed softreset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/27/2010 05:09 AM, Tejun Heo wrote:
ahci_do_softreset() compared the current time and deadline in reverse
when calculating timeout for SRST issue.  The result is that if
@deadline is in future, SRST is issued with 0 timeout, which hasn't
caused any problem because it later waits for DRDY with the correct
timeout.  If deadline is already exceeded by the time SRST is about to
be issued, the timeout calculation underflows and if the device
doesn't respond, timeout doesn't trigger for a _very_ long time.

Reverse the incorrect comparison order.

Signed-off-by: Tejun Heo<tj@xxxxxxxxxx>
Reported-by: Anssi Hannula<anssi.hannula@xxxxxx>
Tested-by: Gwendal Grignou<gwendal@xxxxxxxxxx>
Cc: stable@xxxxxxxxxx
---
  drivers/ata/libahci.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

applied, good catch, sorry for the delay.


--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux