firewire: core: fix card->reset_jiffies overflow
On a 32-bit machine with, e.g., HZ=1000, jiffies will overflow after about 50 days, so if there are between 25 and 50 days between bus resets, the card->reset_jiffies comparisons can get wrong results. To fix this, ensure that this timestamp always uses 64 bits. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: "Stefan Richter" <stefanr@s5r6.in-berlin.de>
This commit is contained in:
committed by
Stefan Richter
parent
dbc9880fa7
commit
e71084af58
@ -545,7 +545,7 @@ void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation,
|
||||
*/
|
||||
smp_wmb();
|
||||
card->generation = generation;
|
||||
card->reset_jiffies = jiffies;
|
||||
card->reset_jiffies = get_jiffies_64();
|
||||
card->bm_node_id = 0xffff;
|
||||
card->bm_abdicate = bm_abdicate;
|
||||
fw_schedule_bm_work(card, 0);
|
||||
|
Reference in New Issue
Block a user