Re: [PATCH] net: af_unix: protect ->sk_shutdown change with lock_sock()

2016-05-18 Thread Andrey Ryabinin
On 05/18/2016 01:38 PM, Hannes Frederic Sowa wrote: > On 18.05.2016 12:14, Andrey Ryabinin wrote: >> ->sk_shutdown bits share one bitfield with some other bits in sock struct, >> such as ->sk_no_check_[r,t]x, ->sk_userlocks ... >> sock_setsockopt() may write to these bits, while holding the socke

[PATCH] net: af_unix: protect ->sk_shutdown change with lock_sock()

2016-05-18 Thread Andrey Ryabinin
->sk_shutdown bits share one bitfield with some other bits in sock struct, such as ->sk_no_check_[r,t]x, ->sk_userlocks ... sock_setsockopt() may write to these bits, while holding the socket lock. In case of AF_UNIX sockets, we change ->sk_shutdown bits while holding only unix_state_lock(). So con

Re: [PATCH] net: af_unix: protect ->sk_shutdown change with lock_sock()

2016-05-18 Thread Hannes Frederic Sowa
On 18.05.2016 12:14, Andrey Ryabinin wrote: > ->sk_shutdown bits share one bitfield with some other bits in sock struct, > such as ->sk_no_check_[r,t]x, ->sk_userlocks ... > sock_setsockopt() may write to these bits, while holding the socket lock. > In case of AF_UNIX sockets, we change ->sk_shutdo