aic79xx: NULL dereference in debug code
Subsystems (3)
PATCH 1/1 aic79xx: NULL dereference in debug code
"ahd" can be NULL here and it gets dereferenced inside the call to ahd_name().
Signed-off-by Dan Carpenter <[email protected]>
drivers/scsi/aic7xxx/aic79xx_core.c +2 -1
@@ -6120,7 +6120,8 @@ ahd_alloc(void *platform_arg, char *name)#ifdef AHD_DEBUG if ((ahd_debug &AHD_SHOW_MEMORY ) !=0 ) {printk ("%s: scb size = 0x%x, hscb size = 0x%x\n" , -ahd_name (ahd), (u_int )sizeof (struct scb ), + ahd ?ahd_name (ahd) :"(null)" , + (u_int )sizeof (struct scb ), (u_int )sizeof (struct hardware_scb )); }#endif
Quoted 5 lines · Dan Carpenter
"ahd" can be NULL here and it gets dereferenced inside the call to
ahd_name().Signed-off-by Dan Carpenter <[email protected]>
Acked-by Hannes Reinecke <[email protected]>
Cheers,
Hannes
Signature · 10 lines
Dr. Hannes Reinecke zSeries & Storage [email protected] +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg) -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html