diff options
Diffstat (limited to 'net/ipv4/inet_diag.c')
| -rw-r--r-- | net/ipv4/inet_diag.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c index dbeacd8b0f90..def007ec1d6f 100644 --- a/net/ipv4/inet_diag.c +++ b/net/ipv4/inet_diag.c | |||
| @@ -836,12 +836,16 @@ static int inet_diag_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) | |||
| 836 | return inet_diag_get_exact(skb, nlh); | 836 | return inet_diag_get_exact(skb, nlh); |
| 837 | } | 837 | } |
| 838 | 838 | ||
| 839 | static DEFINE_MUTEX(inet_diag_mutex); | ||
| 840 | |||
| 839 | static void inet_diag_rcv(struct sock *sk, int len) | 841 | static void inet_diag_rcv(struct sock *sk, int len) |
| 840 | { | 842 | { |
| 841 | unsigned int qlen = 0; | 843 | unsigned int qlen = 0; |
| 842 | 844 | ||
| 843 | do { | 845 | do { |
| 846 | mutex_lock(&inet_diag_mutex); | ||
| 844 | netlink_run_queue(sk, &qlen, &inet_diag_rcv_msg); | 847 | netlink_run_queue(sk, &qlen, &inet_diag_rcv_msg); |
| 848 | mutex_unlock(&inet_diag_mutex); | ||
| 845 | } while (qlen); | 849 | } while (qlen); |
| 846 | } | 850 | } |
| 847 | 851 | ||
