You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
selftests/bpf: Fix potential unreleased lock
[ Upstream commit 47bb27a20d ]
This lock is not released if the program
return at the patched branch.
Signed-off-by: Chengfeng Ye <cyeaa@connect.ust.hk>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210827074140.118671-1-cyeaa@connect.ust.hk
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3ad66d6782
commit
b1d547f2f5
@@ -195,8 +195,10 @@ static void run_test(int cgroup_fd)
|
||||
|
||||
pthread_mutex_lock(&server_started_mtx);
|
||||
if (CHECK_FAIL(pthread_create(&tid, NULL, server_thread,
|
||||
(void *)&server_fd)))
|
||||
(void *)&server_fd))) {
|
||||
pthread_mutex_unlock(&server_started_mtx);
|
||||
goto close_server_fd;
|
||||
}
|
||||
pthread_cond_wait(&server_started, &server_started_mtx);
|
||||
pthread_mutex_unlock(&server_started_mtx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user