Skip to content

Commit 4b78e20

Browse files
irengetorvalds
authored andcommitted
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: Jules Irenge <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: Andrew Morton <[email protected]> Cc: Boqun Feng <[email protected]> Cc: Lu Shuaibing <[email protected]> Cc: Nathan Chancellor <[email protected]> Cc: Manfred Spraul <[email protected]> Cc: Davidlohr Bueso <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
1 parent 92fb1db commit 4b78e20

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ipc/msg.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ static void expunge_all(struct msg_queue *msq, int res,
268268
* before freeque() is called. msg_ids.rwsem remains locked on exit.
269269
*/
270270
static void freeque(struct ipc_namespace *ns, struct kern_ipc_perm *ipcp)
271+
__releases(RCU)
272+
__releases(&msq->q_perm)
271273
{
272274
struct msg_msg *msg, *t;
273275
struct msg_queue *msq = container_of(ipcp, struct msg_queue, q_perm);

0 commit comments

Comments
 (0)