[Prism54-devel] Re: Bug 39 - Kernel oops

Aurelien slts@free.fr
Sun, 1 Feb 2004 13:42:41 +0100


Hi,
please use the most recent CVS, because what you suggest is already in...

...And justice for all

On Sun, 01 Feb 2004 12:41:50 +0100
margitsw@t-online.de (Margit Schubert-While) wrote:

> In oid_mgt.c after :
>          priv->mib = kmalloc(OID_NUM_LAST * sizeof (void *), GFP_KERNEL);
>          if (!priv->mib)
>                  return -ENOMEM;
> 
> I think there should be :
>         memset(priv->mib, 0, OID_NUM_LAST * sizeof(void *));
> 
> Don't assume kmalloc returns zeroed memory.
> If it doesn't and we get a kmalloc bailout in the oid loop, then
> we will bork in mgt_clean.
> 
> Margit
> 
> 
> _______________________________________________
> Prism54-devel mailing list
> Prism54-devel@prism54.org
> http://prism54.org/mailman/listinfo/prism54-devel
>