hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/net/netlink/diag.c
....@@ -94,6 +94,7 @@
9494 struct net *net = sock_net(skb->sk);
9595 struct netlink_diag_req *req;
9696 struct netlink_sock *nlsk;
97
+ unsigned long flags;
9798 struct sock *sk;
9899 int num = 2;
99100 int ret = 0;
....@@ -152,7 +153,7 @@
152153 num++;
153154
154155 mc_list:
155
- read_lock(&nl_table_lock);
156
+ read_lock_irqsave(&nl_table_lock, flags);
156157 sk_for_each_bound(sk, &tbl->mc_list) {
157158 if (sk_hashed(sk))
158159 continue;
....@@ -167,13 +168,13 @@
167168 NETLINK_CB(cb->skb).portid,
168169 cb->nlh->nlmsg_seq,
169170 NLM_F_MULTI,
170
- sock_i_ino(sk)) < 0) {
171
+ __sock_i_ino(sk)) < 0) {
171172 ret = 1;
172173 break;
173174 }
174175 num++;
175176 }
176
- read_unlock(&nl_table_lock);
177
+ read_unlock_irqrestore(&nl_table_lock, flags);
177178
178179 done:
179180 cb->args[0] = num;