From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 2E57E3E173E for ; Fri, 22 May 2026 11:31:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779449479; cv=none; b=so/zFXGwqZ1MsxCPwabejyCB3XVpip6S9aZ7KbuHyuIdNMYucK+vLgCLnpYLRZuZwP3uGz8ZdlFg4lFlx3LeaoDYI3YoLm/DtYgI5B+KBCT4w8GtZ4nc6F9RZowPpDo2UEm2qCr1m0jEbdR2erKJXFfdDwlbrSVtNp3GXlpKqWA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779449479; c=relaxed/simple; bh=Y3llI5vW7oBmdqjBj8MmgizWAyTqxPTh0GY+DO/rqT4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aodMjTlX8VqWTyA5EesEkWjtFNwJA+lw6QqdEwya0qEz/9vfg8Qu2Mebd89PBLK+pZyUsVhT+PfVomhPwcRYHlfpjLpqN93UAzcyJtlKggyXBKw71ORgsSlxR+Z1jGyTM5yw/Tre+YQ0RY+OGgIEllLXuYVa4wp1e9As7cxp3xQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=a4i/2fIQ; arc=none smtp.client-ip=90.155.92.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="a4i/2fIQ" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=AeD/YRZAG1KztvlPvBL0UescaMCc9n2w6wjIVfcTFT4=; b=a4i/2fIQGdBBPYqZN0hvQ7MMBR j2oaBHKl97yupTDNzKgxRnQAwvEwxZKH81cdQpC19vB+QwgUPKCvCUB4DEaPJBy0tVYsTmzRwVqfg 8AtbklT3+GVAsuw4/bIRTR3kPxC5i/pOvyS9bcSB9yIMhvaqNG3VejlYDlKgRpaI9asr9afZ6WpbP VMgZPF5GI97iUCXUbdxH4ybzKGNAsDikVygMx99WD1SoUgCcR3va2GYaaXzmsSz3m87iKBLzy1RF1 O6Tk0Yn3Nw77mc+8eJJits1Jnges+BRaydzNZFm8HDMPl0RsMvQR6EL786/H37SgdHyuBrsFwWokW LurMB9RQ==; Received: from 2001-1c00-8d85-4b00-266e-96ff-fe07-7dcc.cable.dynamic.v6.ziggo.nl ([2001:1c00:8d85:4b00:266e:96ff:fe07:7dcc] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.99.1 #2 (Red Hat Linux)) id 1wQO5f-000000048TV-3fbC; Fri, 22 May 2026 11:30:56 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 08E1F300446; Fri, 22 May 2026 13:30:55 +0200 (CEST) Date: Fri, 22 May 2026 13:30:54 +0200 From: Peter Zijlstra To: John Stultz Cc: LKML , Joel Fernandes , Qais Yousef , Ingo Molnar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Valentin Schneider , Steven Rostedt , Ben Segall , Zimuzo Ezeozue , Will Deacon , Waiman Long , Boqun Feng , "Paul E. McKenney" , Metin Kaya , Xuewen Yan , K Prateek Nayak , Thomas Gleixner , Daniel Lezcano , Suleiman Souhlal , kuyo chang , hupu , kernel-team@android.com Subject: Re: [PATCH v29 5/9] sched: Have try_to_wake_up() handle return-migration for PROXY_WAKING case Message-ID: <20260522113054.GO3126523@noisy.programming.kicks-ass.net> References: <20260512025635.2840817-1-jstultz@google.com> <20260512025635.2840817-6-jstultz@google.com> 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 In-Reply-To: <20260512025635.2840817-6-jstultz@google.com> On Tue, May 12, 2026 at 02:56:15AM +0000, John Stultz wrote: > migrate_task: > proxy_migrate_task(rq, rf, p, owner_cpu); > @@ -7107,6 +7101,9 @@ static void __sched notrace __schedule(int sched_mode) > if (sched_proxy_exec()) { > struct task_struct *prev_donor = rq->donor; > > + if (!prev_state && prev->blocked_on) > + clear_task_blocked_on(prev, NULL); > + > rq_set_donor(rq, next); > if (unlikely(next->blocked_on)) { > next = find_proxy_task(rq, next, &rf); This adds a @prev dereference, after you've just explained how we should not use @prev after a lock break.