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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 30 Sep 2011 16:56:43 +0100
From:	Matt Fleming <matt@...sole-pimps.org>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	Tejun Heo <tj@...nel.org>, linux-kernel@...r.kernel.org,
	Tony Luck <tony.luck@...el.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Thomas Gleixner <tglx@...utronix.de>,
	Anirudh Badam <abadam@...princeton.edu>
Subject: Re: [RFC][PATCH 2/5] signal: Add rwlock to protect sighand->action

On Fri, 2011-09-30 at 16:12 +0100, Matt Fleming wrote:
> @@ -2935,9 +3025,11 @@ int do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact)
>  	if (!valid_signal(sig) || sig < 1 || (act && sig_kernel_only(sig)))
>  		return -EINVAL;
>  
> +	spin_lock_irq(&current->sighand->siglock);
> +	read_lock(&current->sighand->action_lock);
> +
>  	k = &t->sighand->action[sig-1];
>  
> -	spin_lock_irq(&current->sighand->siglock);
>  	if (oact)
>  		*oact = *k;
>  
> @@ -2967,6 +3059,7 @@ int do_sigaction(int sig, struct k_sigaction *act, struct k_sigaction *oact)
>  		}
>  	}
>  
> +	read_unlock(&current->sighand->action_lock);
>  	spin_unlock_irq(&current->sighand->siglock);
>  	return 0;
>  }

Guh! I just noticed this. That should obviously be write-locked.

-- 
Matt Fleming, Intel Open Source Technology Center

--
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