Re: [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.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux