Re: [RESEND] Cross Memory Attach v3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 15 Jul 2011 15:37:43 -0700
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Fri, 8 Jul 2011 18:06:07 +0930
> Christopher Yeoh <cyeoh@xxxxxxxxxxx> 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@xxxxxxxxxx

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  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@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]