From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 6F8D11E5721 for ; Wed, 26 Mar 2025 13:18:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742995118; cv=none; b=sEE0JFshbTyoTTA0Q/hQLcoENAvMM4eCusv0J3+kc9B48HYXJSEzLILLgvv5M3biITkf/FFYNunMxXuQ+F3FDSjFW6YLkJSofL1XQeA/1dl2oTVlL81Az5nZ+6OL5XzXjXy3Jnw5Q9yyDaIHs0fpXLr6PS7Vy8FIOSnehpFiZo0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742995118; c=relaxed/simple; bh=QLuJch2ERBqlv87gIUZKCCRf5Bhm6d2MbEPzKoCKVYc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MZ38kSXyrF5WbUbycaPnuaSzMr4tWx5oxV0X3ZIiEtrgYNp5JuCM3o6HzewZKbqKb1nG/7maJD3tStRUG0GE3f1/UaK6sGJJ45BNI6Qg+CxZveB/ZLhxUblbUDNbHoQk5hSvHt66jtkC2natTInHzxQq0S9V3P5WV5eM8D9PViQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=gU7JodmN; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="gU7JodmN" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1742995114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=E8DVK2qL5FgbCY/uCKHMn6ye/SpMLqPirFZ8FryqEe8=; b=gU7JodmNMIkXEWDZXQlxpwzlkFh3F1Jq3aD7d5tsiHmK44lW2DH0aZ3s4xUGvZobKpl+y2 y09+XK+k31zxlKVbSjG3W8GTGOBBVEdHmFFCIDnHU3NsAPXrQfKmRScozdTByXc9ukxRij lxs8EUv3p6nS5Q89IJrKlHfcIK/PRcw= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-557-4onCRed-MtuYlvOKWRoB1A-1; Wed, 26 Mar 2025 09:18:30 -0400 X-MC-Unique: 4onCRed-MtuYlvOKWRoB1A-1 X-Mimecast-MFC-AGG-ID: 4onCRed-MtuYlvOKWRoB1A_1742995108 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 065BE1933B50; Wed, 26 Mar 2025 13:18:28 +0000 (UTC) Received: from pauld.westford.csb (unknown [10.22.88.205]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6BE10180A803; Wed, 26 Mar 2025 13:18:24 +0000 (UTC) Date: Wed, 26 Mar 2025 09:18:21 -0400 From: Phil Auld To: Steven Rostedt Cc: Harshit Agarwal , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Ben Segall , Mel Gorman , Valentin Schneider , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Jon Kohler , Gauri Patwardhan , Rahul Chunduru , Will Ton Subject: Re: [PATCH v2] sched/rt: Fix race in push_rt_task Message-ID: <20250326131821.GA144611@pauld.westford.csb> References: <20250214170844.201692-1-harshit@nutanix.com> <20250217115409.05599bd2@gandalf.local.home> Precedence: bulk X-Mailing-List: stable@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: <20250217115409.05599bd2@gandalf.local.home> X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 On Mon, Feb 17, 2025 at 11:54:09AM -0500 Steven Rostedt wrote: > On Fri, 14 Feb 2025 17:08:44 +0000 > Harshit Agarwal wrote: > > > Co-developed-by: Jon Kohler > > Signed-off-by: Jon Kohler > > Co-developed-by: Gauri Patwardhan > > Signed-off-by: Gauri Patwardhan > > Co-developed-by: Rahul Chunduru > > Signed-off-by: Rahul Chunduru > > Signed-off-by: Harshit Agarwal > > Tested-by: Will Ton > > --- > > Changes in v2: > > - As per Steve's suggestion, removed some checks that are done after > > obtaining the lock that are no longer needed with the addition of new > > check. > > - Moved up is_migration_disabled check. > > - Link to v1: > > https://lore.kernel.org/lkml/20250211054646.23987-1-harshit@nutanix.com/ > > --- > > kernel/sched/rt.c | 54 +++++++++++++++++++++++------------------------ > > 1 file changed, 26 insertions(+), 28 deletions(-) > > > Reviewed-by: Steven Rostedt (Google) > We've got some cases that look to be hitting this as well. I'm a little concerned about turning some runtime checks into BUG_ON()s but in this case I think we are really just going to trap out on !has_pushable_tasks() check first and if not, pick a different task and don't drop the lock so it should pass the BUG_ON()s and fail to match the original task. So... Reviewed-by: Phil Auld Cheers, Phil > Peter or Ingo, > > Care to take his patch > > Thanks, > > -- Steve > --