Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b786c6a9 authored by Jiri Slaby's avatar Jiri Slaby Committed by Ingo Molnar
Browse files

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: default avatarJiri Slaby <jirislaby@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent fdb6a8f4
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -663,8 +663,10 @@ int relay_late_setup_files(struct rchan *chan,


	mutex_lock(&relay_channels_mutex);
	mutex_lock(&relay_channels_mutex);
	/* Is chan already set up? */
	/* Is chan already set up? */
	if (unlikely(chan->has_base_filename))
	if (unlikely(chan->has_base_filename)) {
		mutex_unlock(&relay_channels_mutex);
		return -EEXIST;
		return -EEXIST;
	}
	chan->has_base_filename = 1;
	chan->has_base_filename = 1;
	chan->parent = parent;
	chan->parent = parent;
	curr_cpu = get_cpu();
	curr_cpu = get_cpu();