From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4EECA2BE7AB for ; Sat, 8 Aug 2026 19:42:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786218131; cv=none; b=M3HT9tlADvhRCCPEfxU+im0VjnFda0VBOo0EHh5shEItlBA/SCxUe9wVIr9sK9yGpjI+RpMgdaFleVtljq6BVsM7YSGk1ZUy0jFKbbtIxGL0ecEc7QjjtAFpUzYJ/tvq6WPRdv9TCiWzGyR77t6wyE0aQHYCMadKQnshpH/MUCM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786218131; c=relaxed/simple; bh=kzxv1mS/k3ZLhl8w6P9MT4n+O+o+K2W3yACRnNBjUgs=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=QdtgqZ7dWho5GQVhxpVMfTqRWsRjwJobYBpDL4qZ3b46EzuKHJuesj/+IK0QSqRhrvrvoofnxMVl44BZKUTJf12E467mLauuI+wjDF7W/S/5z6lEPbK8MwuOvFh0NWNyRW2bQDv0FCxFP7D0G/LO9zZlVfPpMMMGfHHhLQKeWtg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GUg77GJq; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GUg77GJq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C51D51F000E9; Sat, 8 Aug 2026 19:42:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786218130; bh=+8H7con+0HP4PejUnc9s045YT7ovE50bzWGR6B3Acc8=; h=Date:From:To:Cc:Subject; b=GUg77GJqYCgEaD73u69hJP9sG0xaL3VA1soHZTOPZt6V0NRpm8cZ5Q5A0dChhHNi8 0tsWNPYzp4WzZx6CMBcG2Zfsoounn1IkYgNwLfU7+EWoNoEHPvBOiOLKIeUltPT/Vh HJFPh/HHFjKiguXiGdCinVOeI3c8m1s6JnJ/lPdIFNM5MdgXnpWT/xPq0IwvotGYMw gkpG5NeKVe2r7kIhyfqJ+BGHL9p11UecCs7hbDkfqwcz7St3WClDbXY/vLq4yYe+dm 45WUQDR8XHRiJioEV+3eXKOhDvGpuXkoPHNZXtH+L3dUDPfVD85TnIQ/Yz1qtKo0WK L90ZjaX0TxixA== Date: Sat, 8 Aug 2026 21:42:04 +0200 From: Ingo Molnar To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Thomas Gleixner , Will Deacon , Waiman Long , Boqun Feng Subject: [GIT PULL] futex fix Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Linus, Please pull the latest locking/urgent Git tree from: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking-urgent-2026-08-08 # HEAD: 8e7ff730dd96519a333d1570edf1c3fabb6d3629 futex: Fix race in futex_pivot_pending() during private hash resize - Fix race in futex_pivot_pending() during private hash resize that can cause stuck tasks (Yao Kai) Thanks, Ingo ------------------> Yao Kai (1): futex: Fix race in futex_pivot_pending() during private hash resize kernel/futex/core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/futex/core.c b/kernel/futex/core.c index 2650d1e52803..128c5752f225 100644 --- a/kernel/futex/core.c +++ b/kernel/futex/core.c @@ -1783,14 +1783,15 @@ void futex_hash_free(struct mm_struct *mm) static bool futex_pivot_pending(struct mm_struct *mm) { + struct futex_mm_phash *mmph = &mm->futex.phash; struct futex_private_hash *fph; - guard(rcu)(); + guard(mutex)(&mmph->lock); - if (!mm->futex.phash.hash_new) + if (!mmph->hash_new) return true; - fph = rcu_dereference(mm->futex.phash.hash); + fph = rcu_dereference_raw(mmph->hash); return futex_ref_is_dead(fph); }