Commit f39234d6 authored by Namhyung Kim's avatar Namhyung Kim Committed by David S. Miller

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: default avatarNamhyung Kim <namhyung@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a700d8be
...@@ -1557,6 +1557,8 @@ struct sk_buff *sock_alloc_send_skb(struct sock *sk, unsigned long size, ...@@ -1557,6 +1557,8 @@ struct sk_buff *sock_alloc_send_skb(struct sock *sk, unsigned long size,
EXPORT_SYMBOL(sock_alloc_send_skb); EXPORT_SYMBOL(sock_alloc_send_skb);
static void __lock_sock(struct sock *sk) static void __lock_sock(struct sock *sk)
__releases(&sk->sk_lock.slock)
__acquires(&sk->sk_lock.slock)
{ {
DEFINE_WAIT(wait); DEFINE_WAIT(wait);
...@@ -1573,6 +1575,8 @@ static void __lock_sock(struct sock *sk) ...@@ -1573,6 +1575,8 @@ static void __lock_sock(struct sock *sk)
} }
static void __release_sock(struct sock *sk) static void __release_sock(struct sock *sk)
__releases(&sk->sk_lock.slock)
__acquires(&sk->sk_lock.slock)
{ {
struct sk_buff *skb = sk->sk_backlog.head; struct sk_buff *skb = sk->sk_backlog.head;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment