[EMAIL PROTECTED] writes: > From: Panagiotis Issaris <[EMAIL PROTECTED]> > > The PPP code contains two kmalloc()s followed by memset()s without handling a > possible memory allocation failure. (Suggested by Joe Perches).
Nack, because... > - cardmap_set(&all_ppp_units, unit, ppp); > + ret = cardmap_set(&all_ppp_units, unit, ppp); > + if (ret != 0) { > + printk(KERN_ERR "PPP: couldn't set cardmap\n"); first, this is a useless error message, and > @@ -2735,6 +2742,10 @@ static void cardmap_set(struct cardmap * > set_bit(i, &p->inuse); > else > clear_bit(i, &p->inuse); > + return 0; > +enomem: > + cardmap_destroy(pmap); secondly, this is a bit rude, isn't it, destroying the whole thing because one insertion failed? Some existing pppd will come along and try to use its (previously successfully created) ppp unit and get told it doesn't exist any more! Paul. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html