[PATCH 2/7] pid: Add do_each_pid_task

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

 



On 08/15, Eric W. Biederman wrote:
>  
> +#define do_each_pid_task(pid, type, task)				\
> +	if ((task = pid_task(pid, type))) {				\
> +		prefetch(pid_next(task, type));				\
> +		do {
> +
> +#define while_each_pid_task(pid, type, task)				\
> +		} while (pid_next(task, type) &&  ({			\
> +				task = pid_next_task(task, type);	\
> +				rcu_dereference(task);			\
> +				prefetch(pid_next(task, type));		\
> +				1; }) );				\
> +	}

A small nit. Suppose a non-leader thread blocks a signal, and does
exec. There is a window when we have 2 tasks with the same pid in
PIDTYPE_PID namespace. If send_sigio() send the signal in that
window, it will be delivered twice to process.

Oleg.



[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux