]> err.no Git - linux-2.6/commit
[SCSI] remove a timer race in scsi_queue_insert()
authorTejun Heo <htejun@gmail.com>
Fri, 13 May 2005 15:46:08 +0000 (00:46 +0900)
committerJames Bottomley <jejb@mulgrave.(none)>
Fri, 20 May 2005 17:53:54 +0000 (12:53 -0500)
commitd8c37e7b9a619855e05d5d4e56c68f799b1f539c
treef32bcada38a55c16b8c0040043cd0ee087f48aec
parent5b8ef8425898e957243053c26ac2b68bd4bc42ec
[SCSI] remove a timer race in scsi_queue_insert()

scsi_queue_insert() has four callers.  Three callers call with
timer disabled and one (the second invocation in
scsi_dispatch_cmd()) calls with timer activated.
scsi_queue_insert() used to always call scsi_delete_timer()
and ignore the return value.  This results in race with timer
expiration.  Remove scsi_delete_timer() call from
scsi_queue_insert() and make the caller delete timer and check
the return value.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/scsi.c
drivers/scsi/scsi_lib.c