Commit 4b78e201 authored by Jules Irenge's avatar Jules Irenge Committed by Linus Torvalds

ipc/msg: add missing annotation for freeque()

Sparse reports a warning at freeque()

warning: context imbalance in freeque() - unexpected unlock

The root cause is the missing annotation at freeque()

Add the missing __releases(RCU) annotation
Add the missing __releases(&msq->q_perm) annotation
Signed-off-by: default avatarJules Irenge <jbi.octave@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Lu Shuaibing <shuaibinglu@126.com>
Cc: Nathan Chancellor <natechancellor@gmail.com>
Cc: Manfred Spraul <manfred@colorfullife.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Link: http://lkml.kernel.org/r/20200403160505.2832-2-jbi.octave@gmail.comSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 92fb1db2
...@@ -268,6 +268,8 @@ static void expunge_all(struct msg_queue *msq, int res, ...@@ -268,6 +268,8 @@ static void expunge_all(struct msg_queue *msq, int res,
* before freeque() is called. msg_ids.rwsem remains locked on exit. * before freeque() is called. msg_ids.rwsem remains locked on exit.
*/ */
static void freeque(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp) static void freeque(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp)
__releases(RCU)
__releases(&msq->q_perm)
{ {
struct msg_msg *msg, *t; struct msg_msg *msg, *t;
struct msg_queue *msq = container_of(ipcp, struct msg_queue, q_perm); struct msg_queue *msq = container_of(ipcp, struct msg_queue, q_perm);
......
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