Thread (2 messages) 2 messages, 2 authors, 2007-06-23
STALE6972d

[PATCH] ide: Fix a theoretical Ooops case

From: Alan Cox <hidden>
Date: 2007-06-22 13:14:48

Found by a static analyser. It is in theory possible we dereference
dev->id when it has become invalid. Re-order to avoid this.

Not needed for new-ide as we no longer support the crazy exabyte nest stuff

Signed-off-by: Alan Cox <redacted>

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.22-rc4-mm2/drivers/ide/ide-probe.c linux-2.6.22-rc4-mm2/drivers/ide/ide-probe.c
--- linux.vanilla-2.6.22-rc4-mm2/drivers/ide/ide-probe.c	2007-06-07 14:26:08.000000000 +0100
+++ linux-2.6.22-rc4-mm2/drivers/ide/ide-probe.c	2007-06-18 16:45:28.000000000 +0100
@@ -574,11 +574,11 @@
 			/* look for ATAPI device */
 			(void) do_probe(drive, WIN_PIDENTIFY);
 		}
-		if (strstr(drive->id->model, "E X A B Y T E N E S T"))
-			enable_nest(drive);
 		if (!drive->present)
 			/* drive not found */
 			return 0;
+		if (strstr(drive->id->model, "E X A B Y T E N E S T"))
+			enable_nest(drive);
 	
 		/* identification failed? */
 		if (!drive->id_read) {
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help