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

Re: pthread_kill is racy: probably needs kernel change



On Mon, 4 Nov 2002, Luca Barbieri wrote:

>  	read_lock(&tasklist_lock);
> -	p = find_task_by_pid(pid);
> +	
> +	error = -EFAULT;
> +	if(get_user(pid, ppid))
> +		goto out_unlock;

this is buggy - it leads to a deadlock/lockup, because the tasklist_lock
is already held at this point and get_user() might sleep/block.

	Ingo





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