netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lance Richardson <lrichard@redhat.com>
To: netdev@vger.kernel.org
Subject: [PATCH net 3/3] ipv4: eliminate lock count warnings in ping.c
Date: Wed,  6 Jan 2016 17:22:47 -0500	[thread overview]
Message-ID: <1452118967-32123-4-git-send-email-lrichard@redhat.com> (raw)
In-Reply-To: <1452118967-32123-1-git-send-email-lrichard@redhat.com>

Add lock release/acquire annotations to ping_seq_start() and
ping_seq_stop() to satisfy sparse.

Signed-off-by: Lance Richardson <lrichard@redhat.com>
---
 net/ipv4/ping.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
index e89094a..c117b21 100644
--- a/net/ipv4/ping.c
+++ b/net/ipv4/ping.c
@@ -1063,6 +1063,7 @@ static struct sock *ping_get_idx(struct seq_file *seq, loff_t pos)
 }
 
 void *ping_seq_start(struct seq_file *seq, loff_t *pos, sa_family_t family)
+	__acquires(ping_table.lock)
 {
 	struct ping_iter_state *state = seq->private;
 	state->bucket = 0;
@@ -1094,6 +1095,7 @@ void *ping_seq_next(struct seq_file *seq, void *v, loff_t *pos)
 EXPORT_SYMBOL_GPL(ping_seq_next);
 
 void ping_seq_stop(struct seq_file *seq, void *v)
+	__releases(ping_table.lock)
 {
 	read_unlock_bh(&ping_table.lock);
 }
-- 
2.5.0

  parent reply	other threads:[~2016-01-06 22:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-06 22:22 [PATCH net 0/3] ipv4: fix various issues reported by sparse Lance Richardson
2016-01-06 22:22 ` [PATCH net 1/3] ipv4: fix endianness warnings in ip_tunnel_core.c Lance Richardson
2016-01-06 22:22 ` [PATCH net 2/3] ipv4: eliminate endianness warnings in ip_fib.h Lance Richardson
2016-01-06 22:22 ` Lance Richardson [this message]
2016-01-06 23:08 ` Fwd: [PATCH net 0/3] ipv4: fix various issues reported by sparse Lance Richardson
2016-01-09  2:31 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1452118967-32123-4-git-send-email-lrichard@redhat.com \
    --to=lrichard@redhat.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).