tcp_metrics: fix wrong lockdep annotations
commit9f1ab18672bee992b6169bbfa2b5ae86b42e88a8
authorEric Dumazet <edumazet@google.com>
Mon, 16 Mar 2015 14:14:34 +0000 (16 07:14 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Mar 2015 20:32:23 +0000 (16 16:32 -0400)
treeeb41d9d508745c09bde7dd2b56dc83f6c9d0b0d6
parentbd76a116707bd2381da36cf7c3183df11293f1d6
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: 098a697b497e ("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