mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
net: introduce lockdep_is_held and update various places to use it
The socket is either locked if we hold the slock spin_lock for lock_sock_fast and unlock_sock_fast or we own the lock (sk_lock.owned != 0). Check for this and at the same time improve that the current thread/cpu is really holding the lock. Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
61881cfb5a
commit
1e1d04e678
10 changed files with 26 additions and 17 deletions
|
@ -1046,7 +1046,7 @@ static int sock_fasync(int fd, struct file *filp, int on)
|
|||
return -EINVAL;
|
||||
|
||||
lock_sock(sk);
|
||||
wq = rcu_dereference_protected(sock->wq, sock_owned_by_user(sk));
|
||||
wq = rcu_dereference_protected(sock->wq, lockdep_sock_is_held(sk));
|
||||
fasync_helper(fd, filp, on, &wq->fasync_list);
|
||||
|
||||
if (!wq->fasync_list)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue