Re: 2.6.18-rc5-mm1 (IDE resume regression)

Andrew Morton
2006-09-02T00:08:42Z

On Sat, 2 Sep 2006 01:13:23 +0200
"Rafael J. Wysocki" <rjw@sisk.pl> wrote:

> On Friday 01 September 2006 10:58, Andrew Morton wrote:
> >
> > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.18-rc5/2.6.18-rc5-mm1/
> >
> >
> > - CONFIG_BLOCK=n is bust due to
> > writeback_congestion_end()/blk_congestion_end() snafu. We'll fix it later.
>
> I need the appended patch to prevent my box from crashing during suspend to
> disk (in the resume-during-suspend phase).
>
> Apparently, the pointer returned by to_ide_driver() in generic_ide_resume()
> is completely bogous, although it's nonzero, and a NULL pointer dereference
> occurs when drv->resume is evaluated (100% of the time on my box).
>

OK, thanks. That's ide-hpa-resume-fix.patch

> Index: linux-2.6.18-rc5-mm1/drivers/ide/ide.c
> ===================================================================
> --- linux-2.6.18-rc5-mm1.orig/drivers/ide/ide.c
> +++ linux-2.6.18-rc5-mm1/drivers/ide/ide.c
> @@ -1235,11 +1235,9 @@ static int generic_ide_suspend(struct de
> static int generic_ide_resume(struct device *dev)
> {
> ide_drive_t *drive = dev->driver_data;
> - ide_driver_t *drv = to_ide_driver(dev->driver);
> struct request rq;
> struct request_pm_state rqpm;
> ide_task_t args;
> - int err;
>
> memset(&rq, 0, sizeof(rq));
> memset(&rqpm, 0, sizeof(rqpm));
> @@ -1250,12 +1248,7 @@ static int generic_ide_resume(struct dev
> rqpm.pm_step = ide_pm_state_start_resume;
> rqpm.pm_state = PM_EVENT_ON;
>
> - err = ide_do_drive_cmd(drive, &rq, ide_head_wait);
> -
> - if (err == 0 && drv->resume)
> - drv->resume(drive);
> -
> - return err;
> + return ide_do_drive_cmd(drive, &rq, ide_head_wait);
> }
>
> int generic_ide_ioctl(ide_drive_t *drive, struct file *file, struct block_device *bdev,

And the above reverts most of it. It looks like we'll need to
have another go at that one. I'll drop it.

--
VGER BF report: H 0