diff options
author | Thomas Graf <tgraf@suug.ch> | 2014-08-13 10:38:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-14 18:13:40 -0400 |
commit | 9ce12eb16ffb143f3a509da86283ddd0b10bcdb3 (patch) | |
tree | c7a478ce8b7854149a2d2647fdc820622b5becf5 /net | |
parent | 93f560811e80216e98f3fcec220aa0f8836b09af (diff) |
netlink: Annotate RCU locking for seq_file walker
Silences the following sparse warnings:
net/netlink/af_netlink.c:2926:21: warning: context imbalance in 'netlink_seq_start' - wrong count at exit
net/netlink/af_netlink.c:2972:13: warning: context imbalance in 'netlink_seq_stop' - unexpected unlock
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/netlink/af_netlink.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 2e152e5f2186..c416725d28c4 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c | |||
@@ -2921,6 +2921,7 @@ static struct sock *netlink_seq_socket_idx(struct seq_file *seq, loff_t pos) | |||
2921 | } | 2921 | } |
2922 | 2922 | ||
2923 | static void *netlink_seq_start(struct seq_file *seq, loff_t *pos) | 2923 | static void *netlink_seq_start(struct seq_file *seq, loff_t *pos) |
2924 | __acquires(RCU) | ||
2924 | { | 2925 | { |
2925 | rcu_read_lock(); | 2926 | rcu_read_lock(); |
2926 | return *pos ? netlink_seq_socket_idx(seq, *pos - 1) : SEQ_START_TOKEN; | 2927 | return *pos ? netlink_seq_socket_idx(seq, *pos - 1) : SEQ_START_TOKEN; |
@@ -2970,6 +2971,7 @@ static void *netlink_seq_next(struct seq_file *seq, void *v, loff_t *pos) | |||
2970 | } | 2971 | } |
2971 | 2972 | ||
2972 | static void netlink_seq_stop(struct seq_file *seq, void *v) | 2973 | static void netlink_seq_stop(struct seq_file *seq, void *v) |
2974 | __releases(RCU) | ||
2973 | { | 2975 | { |
2974 | rcu_read_unlock(); | 2976 | rcu_read_unlock(); |
2975 | } | 2977 | } |