diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2025-08-10 08:11:39 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2025-08-10 08:11:39 +0300 |
commit | 8e8f6b635fae254252f7f52dd3e79fb68d06c332 (patch) | |
tree | 0fc125741f5c1ed4337e91e06909a1cf29d004ab | |
parent | 561c80369df0733ba0574882a1635287b20f9de2 (diff) | |
parent | e703b7e247503b8bf87b62c02a4392749b09eca8 (diff) |
Merge tag 'locking_urgent_for_v6.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull locking fix from Borislav Petkov:
- Prevent a futex hash leak due to different mm lifetimes
* tag 'locking_urgent_for_v6.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
futex: Move futex cleanup to __mmdrop()
-rw-r--r-- | kernel/fork.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index c4ada32598bd..af673856499d 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -689,6 +689,7 @@ void __mmdrop(struct mm_struct *mm) mm_pasid_drop(mm); mm_destroy_cid(mm); percpu_counter_destroy_many(mm->rss_stat, NR_MM_COUNTERS); + futex_hash_free(mm); free_mm(mm); } @@ -1137,7 +1138,6 @@ static inline void __mmput(struct mm_struct *mm) if (mm->binfmt) module_put(mm->binfmt->module); lru_gen_del_mm(mm); - futex_hash_free(mm); mmdrop(mm); } |