Re: BUG : Memory leak in Linux 2.4.2 MIPS SMP kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> > {
> > #ifdef CONFIG_SMP
> >         kfree((void *)mm->context);
> > #else
> >         /* Nothing to do.  */
> > #endif
> > }
> > 
> > And when I tested this I do not see the memory leak any more.
> 
> Almost correct, as James already explained you have to check for a
> non-null pointer first.  

Hm. It was pointed out that kfree actually does the checking for us. 
Do we really need the check? 

> We got a more elegant implementation of
> context switching which I'll add to CVS asap; it gets away without
> any memory allocation.

:-)


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux