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

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


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