From: Timothy Thelin Date: Sat, 17 Sep 2005 02:28:16 +0000 (-0700) Subject: [PATCH] ide: fix null request pointer for taskfile ioctl X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ef0f6a437f92fbd96c725086555b37b29371e107;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [PATCH] ide: fix null request pointer for taskfile ioctl 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 Cc: "Bartlomiej Zolnierkiewicz" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index d04f62ab5de1..ace8edad6e96 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c @@ -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); }