]> git.baikalelectronics.ru Git - kernel.git/commit
tcp_metrics: fix wrong lockdep annotations
authorEric Dumazet <edumazet@google.com>
Mon, 16 Mar 2015 14:14:34 +0000 (07:14 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Mar 2015 20:32:23 +0000 (16:32 -0400)
commit134b85642e91b548fa1e4f557087002256368919
treeeb41d9d508745c09bde7dd2b56dc83f6c9d0b0d6
parentbb3acaadf83e58b87dff3c1255c9329a9127f21e
tcp_metrics: fix wrong lockdep annotations

Changes in tcp_metric hash table are protected by tcp_metrics_lock
only, not by genl_mutex

While we are at it use deref_locked() instead of rcu_dereference()
in tcp_new() to avoid unnecessary barrier, as we hold tcp_metrics_lock
as well.

Reported-by: Andrew Vagin <avagin@parallels.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Fixes: 9ac1aafd4d5a ("tcp_metrics: Use a single hash table for all network namespaces.")
Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_metrics.c