Re: [Patch net] llc: set SOCK_RCU_FREE in llc_sap_add_socket()

2018-10-15 Thread David Miller
From: Cong Wang Date: Thu, 11 Oct 2018 11:15:13 -0700 > WHen an llc sock is added into the sk_laddr_hash of an llc_sap, > it is not marked with SOCK_RCU_FREE. > > This causes that the sock could be freed while it is still being > read by __llc_lookup_established() with RCU read lock. sock is > r

[Patch net] llc: set SOCK_RCU_FREE in llc_sap_add_socket()

2018-10-11 Thread Cong Wang
WHen an llc sock is added into the sk_laddr_hash of an llc_sap, it is not marked with SOCK_RCU_FREE. This causes that the sock could be freed while it is still being read by __llc_lookup_established() with RCU read lock. sock is refcounted, but with RCU read lock, nothing prevents the readers gett