All of lore.kernel.org
 help / color / mirror / Atom feed
From: pauldaviesc@gmail.com (Paul Davies C)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Can mm_struct of a process be null?
Date: Fri, 15 Nov 2013 21:54:11 +0530	[thread overview]
Message-ID: <52864AAB.1080003@gmail.com> (raw)

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 

             reply	other threads:[~2013-11-15 16:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-15 16:24 Paul Davies C [this message]
2013-11-15 16:31 ` Can mm_struct of a process be null? Daniel Baluta
2013-11-18  3:42 ` Chetan Nanda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52864AAB.1080003@gmail.com \
    --to=pauldaviesc@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.