All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/7] sym53c8xx: fix NULL deref on error path
@ 2009-01-08 17:53 Tony Battersby
  0 siblings, 0 replies; only message in thread
From: Tony Battersby @ 2009-01-08 17:53 UTC (permalink / raw)
  To: James Bottomley; +Cc: Matthew Wilcox, linux-scsi

If sym_attach() fails to allocate np, the error path will dereference
a NULL pointer for printk.

Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
---
--- linux-2.6.28/drivers/scsi/sym53c8xx_2/sym_glue.c.orig	2009-01-07 17:31:07.000000000 -0500
+++ linux-2.6.28/drivers/scsi/sym53c8xx_2/sym_glue.c	2009-01-07 17:32:33.000000000 -0500
@@ -1418,7 +1418,7 @@ static struct Scsi_Host * __devinit sym_
  attach_failed:
 	if (!shost)
 		return NULL;
-	printf_info("%s: giving up ...\n", sym_name(np));
+	printf_info("sym%d: giving up ...\n", unit);
 	if (np)
 		sym_free_resources(np, pdev);
 	scsi_host_put(shost);



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-01-08 17:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-08 17:53 [PATCH 2/7] sym53c8xx: fix NULL deref on error path Tony Battersby

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.