lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20100926175150.GA26579@redhat.com>
Date:	Sun, 26 Sep 2010 19:51:50 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Namhyung Kim <namhyung@...il.com>
Cc:	Roland McGrath <roland@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] ptrace: annotate siglock acquisition

On 09/25, Namhyung Kim wrote:
>
> --- a/kernel/ptrace.c
> +++ b/kernel/ptrace.c
> @@ -435,7 +435,8 @@ static int ptrace_getsiginfo(struct task_struct *child, siginfo_t *info)
>  	unsigned long flags;
>  	int error = -ESRCH;
>
> -	if (lock_task_sighand(child, &flags)) {
> +	if (__cond_lock(&child->sighand->siglock,
> +			lock_task_sighand(child, &flags))) {

Well, this looks fine, but if we are going to make sparse happy
then we have more callers to fix.

Perhaps we should just renam lock_task_sighand to __lock_task_sighand
and add

	#define lock_task_sighand(tsk, flagsp)	\
		__cond_lock((tsk)->sighand->siglock, __lock_task_sighand((tsk), (flagsp)))

?

Oleg.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ