lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200706112359.20028.rjw@sisk.pl>
Date:	Mon, 11 Jun 2007 23:59:19 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Cc:	LKML <linux-kernel@...r.kernel.org>, Pavel Machek <pavel@....cz>,
	Lee Trager <lt73@...drexel.edu>
Subject: Re: 2.6.22-rc4-mm2: Resume from RAM on HPC nx6325 broken

On Monday, 11 June 2007 22:03, Bartlomiej Zolnierkiewicz wrote:
> 
> Hi,
> 
> On Monday 11 June 2007, Rafael J. Wysocki wrote:
> > Hi,
> > 
> > Here's the result of the search for the second patch that breaks resuming
> > from RAM on HPC nx6325 (x86_64):
> > 
> > ide-ide-hpa-detect-from-resume.patch
> > 
> > The symptom is that after the resume there's no backlight and the screen
> > apparently doesn't work, 100% of the time, although apart from this the system
> > seems to be functional.
> 
> I find it hard to accept that IDE patch is to blame for that. ;)

But still (actually, I only don't know why it appeared to be functional :-)).

> > The box doesn't even have an IDE HDD, but the DVD is handled by the atiixp
> > driver.
> 
> If there are no IDE disks in the system there should be absolutely no
> change in the functionality.

Sorry, but the patch is buggy.  Fix appended, details in the changelog.

Greetings,
Rafael


---
From: Rafael J. Wysocki <rjw@...k.pl>

generic_ide_resume() should check if dev->driver is not NULL before applying
to_ide_driver() to it.  Fix that.

Signed-off-by: Rafael J. Wysocki <rjw@...k.pl>
---
 drivers/ide/ide.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Index: linux-2.6.22-rc4/drivers/ide/ide.c
===================================================================
--- linux-2.6.22-rc4.orig/drivers/ide/ide.c
+++ linux-2.6.22-rc4/drivers/ide/ide.c
@@ -1010,7 +1010,6 @@ static int generic_ide_resume(struct dev
 {
 	ide_drive_t *drive = dev->driver_data;
 	ide_hwif_t *hwif = HWIF(drive);
-	ide_driver_t *drv = to_ide_driver(dev->driver);
 	struct request rq;
 	struct request_pm_state rqpm;
 	ide_task_t args;
@@ -1033,8 +1032,12 @@ static int generic_ide_resume(struct dev
 
 	err = ide_do_drive_cmd(drive, &rq, ide_head_wait);
 
-	if (err == 0 && drv && drv->resume)
-		drv->resume(drive);
+	if (err == 0 && dev->driver) {
+		ide_driver_t *drv = to_ide_driver(dev->driver);
+
+		if (drv->resume)
+			drv->resume(drive);
+	}
 
 	return err;
 }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ