On Tue, Nov 13, 2001 at 03:36:32PM -0800, Krishna Kondaka wrote: > 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. Almost correct, as James already explained you have to check for a non-null pointer first. We got a more elegant implementation of context switching which I'll add to CVS asap; it gets away without any memory allocation. Ralf