exec: Transform exec_update_mutex into a rw_semaphore
Status from this message: The following commit has been merged into the locking/core branch of tip:
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | rwsem: Implement down_read_killable_nestedinclude/ kernel/ | +16 | 1 reply | |
| 2/3 | rwsem: Implement down_read_interruptibleinclude/ kernel/ | +27 | 16 replies | |
| 3/3 | exec: Transform exec_update_mutex into a rw_semaphorefs/ fs/ include/ +5 more | +44 | 17 replies |
Reviews trailers per patch
2 of 3 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Waiman Long | Davidlohr Bueso |
|---|---|---|
| Series | A-b | |
| 1/3 | A-b | |
| 2/3 | A-b | |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3] exec: Transform exec_update_mutex into a rw_semaphore
Recently syzbot reported[0] that there is a deadlock amongst the users of exec_update_mutex.
The simplest and most robust solution appears to be making exec_update_mutex a read/write lock and having everything execept for exec take the lock for read.
This set of changes upgrades rwsem so it has the functionality needed and uses a rw_semaphore to replace the current mutex.
Eric W. Biederman (3):
rwsem: Implement down_read_killable_nested
rwsem: Implement down_read_interruptible
exec: Transform exec_update_mutex into a rw_semaphore
fs/exec.c | 12 ++++++------ fs/proc/base.c | 10 +++++----- include/linux/rwsem.h | 3 +++ include/linux/sched/signal.h | 11 ++++++----- init/init_task.c | 2 +- kernel/events/core.c | 12 ++++++------ kernel/fork.c | 6 +++--- kernel/kcmp.c | 30 +++++++++++++++--------------- kernel/locking/rwsem.c | 40 ++++++++++++++++++++++++++++++++++++++++ kernel/pid.c | 4 ++-- 10 files changed, 87 insertions(+), 43 deletions(-)
[0] https://lkml.kernel.org/r/[email protected]
Eric