Skip to content
Commit a464189d authored by Elias Oltmanns's avatar Elias Oltmanns Committed by Jeff Garzik
Browse files

libata: Fix a potential race condition in ata_scsi_park_show()



Peter Moulder has pointed out that there is a slight chance that a
negative value might be passed to jiffies_to_msecs() in
ata_scsi_park_show(). This is fixed by saving the value of jiffies in a
local variable, thus also reducing code since the volatile variable
jiffies is accessed only once.

Signed-off-by: default avatarElias Oltmanns <eo@nebensachen.de>
Signed-off-by: Tejun Heo <tj.kernel.org>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 3c324283
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