diff options
author | Cong Wang <xiyou.wangcong@gmail.com> | 2018-04-02 14:01:27 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-04-04 11:13:40 -0400 |
commit | 3848ec5dc82ce648a84ed10021ce2562fdac7c6a (patch) | |
tree | 9d59bf7a0f5607bcc1d7172663ef69c46823e53f /net | |
parent | 51508179ecc6dda46c90c7d2de4971112eb57306 (diff) |
af_unix: remove redundant lockdep class
After commit 581319c58600 ("net/socket: use per af lockdep classes for sk queues")
sock queue locks now have per-af lockdep classes, including unix socket.
It is no longer necessary to workaround it.
I noticed this while looking at a syzbot deadlock report, this patch
itself doesn't fix it (this is why I don't add Reported-by).
Fixes: 581319c58600 ("net/socket: use per af lockdep classes for sk queues")
Cc: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/unix/af_unix.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index aded82da1aea..68bb70a62afe 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c | |||
@@ -745,14 +745,6 @@ static struct proto unix_proto = { | |||
745 | .obj_size = sizeof(struct unix_sock), | 745 | .obj_size = sizeof(struct unix_sock), |
746 | }; | 746 | }; |
747 | 747 | ||
748 | /* | ||
749 | * AF_UNIX sockets do not interact with hardware, hence they | ||
750 | * dont trigger interrupts - so it's safe for them to have | ||
751 | * bh-unsafe locking for their sk_receive_queue.lock. Split off | ||
752 | * this special lock-class by reinitializing the spinlock key: | ||
753 | */ | ||
754 | static struct lock_class_key af_unix_sk_receive_queue_lock_key; | ||
755 | |||
756 | static struct sock *unix_create1(struct net *net, struct socket *sock, int kern) | 748 | static struct sock *unix_create1(struct net *net, struct socket *sock, int kern) |
757 | { | 749 | { |
758 | struct sock *sk = NULL; | 750 | struct sock *sk = NULL; |
@@ -767,8 +759,6 @@ static struct sock *unix_create1(struct net *net, struct socket *sock, int kern) | |||
767 | goto out; | 759 | goto out; |
768 | 760 | ||
769 | sock_init_data(sock, sk); | 761 | sock_init_data(sock, sk); |
770 | lockdep_set_class(&sk->sk_receive_queue.lock, | ||
771 | &af_unix_sk_receive_queue_lock_key); | ||
772 | 762 | ||
773 | sk->sk_allocation = GFP_KERNEL_ACCOUNT; | 763 | sk->sk_allocation = GFP_KERNEL_ACCOUNT; |
774 | sk->sk_write_space = unix_write_space; | 764 | sk->sk_write_space = unix_write_space; |