From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out203-205-221-239.mail.qq.com (out203-205-221-239.mail.qq.com [203.205.221.239]) (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 68E2E2C326D for ; Mon, 17 Aug 2026 04:48:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.205.221.239 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786942136; cv=none; b=cjA9PsX+47w3MEvrLvc0s/IlITg4FK3H7YQaMNoxBrClZ4qjWrWita7YG56LaOTH0pL6SxcOSUI0HmLn3RuUFDHLLVBxgrDxrqZXCgNF6xqd9RGHCT5vMcS/LgEwkR71RNWb+BPo/clBAODVwzhT5kBKbue0O5vCRqw3L9FiHPM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786942136; c=relaxed/simple; bh=UsNCZsp3LMOM6tAbw6y+N/m+atGTZFRjFendgQrYbrU=; h=Message-ID:From:To:Cc:Subject:Date:In-Reply-To:References: MIME-Version; b=RLTzXO6trcuNZU0LHqT4H+IrzYlYKSqdtrTGoXbx5FypNwXAu3hFmP9q/XvnyxUKqqsd8s1b3O3M3mCWaeBWGY4DD2rfDWDb2pC7KWLNbLX9udAaORDdmAzKo74morvpQGH1/ZK9K8HnAtVxlKpG/RDcJ1bHRtbXJ71PpwucwUU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=qq.com; spf=pass smtp.mailfrom=qq.com; dkim=pass (1024-bit key) header.d=qq.com header.i=@qq.com header.b=I3ULw32b; arc=none smtp.client-ip=203.205.221.239 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=qq.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qq.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=qq.com header.i=@qq.com header.b="I3ULw32b" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1786942124; bh=Yy8+LuHy011QXfOICn3pyb3eUjWMlJ9ABjjg1wmvKzE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=I3ULw32brsH5VkzDKOQjtf/SajLt+j7oWkhvdzhN61hExOMhzWaXH9mbsQ4qz4jyr 7kF1r5ZjRQMelQO1cToRszJI2RZ4eoW8Zb5vzG20Y4hJYTZ85RfhMKVtA38o5m7D7A KsT+SqlIjJsXkXdgbobiZ9QDbdbOEE5tRbiWc0Do= Received: from lxu-ped-host.. ([111.198.231.89]) by newxmesmtplogicsvrsza63-0.qq.com (NewEsmtp) with SMTP id C2A2142D; Mon, 17 Aug 2026 12:48:42 +0800 X-QQ-mid: xmsmtpt1786942122tsovf3j9g Message-ID: X-QQ-XMAILINFO: OckPfzeffiAGWreyc6gd6WARyxFUTwbo1Il7oUoLsoQPIQMZ6o+aUXcdVOuswJ s5hY8YGQKbegiN0+P4nl9UQOkVzxhPZ0CQH2j+9BpBttnHwa/3bi08ZQCTknCT6BzkZNvmYpp1Nm 3CitlEM4xx7hqObEbafALJBcowOX8YjhmQYd19UfbavxEnEc6EEA/WrOheRmMB3LNGTgpzilBRTe S3Ljfq8gDerVqDxzk7qZLspVhaDj5nQaZbNj9MZp1+M5mNuZmvO83F6/pA6BIdJNiJG2vfqw4ebh Z/2e1HZZ98pHhOQzQhiZxtOZ+G0ADALHjL+bXTc/1frajcVCtMxCILXRqggpXHkxQDYL+bFdLeqK rEX6SzXH99eJXiEuErOijg3v4chKf48q6YBmK2x1ee+3ChRuqDSwGwriYDIYumu4cBNdIVYxls3q 0l8vAW+2qLayY3ys8+tzeyaleaSoEomc4IdzujzLpxoK01YPDIH0BdNrpYfOr3cMgwTGnPi2RZRR vWACdYBKj0qTAViKIEY8U5J2tQ3V1lY1KbAhMlFNS8tWEKcxrQTGWhUEAzET4H7C8P+3OJ2qVSIX +khIzF1/GQExk4HGAQTeh/M4LnVXhkCYFYxoHzeJexgQvri3d4yFU2+mG4i/Dry2KENRFi/Olk3O xixAFv63S7pszAm3cDJLMPffOoGwpmVSem8f1uG2ssGwlqJWetSWsWTT1RCFwNtJKATr1X0VyQ56 3ebhP+TmqpsnQ+Qw2MOZ5nm+Qpe2+ZvXWxoWf09mudqVM+AZF3Zwr708iihr6ljK8PSsayJpvh0f lqZeSNIx3os+J+DUUi6lshmZEgaCS44g0Z2o4V/oL+x8FTLmEmnxduvgiWBivZ0XYbadQnIPSYYX Agvxki3IESFK9EFofCavSxUw2cv3SvWa9FXoJPhJo1I7ME7L9QvK1tdMDTaRQvEVHsjOkJodaEGh S/Geny40dft4ylcIchZcbanuVIt/NKVLBFi+kmUKU9IODMMHeqtRpjreG1IapBpo/DLHHPWlM= X-QQ-XMRINFO: MPJ6Tf5t3I/ylTmHUqvI8+Wpn+Gzalws3A== From: Edward Adam Davis To: syzbot+9c28ada89c468ad30713@syzkaller.appspotmail.com Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [kernel?] WARNING in futex_pivot_pending Date: Mon, 17 Aug 2026 12:48:42 +0800 X-OQ-MSGID: <20260817044841.330459-2-eadavis@qq.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <6a807971.dbb3a75c.20434b.0018.GAE@google.com> References: <6a807971.dbb3a75c.20434b.0018.GAE@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit #syz test diff --git a/kernel/futex/core.c b/kernel/futex/core.c index 128c5752f225..a0b17d2f41da 100644 --- a/kernel/futex/core.c +++ b/kernel/futex/core.c @@ -1785,14 +1785,24 @@ static bool futex_pivot_pending(struct mm_struct *mm) { struct futex_mm_phash *mmph = &mm->futex.phash; struct futex_private_hash *fph; + unsigned int state; + bool ret; + + state = current->__state; + __set_current_state(TASK_RUNNING); + scoped_guard(mutex, &mmph->lock) { + if (!mmph->hash_new) { + ret = true; + goto out; + } - guard(mutex)(&mmph->lock); - - if (!mmph->hash_new) - return true; + fph = rcu_dereference_raw(mmph->hash); + ret = futex_ref_is_dead(fph); + } +out: + __set_current_state(state); + return ret; - fph = rcu_dereference_raw(mmph->hash); - return futex_ref_is_dead(fph); } static bool futex_hash_less(struct futex_private_hash *a,