mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-14 12:49:08 +00:00
[NET]: Fix setsockopt locking bug
On Sparc, SO_DONTLINGER support resulted in sock_reset_flag being called without lock_sock(). Signed-off-by: Kyle Moffett <mrmacman_g4@mac.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
cbcd2a4cca
commit
a77be819f9
@ -206,10 +206,11 @@ int sock_setsockopt(struct socket *sock, int level, int optname,
|
||||
*/
|
||||
|
||||
#ifdef SO_DONTLINGER /* Compatibility item... */
|
||||
switch (optname) {
|
||||
case SO_DONTLINGER:
|
||||
sock_reset_flag(sk, SOCK_LINGER);
|
||||
return 0;
|
||||
if (optname == SO_DONTLINGER) {
|
||||
lock_sock(sk);
|
||||
sock_reset_flag(sk, SOCK_LINGER);
|
||||
release_sock(sk);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user