diff options
author | Namhyung Kim <namhyung@gmail.com> | 2010-09-07 23:48:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-09 18:02:39 -0400 |
commit | f39234d60617d37818b30991e6794643ce220296 (patch) | |
tree | 1aabce34fdfa06f1bc90b2281ac0a819a7df91ee /net | |
parent | a700d8be733bd593ea4797dfde17aed4f35213c0 (diff) |
net/core: add lock context change annotations in net/core/sock.c
__lock_sock() and __release_sock() releases and regrabs lock but
were missing proper annotations. Add it. This removes following
warning from sparse. (Currently __lock_sock() does not emit any
warning about it but I think it is better to add also.)
net/core/sock.c:1580:17: warning: context imbalance in '__release_sock' - unexpected unlock
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/sock.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index b05b9b6ddb87..f3a06c40d5e0 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -1557,6 +1557,8 @@ struct sk_buff *sock_alloc_send_skb(struct sock *sk, unsigned long size, | |||
1557 | EXPORT_SYMBOL(sock_alloc_send_skb); | 1557 | EXPORT_SYMBOL(sock_alloc_send_skb); |
1558 | 1558 | ||
1559 | static void __lock_sock(struct sock *sk) | 1559 | static void __lock_sock(struct sock *sk) |
1560 | __releases(&sk->sk_lock.slock) | ||
1561 | __acquires(&sk->sk_lock.slock) | ||
1560 | { | 1562 | { |
1561 | DEFINE_WAIT(wait); | 1563 | DEFINE_WAIT(wait); |
1562 | 1564 | ||
@@ -1573,6 +1575,8 @@ static void __lock_sock(struct sock *sk) | |||
1573 | } | 1575 | } |
1574 | 1576 | ||
1575 | static void __release_sock(struct sock *sk) | 1577 | static void __release_sock(struct sock *sk) |
1578 | __releases(&sk->sk_lock.slock) | ||
1579 | __acquires(&sk->sk_lock.slock) | ||
1576 | { | 1580 | { |
1577 | struct sk_buff *skb = sk->sk_backlog.head; | 1581 | struct sk_buff *skb = sk->sk_backlog.head; |
1578 | 1582 | ||