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-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0906082137120.22183@sister.anvils>
Date:	Mon, 8 Jun 2009 21:45:28 +0100 (BST)
From:	Hugh Dickins <hugh.dickins@...cali.co.uk>
To:	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
cc:	Joao Ramos <joao.ramos@...v.pt>,
	Sergei Shtylyov <sshtylyov@...montavista.com>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, linux-ide@...r.kernel.org
Subject: [PATCH next] ide: fix PowerMac bootup oops

PowerMac bootup with CONFIG_IDE=y oopses in ide_pio_cycle_time():
because "ide: try to use PIO Mode 0 during probe if possible" causes
pmac_ide_set_pio_mode() now to be called before drive->id has been set.
It does the right thing if id is not set, so long as we check for that.

Signed-off-by: Hugh Dickins <hugh.dickins@...cali.co.uk>
---

 drivers/ide/ide-timings.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- lnext/drivers/ide/ide-timings.c	2009-04-08 18:25:55.000000000 +0100
+++ linux/drivers/ide/ide-timings.c	2009-06-03 19:45:58.000000000 +0100
@@ -84,7 +84,7 @@ u16 ide_pio_cycle_time(ide_drive_t *driv
 	struct ide_timing *t = ide_timing_find_mode(XFER_PIO_0 + pio);
 	u16 cycle = 0;
 
-	if (id[ATA_ID_FIELD_VALID] & 2) {
+	if (id && (id[ATA_ID_FIELD_VALID] & 2)) {
 		if (ata_id_has_iordy(drive->id))
 			cycle = id[ATA_ID_EIDE_PIO_IORDY];
 		else
--
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