On 12/17/09 10:17 AM, Frank Batschulat (Home) wrote:
May I have 2 code reviewers for:

6911329 Incorrect code in kstat_delete causes panic
http://cr.opensolaris.org/~batschul/onnvkstat/

Description

A colleague was looking into a crash and the reason turned out to be a  NULL 
pointer dereference in kstat_delete():

kstat_delete(kstat_t *ksp)
{     kmutex_t *lp;
   ekstat_t *e = (ekstat_t *)ksp;
   zoneid_t zoneid = e->e_zone.zoneid;
   kstat_zone_t *kz;

   if (ksp == NULL)
       return;

Note that there is a dereference of 'ksp' [via 'e'] before the check for ksp being NULL.
unfortunately we don't have a dump/stacktrace anymore to inspect who
called kstat_delete(NULL) and why.

thanks
frankB
_______________________________________________
zones-discuss mailing list
zones-discuss@opensolaris.org

Hi Frank,

This looks fine to me.

Thanks,
Jordan
_______________________________________________
zones-discuss mailing list
zones-discuss@opensolaris.org

Reply via email to