History

futex: Add mutex around futex exit

The mutex will be used in subsequent changes to replace the busy looping of a waiter when the futex owner is currently executing the exit cleanup to prevent a potential live lock.

Thomas Gleixner committed 7 years ago

Commit 3f186d91 parent af8cbda3 files · +18 −0Browse files

Showing the changes to include/linux (2 of 3 files). Show all

Unified · Split

2 files
  1. include/linux/futex.h +1 −0
  2. include/linux/sched.h +1 −0
include/linux/futex.h+1−0
@@ -65,6 +65,7 @@ static inline void futex_init_task(struct task_struct *tsk) · 64 unmodified lines
6565 INIT_LIST_HEAD(&tsk->pi_state_list);
6666 tsk->pi_state_cache = NULL;
6767 tsk->futex_state = FUTEX_STATE_OK;
68+ mutex_init(&tsk->futex_exit_mutex);
6869 }
6970
7071 void futex_exit_recursive(struct task_struct *tsk);
include/linux/sched.h+1−0
@@ -1053,6 +1053,7 @@ struct task_struct { · 1052 unmodified lines
10531053 #endif
10541054 struct list_head pi_state_list;
10551055 struct futex_pi_state *pi_state_cache;
1056+ struct mutex futex_exit_mutex;
10561057 unsigned int futex_state;
10571058 #endif
10581059 #ifdef CONFIG_PERF_EVENTS

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t