All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christopher Yeoh <cyeoh@au1.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
Subject: Re: [RESEND] Cross Memory Attach v3
Date: Tue, 19 Jul 2011 00:35:09 +0930	[thread overview]
Message-ID: <20110719003509.77b5ed66@lilo> (raw)
In-Reply-To: <20110715153743.a0b3efc7.akpm@linux-foundation.org>

On Fri, 15 Jul 2011 15:37:43 -0700
Andrew Morton <akpm@linux-foundation.org> wrote:
> On Fri, 8 Jul 2011 18:06:07 +0930
> Christopher Yeoh <cyeoh@au1.ibm.com> wrote:
> 
> > +static ssize_t process_vm_rw(pid_t pid, const struct iovec *lvec,
> > +			     unsigned long liovcnt,
> > +			     const struct iovec *rvec,
> > +			     unsigned long riovcnt,
> > +			     unsigned long flags, int vm_write)
> > +{
> >
> > ...
> >
> > +	if (!mm || (task->flags & PF_KTHREAD)) {
> 
> Can a PF_KTHREAD thread have a non-zero ->mm?
> > +		task_unlock(task);
> > +		rc = -EINVAL;
> > +		goto put_task_struct;
> > +	}

According to get_task_mm it can:

/**
 * get_task_mm - acquire a reference to the task's mm
 *
 * Returns %NULL if the task has no mm.  Checks PF_KTHREAD (meaning
 * this kernel workthread has transiently adopted a user mm with use_mm,
 * to do its AIO) is not set and if so returns a reference to it, after
 * bumping up the use count.  User must release the mm via mmput()
 * after use.  Typically used by /proc and ptrace.
 */

> anyway, grumble.
> 
> Please resend, cc'ing linux-kernel.

Am doing the CC resends in a separate email...

Chris
-- 
cyeoh@au.ibm.com

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2011-07-18 15:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-08  8:36 [RESEND] Cross Memory Attach v3 Christopher Yeoh
2011-07-15 22:37 ` Andrew Morton
2011-07-18 15:05   ` Christopher Yeoh [this message]

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=20110719003509.77b5ed66@lilo \
    --to=cyeoh@au1.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.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.