Re: [Patch net] netrom: fix locking in nr_find_socket()

2018-12-30 Thread David Miller
From: Cong Wang Date: Sat, 29 Dec 2018 13:56:38 -0800 > nr_find_socket(), nr_find_peer() and nr_find_listener() lock the > sock after finding it in the global list. However, the call path > requires BH disabled for the sock lock consistently. > > Actually the locking is unnecessary at this point

[Patch net] netrom: fix locking in nr_find_socket()

2018-12-29 Thread Cong Wang
nr_find_socket(), nr_find_peer() and nr_find_listener() lock the sock after finding it in the global list. However, the call path requires BH disabled for the sock lock consistently. Actually the locking is unnecessary at this point, we can just hold the sock refcnt to make sure it is not gone aft