Skip to content

Commit

Permalink
[PATCH] ide: fix null request pointer for taskfile ioctl
Browse files Browse the repository at this point in the history
When doing ioctl HDIO_DRIVE_TASKFILE, the ide_task_t's request pointer is
never set, but flagged_taskfile and do_rw_taskfile pass it as a parameter
to the prehandler.  The kernel will oops taskfile pio-out commands because
of this (taskfile pio-in doesn't use a prehandler).  This fix sets the
request pointer at the time the request is created to stop this oops.

Signed-off-by: Timothy Thelin <timothy.thelin@wdc.com>
Cc: "Bartlomiej Zolnierkiewicz" <bzolnier@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Timothy Thelin authored and Linus Torvalds committed Sep 17, 2005
1 parent 9564df1 commit ef0f6a4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/ide/ide-taskfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ static int ide_diag_taskfile(ide_drive_t *drive, ide_task_t *args, unsigned long
}

rq.special = args;
args->rq = &rq;
return ide_do_drive_cmd(drive, &rq, ide_wait);
}

Expand Down

0 comments on commit ef0f6a4

Please sign in to comment.