Commit d19b3a36 authored by Tim Schmielau's avatar Tim Schmielau Committed by Greg Kroah-Hartman

[PATCH] fix compares of jiffies

on rechecking the current stable kernel code, I found some places where jiffies
were compared in a way that seems to break when they wrap. For these,
I made up patches to use the macros "time_before()" or "time_after()"
that are supposed to handle wraparound correctly.
parent 55c38fec
...@@ -788,7 +788,7 @@ int sddr55_transport(Scsi_Cmnd *srb, struct us_data *us) ...@@ -788,7 +788,7 @@ int sddr55_transport(Scsi_Cmnd *srb, struct us_data *us)
/* only check card status if the map isn't allocated, ie no card seen yet /* only check card status if the map isn't allocated, ie no card seen yet
* or if it's been over half a second since we last accessed it * or if it's been over half a second since we last accessed it
*/ */
if (info->lba_to_pba == NULL || jiffies > (info->last_access + HZ/2)) { if (info->lba_to_pba == NULL || time_after(jiffies, info->last_access + HZ/2)) {
/* check to see if a card is fitted */ /* check to see if a card is fitted */
result = sddr55_status (us); result = sddr55_status (us);
......
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