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

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

 




> 1. Summary:
> 	Memory leak in Linux 2.4.2 MIPS SMP kernel

Fixed in the latest tree.

> /*
>  * Destroy context related info for an mm_struct that is about
>  * to be put to rest.
>  */
> extern inline void destroy_context(struct mm_struct *mm)
> {
> #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.

BTW you should check to see if mm->context really exist. It can bomb out
otherwise.

Current function is:

static inline void destroy_context(struct mm_struct *mm)
{
#ifdef CONFIG_SMP
        if (mm->context)
                kfree((void *)mm->context);
#endif
}



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

  Powered by Linux