Skip to content

Commit b786c6a

Browse files
jirislabyIngo Molnar
authored andcommitted
relay: fix lock imbalance in relay_late_setup_files
One fail path in relay_late_setup_files() omits mutex_unlock(&relay_channels_mutex); Add it. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
1 parent fdb6a8f commit b786c6a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎kernel/relay.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,8 +663,10 @@ int relay_late_setup_files(struct rchan *chan,
663663

664664
mutex_lock(&relay_channels_mutex);
665665
/* Is chan already set up? */
666-
if (unlikely(chan->has_base_filename))
666+
if (unlikely(chan->has_base_filename)) {
667+
mutex_unlock(&relay_channels_mutex);
667668
return -EEXIST;
669+
}
668670
chan->has_base_filename = 1;
669671
chan->parent = parent;
670672
curr_cpu = get_cpu();

0 commit comments

Comments
 (0)