Skip to content

Commit 8e8f6b6

Browse files
committed
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()
2 parents 561c803 + e703b7e commit 8e8f6b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/fork.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,7 @@ void __mmdrop(struct mm_struct *mm)
689689
mm_pasid_drop(mm);
690690
mm_destroy_cid(mm);
691691
percpu_counter_destroy_many(mm->rss_stat, NR_MM_COUNTERS);
692+
futex_hash_free(mm);
692693

693694
free_mm(mm);
694695
}
@@ -1137,7 +1138,6 @@ static inline void __mmput(struct mm_struct *mm)
11371138
if (mm->binfmt)
11381139
module_put(mm->binfmt->module);
11391140
lru_gen_del_mm(mm);
1140-
futex_hash_free(mm);
11411141
mmdrop(mm);
11421142
}
11431143

0 commit comments

Comments
 (0)