aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2006-07-28 03:32:07 -0400
committerJens Axboe <axboe@nelson.home.kernel.dk>2006-09-30 14:29:23 -0400
commitcdd6026217c0e4cda2efce1bdc318661bef1f66f (patch)
treee26bb9c40b603b9cc321aa4217fecf34e1bc5f24 /drivers/scsi
parent49171e5c6f414d49a061b5c1c84967c2eb569822 (diff)
[PATCH] Remove ->rq_status from struct request
After Christophs SCSI change, the only usage left is RQ_ACTIVE and RQ_INACTIVE. The block layer sets RQ_INACTIVE right before freeing the request, so any check for RQ_INACTIVE in a driver is a bug and indicates use-after-free. So kill/clean the remaining users, straight forward. Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/ide-scsi.c2
-rw-r--r--drivers/scsi/scsi.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index 65b19695ebe2..1427a41e8441 100644
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -708,7 +708,7 @@ static ide_startstop_t idescsi_issue_pc (ide_drive_t *drive, idescsi_pc_t *pc)
708static ide_startstop_t idescsi_do_request (ide_drive_t *drive, struct request *rq, sector_t block) 708static ide_startstop_t idescsi_do_request (ide_drive_t *drive, struct request *rq, sector_t block)
709{ 709{
710#if IDESCSI_DEBUG_LOG 710#if IDESCSI_DEBUG_LOG
711 printk (KERN_INFO "rq_status: %d, dev: %s, cmd: %x, errors: %d\n",rq->rq_status, rq->rq_disk->disk_name,rq->cmd[0],rq->errors); 711 printk (KERN_INFO "dev: %s, cmd: %x, errors: %d\n", rq->rq_disk->disk_name,rq->cmd[0],rq->errors);
712 printk (KERN_INFO "sector: %ld, nr_sectors: %ld, current_nr_sectors: %d\n",rq->sector,rq->nr_sectors,rq->current_nr_sectors); 712 printk (KERN_INFO "sector: %ld, nr_sectors: %ld, current_nr_sectors: %d\n",rq->sector,rq->nr_sectors,rq->current_nr_sectors);
713#endif /* IDESCSI_DEBUG_LOG */ 713#endif /* IDESCSI_DEBUG_LOG */
714 714
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 7a054f9d1ee3..12f6639dda2d 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -1065,7 +1065,7 @@ int scsi_device_cancel(struct scsi_device *sdev, int recovery)
1065 1065
1066 spin_lock_irqsave(&sdev->list_lock, flags); 1066 spin_lock_irqsave(&sdev->list_lock, flags);
1067 list_for_each_entry(scmd, &sdev->cmd_list, list) { 1067 list_for_each_entry(scmd, &sdev->cmd_list, list) {
1068 if (scmd->request && scmd->request->rq_status != RQ_INACTIVE) { 1068 if (scmd->request) {
1069 /* 1069 /*
1070 * If we are unable to remove the timer, it means 1070 * If we are unable to remove the timer, it means
1071 * that the command has already timed out or 1071 * that the command has already timed out or