Re: [CHECKER] 15 potential pointer dereference errors in 2.4.3

Andy Chou (acc@CS.Stanford.EDU)
Thu, 5 Apr 2001 13:56:08 -0700


Here's one more potential bug for 2.4.3.

-Andy

[BUG]
/u2/acc/oses/linux/2.4.3/drivers/isdn/hysdn/hysdn_net.c:309:hysdn_net_create: ERROR:NULL:302:309: Using
NULL ptr "dev" illegally! set by 'kmalloc_Rsmp_93d4cfe6':302

Start --->
if ((dev = kmalloc(sizeof(struct net_local), GFP_KERNEL)) ==
NULL) {
printk(KERN_WARNING "HYSDN: unable to allocate mem\n");
if (card->debug_flags & LOG_NET_INIT)
return (-ENOMEM);
}
memset(dev, 0, sizeof(struct net_local)); /* clean the structure
*/

Error --->
spin_lock_init(&((struct net_local *) dev)->lock);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/