Re: [PATCH v3 2/6] posix-cpu-timers: Use PIDTYPE_TGID to simplify the logic in lookup_task

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

 



On 04/27, Eric W. Biederman wrote:
>
> Oleg Nesterov <oleg@xxxxxxxxxx> writes:
>
> > Eric,
> >
> > I am sick today and can't read the code, but I feel this patch is not
> > right ... please correct me.
>
>
> > So, iiuc when posix_cpu_timer_create() is called and CPUCLOCK_PERTHREAD
> > is false we roughly have
> >
> > 	task = pid_task(pid, PIDTYPE_TGID);			// lookup_task()
> >
> > 	/* WINDOW */
> >
> > 	timer->it.cpu.pid = = get_task_pid(task, PIDTYPE_TGID)	// posix_cpu_timer_create()
> >
> > Now suppose that we race with mt-exec and this "task" is the old leader;
> > it can be release_task()'ed in the WINDOW above and then get_task_pid()
> > will return NULL.
>
> Except it is asking for PIDTYPE_TGID.
>
> task->signal

Ah yes, I knew I missed something...

Oleg.




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux