Thread (3 messages) 3 messages, 3 authors, 2013-11-18

Can mm_struct of a process be null?

From: Paul Davies C <hidden>
Date: 2013-11-15 16:24:11

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 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help