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] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100509.184658.170123822.davem@davemloft.net>
Date:	Sun, 09 May 2010 18:46:58 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	andrew.hendry@...il.com
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] X25: Replace BKL in sockopts calls

From: Andrew Hendry <andrew.hendry@...il.com>
Date: Sun, 09 May 2010 22:45:23 +1000

> @@ -465,20 +464,20 @@ static int x25_setsockopt(struct socket *sock, int level, int optname,
>  	if (get_user(opt, (int __user *)optval))
>  		goto out;
>  
> +	lock_sock(sk);
>  	x25_sk(sk)->qbitincl = !!opt;
> +	release_sock(sk);

This is completely bogus.

A store is always atomic on an SMP system, and "opt" is in a local variable
rather than being computed based upon some memory values.

There is no reason to require locking for this operation.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ