Can mm_struct of a process be null?

Paul Davies C pauldaviesc at gmail.com
Fri Nov 15 11:24:11 EST 2013


Hi,
     I happen to find this code snippet in the kernel source :

**/*struct mm_struct *mm=current->mm**;**
**
     /* some other code */

**    if(mm){ /*<==Why is **this here? */**
**        /*read the contents by locking*/**
**    }

*/The/if /checks whether the mm_struct of the current process is NULL or 
not. That means the mm_struct of a process can become NULL. How can that 
happen?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20131115/90060719/attachment.html 


More information about the Kernelnewbies mailing list