Skip to contentSkip to conversation

exec-update-lock for v5.11

GIT PULL Merged Eric W. Biederman 2 participants 2 messages Dec 16, 2020

lore
Share & tools
lore
#0 lore raw

Linus,

Please pull the exec-update-lock-for-v5.11 branch from the git tree:

git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git exec-update-lock-for-v5.11

HEAD: f7cfd871ae0c5008d94b6f66834e7845caa93c15 exec: Transform exec_update_mutex into a rw_semaphore

These changes are on top of:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/rwsem

and have a slight conflict with 78af4dc949da ("perf: Break deadlock involving exec_update_mutex") which moves where the lock is taken in perf_event_open.

The key point of this is to transform exec_update_mutex into a rw_semaphore so readers can be separated from writers. This makes it easier to understand what the holders of the lock are doing, and makes it harder to contend or deadlock on the lock. The real deadlock fix wound up in perf_event_open.

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(-)

Eric

merge bot Merged
#1 lore raw
The pull request you sent on Tue, 15 Dec 2020 19:17:06 -0600:

The pull request you sent on Tue, 15 Dec 2020 19:17:06 -0600:

Quoted 1 line

git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git exec-update-lock-for-v5.11

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/d01e7f10dae29eba0f9ada82b65d24e035d5b2f9

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html