From nobody Tue Apr 7 22:02:47 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 D34293D6489; Wed, 11 Mar 2026 11:04:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773227057; cv=none; b=tH+X3sZqxg+OwCgsaVY4Xr4B2k3qEPIyJcz/Ab06iJ/O2xDQtkHkpHGwuBSJ4pysis6EeMngczeyKNd2H9/N7dzB4Wi3SdkfrEiglMCiPGyH1+Qsu4rcj6l4FPnp4DDO//3KcLPu71TRVf1W97MycIVJVQeI8qSnhHL8szQeags= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773227057; c=relaxed/simple; bh=dTZwTpY8eIp1bHM6FgFI/zq5cu53Q2tstFwWH/JOpEQ=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=npvatp3HXCk342cGtQN5cYWpc2atFp9+YPQjqsO1GIVLM/BW9BkDfN2gk7N9zfWPKuQc2QGtgXHfePIRk8wLyz1FwVfeYgMOj2c1wHkzbhGs4MeE8pJizyya6thI6wm0/sxCiTIhjZND0ZtZPcQXLknUoA2tWiEW5MT06FOhDFQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=1rmvjv3Y; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=NLkduSZW; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="1rmvjv3Y"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="NLkduSZW" Date: Wed, 11 Mar 2026 11:04:06 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773227048; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Sfy01FAeJTZj6cVcrpnWgpEwLoWQWPzZ9i8n216u4ek=; b=1rmvjv3YGJHN7Z7nouKgHQMYbejuPejqbJA0pxu6LiRF567iIQcrlZMwi7sLznVEWsGz36 RdYMDywNpwl2EJQahbA8tbb+PqFftjvILdzDRTCXxqmyEyZQT2K4ECYK3KQkprKLlHR6YH R1jMiR3sMFoX+ltre9ljqooEhOcBiMuPSD0mkPbUVb/cLVfbe3+FjTMg993S8KWvA25bxG HcaTXxP5MARA5hGp89Te8B3RSeLtXA4UZWEf7SoEf7j5LSLSTdBBLK5U6L5AcAoIGAb67l bawWRMwUIwoT+gXdFo5cPNA3Vff9DxPC4uBtyCXcUY1z98nnEKJRuQAGSk+F8Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773227048; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Sfy01FAeJTZj6cVcrpnWgpEwLoWQWPzZ9i8n216u4ek=; b=NLkduSZWmCO7stCIQOkeBDInslE29ZkQNjEPJN7uUwcl7NZFfCdIsm2eNqq/d5DUn1fleM AW+GV8NvjihaG5Cw== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/urgent] sched/mmcid: Remove pointless preempt guard Cc: Thomas Gleixner , "Peter Zijlstra (Intel)" , "Matthieu Baerts (NGI0)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260310202526.116363613@kernel.org> References: <20260310202526.116363613@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177322704681.1647592.5311667928355977046.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the sched/urgent branch of tip: Commit-ID: 7574ac6e49789ddee1b1be9b2afb42b4a1b4b1f4 Gitweb: https://git.kernel.org/tip/7574ac6e49789ddee1b1be9b2afb42b4a= 1b4b1f4 Author: Thomas Gleixner AuthorDate: Tue, 10 Mar 2026 21:29:04 +01:00 Committer: Peter Zijlstra CommitterDate: Wed, 11 Mar 2026 12:01:06 +01:00 sched/mmcid: Remove pointless preempt guard This is a leftover from the early versions of this function where it could be invoked without mm::mm_cid::lock held. Remove it and add lockdep asserts instead. Fixes: 653fda7ae73d ("sched/mmcid: Switch over to the new mechanism") Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Tested-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20260310202526.116363613@kernel.org --- kernel/sched/core.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index ee59cd1..f56156f 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -10684,6 +10684,8 @@ static void mm_cid_fixup_tasks_to_cpus(void) =20 static bool sched_mm_cid_add_user(struct task_struct *t, struct mm_struct = *mm) { + lockdep_assert_held(&mm->mm_cid.lock); + t->mm_cid.active =3D 1; mm->mm_cid.users++; return mm_update_max_cids(mm); @@ -10736,12 +10738,12 @@ static void sched_mm_cid_fork(struct task_struct = *t) =20 static bool sched_mm_cid_remove_user(struct task_struct *t) { + lockdep_assert_held(&t->mm->mm_cid.lock); + t->mm_cid.active =3D 0; - scoped_guard(preempt) { - /* Clear the transition bit */ - t->mm_cid.cid =3D cid_from_transit_cid(t->mm_cid.cid); - mm_unset_cid_on_task(t); - } + /* Clear the transition bit */ + t->mm_cid.cid =3D cid_from_transit_cid(t->mm_cid.cid); + mm_unset_cid_on_task(t); t->mm->mm_cid.users--; return mm_update_max_cids(t->mm); }