From nobody Tue Sep 29 07:39:15 2026 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92A24442138 for ; Mon, 10 Aug 2026 19:40:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786390822; cv=none; b=LdhHQWBSZ98Xn+7TAkh36aqJd8SI4xEL9S7/dNEFFhgR7PaZz+gWz9CY5io3jY3/l6r1Ia5uShT6Bo1Rd59OvoTmxxZXYRbUWHrXRdAA1u+rBbDnpqxckdXYZuFZudBZc133FqOO8wooH+ZIg78F52mvsS4w2BaUCtrbyaHMesc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786390822; c=relaxed/simple; bh=OnuXGl0ethdObH0aY05B9eSD0mR9fLVNfgoP5uzlc9M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YjdG+fLp2r9oa9EZXnYd5cP4y991B0VfjKwW8QxQckp8moFOBJMVrXwD6b1JSRR4KIxqwyrF5GXBACQDtuXsiNJjX9dgYoOlW6e0H+czuNN0cuA8ZojP+vyqgCR6KNkCBJIDjL52Iio1UzUa1bv7uhvuVc9KTIx5WNNFr6QnGp8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=FOCP1sN4; arc=none smtp.client-ip=209.85.218.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FOCP1sN4" Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-c1670dad7a8so316201866b.3 for ; Mon, 10 Aug 2026 12:40:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786390814; x=1786995614; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=QZEmNt2xvk8DgVJ1haHknaJRViHX9desP4cc5qWqOEo=; b=FOCP1sN4xu/bXIIcFusluqXnO14AC+/v5B2W44ClmpxSIxxWrrAV/2nuzL+8fxNUsp RiPdh/Yowp6NBEkq+lwuAeMNRsgAT1KAyI1KP48FlC6WYtmz0WJUGJ/uAg5qbABbzSG2 QmypcEJrajHUyQICRMKFZ1ClbsMphdZM8C24iv/yqoTJxJOtGYEK9DqE8ISob06+12DM xUxwzYGq0P81phORruOvHPXGJnXAluQsZQjdqoAVJ2b4/O1C+IWJL+i1AxCO1Yrepjqg uzdVm26dNE8owr112bSfe85UEsLonbxwV9dgCefLiGAdwQami13ZLQAt4SrRzHdh/+83 RMsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786390814; x=1786995614; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=QZEmNt2xvk8DgVJ1haHknaJRViHX9desP4cc5qWqOEo=; b=nC3FuPO8OSVaBdKoSWM+3fJVKlt1zBjvR+rvePIPqrODY0Xb/iLA8D0Rm8BuPPQDxN Wfq9vi4HQaAiiugwpvULTG9W40ccKt7qiYtGwgtj9FOoFBN5dOAWR5qrYng0IK3c9qUk Yqm1nSx7VfcpmDSyAeLm4KeKEGDRXHC5lE2jZ8DNhGWdHhQdkFg2ieEJAxUHeCKmSu5Z Vf15s4oL4RrDIjMJsFLSY8qbNrnTeDQML4EY5GB3DeACWKVn6GKgmEBwe0qcyNTMngq7 UtIwb9e3Oq05exKm0Joa+cBNR3J8ARC16a9x1nsUCf9s9IzMgQQ5xZP7LDPMjMNq70sd FY6w== X-Forwarded-Encrypted: i=1; AHgh+RosXPzZrRmmWryEADxBrd9W7J2dbn3lDoUMjyE1/wmirEfzknsysK+HId13TSP30RHtTw2TJ7KzGxtSn8M=@vger.kernel.org X-Gm-Message-State: AOJu0YxP0hNgLZPaFAZpHAX/EM/lJ0LdqJqlmOMuqzuUKWYRZWHOu9k2 dn6CI8dVBPt7klNzyaN721iJqcp0ABWgCfKPXOqdVYn0oyWkfjrOyrLv X-Gm-Gg: AR+sD12Hj2RMAAn43SK2gfMUEEoZvwfOf/UCPUPSR4Qc68Njr40cClksdMX+IkcQQi5 Vb9tlqRB1Gejmi4XQCEIl0L0a4zSqo0BRK0Y0TmsHp7+MULI9MV/9ro3gTWDwwXdPah72brSb4E m8BMY8rX18GmC3DfEumjvLyufbU8X6J9JwYfVphWT2h1RYvO9nIVx1EOK1wq4eFnXC0ePRuPS7i 6PvB3EZMXGgOtIBemdgBb5dsA4Oo7AAtCFKebLKGl/GSOJCOjSiQdX8MHVurgaA1dsDOP85G0dA CP8yjERCC2HMMbWlcNHfIqovCN9sBT31kglaovW+NUOG6uoCStMZwOAacV/Su8/gQMuZInWoZqg CG/DdfkNkslBQSkfuB0v1ys8pZ8u1DqnP1n1CbAwkgFjeZ7RKaHl1u6SVZ7bS8CIqfD5dyGGUYf p18GyRGUzY10/j6bHLYKXJdDzFSDCTxT65/9lSH04YLMXB+6uHPpkpLge+CKg2cUozpyHCGvnQl 6rNc3p21wo1+457L4YD09tOjzDLyTNhusHS3LNjfw== X-Received: by 2002:a17:907:6d0b:b0:c12:83da:7eeb with SMTP id a640c23a62f3a-c207ece5c9amr1238601866b.19.1786390813898; Mon, 10 Aug 2026 12:40:13 -0700 (PDT) Received: from buildhost.darklands.se ([2001:9b1:ff:d701:51eb:176f:63d9:53f8]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c2080a29a84sm449928966b.3.2026.08.10.12.40.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2026 12:40:13 -0700 (PDT) From: Magnus Lindholm To: richard.henderson@linaro.org, mattst88@gmail.com, linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org Cc: glaubitz@physik.fu-berlin.de, mcree@orcon.net.nz, ink@unseen.parts, macro@orcam.me.uk, Magnus Lindholm , stable@vger.kernel.org Subject: [PATCH v2 1/7] alpha: run check_mmu_context() from finish_arch_post_lock_switch() Date: Mon, 10 Aug 2026 21:34:52 +0200 Message-ID: <20260810193902.3286353-2-linmag7@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260810193902.3286353-1-linmag7@gmail.com> References: <20260810193902.3286353-1-linmag7@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" check_mmu_context() clears asn_lock and acts on need_new_asn, but it runs only as the tail of switch_to(), after alpha_switch_to() returns. A newly forked task never gets there: its first context switch resumes at ret_from_fork, which goes to schedule_tail() and then to user space rather than returning to the code following alpha_switch_to(). A new kernel thread reaches schedule_tail() the same way, through ret_from_kernel_thread(). asn_lock is left set on that CPU, so the forked task runs user space with it set and interrupts enabled. A TLB shootdown IPI arriving in that window takes the deferred path, and the need_new_asn handshake meant to cover that never runs. finish_task_switch() calls finish_arch_post_lock_switch() with preemption disabled, on the CPU that ran switch_mm(), so hooking check_mmu_context() there completes the bookkeeping for both. The existing call from switch_to() then becomes redundant, since finish_task_switch() runs immediately afterwards and does the same work, so drop it. kthread_use_mm() and sched_force_init_mm() reach the same hook outside the scheduler's preemption-disabled switch tail, where the CPU may have changed since switch_mm(). check_mmu_context() acts on per-CPU state, so testing preemptible() expresses the required condition directly rather than naming particular callers. One consequence is worth stating, because the TLB patches that follow depend on it. After kthread_use_mm() the hook does nothing, so the asn_lock that ev5_switch_mm() set stays on that CPU until the next real context switch. A borrowed mm therefore has current->mm set while its context is not loaded, and the shootdown handlers rely on asn_locked() being true to take the conservative path for the whole of that window. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Signed-off-by: Magnus Lindholm --- arch/alpha/include/asm/mmu_context.h | 8 ++++++++ arch/alpha/include/asm/switch_to.h | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/alpha/include/asm/mmu_context.h b/arch/alpha/include/asm/= mmu_context.h index eee8fe836a59..825d3b9605c9 100644 --- a/arch/alpha/include/asm/mmu_context.h +++ b/arch/alpha/include/asm/mmu_context.h @@ -181,6 +181,14 @@ do { \ #define check_mmu_context() do { } while(0) #endif =20 +/* Per-CPU state: only safe while still on the switching CPU. */ +#define finish_arch_post_lock_switch finish_arch_post_lock_switch +static inline void finish_arch_post_lock_switch(void) +{ + if (!preemptible()) + check_mmu_context(); +} + __EXTERN_INLINE void ev5_activate_mm(struct mm_struct *prev_mm, struct mm_struct *next_mm) { diff --git a/arch/alpha/include/asm/switch_to.h b/arch/alpha/include/asm/sw= itch_to.h index 762b7f975310..35c4b2c9d992 100644 --- a/arch/alpha/include/asm/switch_to.h +++ b/arch/alpha/include/asm/switch_to.h @@ -9,7 +9,6 @@ extern struct task_struct *alpha_switch_to(unsigned long, s= truct task_struct *); #define switch_to(P,N,L) \ do { \ (L) =3D alpha_switch_to(virt_to_phys(&task_thread_info(N)->pcb), (P));= \ - check_mmu_context(); \ } while (0) =20 #endif /* __ALPHA_SWITCH_TO_H */ --=20 2.53.0 From nobody Tue Sep 29 07:39:15 2026 Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA08F443A83 for ; Mon, 10 Aug 2026 19:40:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786390826; cv=none; b=h1/ZoXwmFbq7Dv5AsVbVhjKWEEkiy6u9cry5K77Ndhybym8mUn4gr6u+iag4VV8erq4uneqDLjwp2UHZX9IFvVnJ+vtvr0gva8RTIgKSpN+6EODBDeft9jOrNFIIIPayevIqwi3+RVqC3amA9l66R2sHQ2V9zWn7Ow2jQRE2xyQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786390826; c=relaxed/simple; bh=2LEh4N21WEQPtgsS/wklt177lc/JUP+Si+EuLT16XJQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=s14h3tUmU2k7L18+q8ZZQTqe6hhVHHO1YUWZBtiakRUjrlXFa5mpefYgKWUCbbRku958dH+IB5Ozv/ivxvc/dlmWQujTF3/8rQKtnagRBc/RBAnLon+gc+3FbphAM43lDBnHC6ivoked4ysDCNF7L1raOj1LOK3OfmnY0bJRfFI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jgRp7vRO; arc=none smtp.client-ip=209.85.218.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jgRp7vRO" Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-c2055f5a993so215595866b.2 for ; Mon, 10 Aug 2026 12:40:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786390815; x=1786995615; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=gRKEDfsj3neRvHaPQAcC4yHGhjyN32qyFm0f+mmrXno=; b=jgRp7vROUkEtxTU2BcrmcGFPcb2nJO4t6WhS3WZ3yyXJ3YAPaDV4Qq/c+7YjH1jz9/ CZzds5tkjddT0Eer5/kg+M7+79At1xF0azUA8XLTNGaCai2rz/I8bVYYRj7F5nN0w3el MImIiBuuklKGmmjg4z+EHwfHgSOn6lMf1A43r4OGGLmgjmv9apGJfy+ImpQGB1x++xfp t3WXUplrMtShwMeFcD8FscrgU6Lhl4BCqRoLP7xpIAf0+F22QVUozoNg91XWROLA3NYV S9qJDqkNmP/ywAu6uARxtKNE4HoD4UL3d+CCzdVAABdnIVE5Da82NywHdsE7DYl3Ywq+ calg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786390815; x=1786995615; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=gRKEDfsj3neRvHaPQAcC4yHGhjyN32qyFm0f+mmrXno=; b=F+ChMQ79Z9UrNUrawAzI1ofuZPRzjc1p42nuN7Unno/4UjiEpQ0gB9XR55EghMSm3t 4sRuOqrhbADcrW42Dsmx8rUntcB1pGXQ3/pOp7qUkKboti7JLIMYx8Im2CGBdvJo/0Ks OthhHSo1/jr7144TLmMEdLW3PYE+TjrTgISSS1gbaAkJBGH8mmFpfRYrOWiMLif7YZM9 zSkbejqHgfbVS4hSP9k9E9ebMxudMoO315EkSC5E+qlCEpB8vRY/e2TuQx1k0gDtYE1W WJic6sMn3DuFjkPQlZw+Vko8Rg9FB02HV+d0/cdVjzuEf7M47qqFz+898+tIAkgPDBI/ SWYg== X-Forwarded-Encrypted: i=1; AHgh+Ro6NGwXMZQvX8uUPEeTYUwtZC2WAqTChKMDwxcsHvDKltkpgDWKC7PAbvLH4EDFPisU2CEDVoVqDd/OSds=@vger.kernel.org X-Gm-Message-State: AOJu0YynsodaNTulU4snbTBcf1G6nTcwcZr9gHsLEmYam++VOZ9t4A9Q gTSUsXb4OA8h7nQHjNlodXCCp2mCBe8VRl3a01PY3MiHTwe4aoLKi6nx X-Gm-Gg: AR+sD13x6x9lVIY+Qz+c1DYNu+P0+H28wU6kZg7yjvqrAsRZcofpnJ/140wYSi5PBHx h8gGbgETTThRSsErC+edMjtQgqXGG14OCQXxFGz50tj+4/+cWfT837fJ3QgIqbMm8GQuU06EKOd kzF06/QOQ271XGCWFTKFRtfgtI3pm43aoVPv8HdoCFcf/23vPrfu/2Eaxxdtwq1XonHZY7K3eas jVXKJ8L668fkI5HY6gb9k1TPx/a4hTcMwprduvEi36ipybLeW+V+4tTnWfEf0AshiADwVgv9Nz/ V2J9cF2Xd4oZYjzDTLaQntVpbtf9nNH+cLX4YvKkSCFGiMTMi5ea4bSH8sXEuFSvqB5PQCD+xaI II0LrPmkZ5u7fNX1PYznnJJBMyRZMoVA0wI5VpEM3FIndCGWqM/Ygvb3G6ZXHMXR2kk8hjOAws0 zBKPf4j3fr+cl68r5GH9SoNz//bOLL9YvxVH79gaDVy9QI+tOwwTP11tVvhUlyN5RJTBfXxBjDX eaJI0fc+gsXG4RWZzi4AxWW/ZcWEu8qMr8Osm4STQ== X-Received: by 2002:a17:907:5cd:b0:c1c:3b06:ed24 with SMTP id a640c23a62f3a-c207ed5cd1dmr1368830166b.28.1786390814821; Mon, 10 Aug 2026 12:40:14 -0700 (PDT) Received: from buildhost.darklands.se ([2001:9b1:ff:d701:51eb:176f:63d9:53f8]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c2080a29a84sm449928966b.3.2026.08.10.12.40.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2026 12:40:14 -0700 (PDT) From: Magnus Lindholm To: richard.henderson@linaro.org, mattst88@gmail.com, linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org Cc: glaubitz@physik.fu-berlin.de, mcree@orcon.net.nz, ink@unseen.parts, macro@orcam.me.uk, Magnus Lindholm , stable@vger.kernel.org Subject: [PATCH v2 2/7] alpha: only use a targeted tbi() when the target mm is really current Date: Mon, 10 Aug 2026 21:34:53 +0200 Message-ID: <20260810193902.3286353-3-linmag7@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260810193902.3286353-1-linmag7@gmail.com> References: <20260810193902.3286353-1-linmag7@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" ipi_flush_tlb_page() gates a targeted tbi() on current->active_mm. tbi() acts on the address space context currently loaded on the CPU, so it reaches an mm's translations only when a thread of that mm is running there. current->active_mm is not sufficient: under lazy TLB an idle or kernel task keeps an mm as its active_mm while a different ASN is loaded, so the invalidate hits the wrong context and the stale entry survives. Nothing retires the old ASN afterwards either, mm->context[cpu] still being valid, so the resuming thread can reuse it. Test current->mm instead and otherwise fall back to flush_tlb_other(), which clears mm->context[cpu] and forces a fresh ASN at the next switch whatever is loaded now. current->mm can be set while the mm's context is not loaded: a task that borrowed an mm through kthread_use_mm() has current->mm set, but ev5_switch_mm() only prepared the PCB and the asn_lock it set is still held, as described in the previous patch. The !asn_locked() test keeps this path conservative for the whole of that window. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Signed-off-by: Magnus Lindholm --- arch/alpha/kernel/smp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index ed06367ece57..1ad448105201 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c @@ -669,7 +669,8 @@ ipi_flush_tlb_page(void *x) struct flush_tlb_page_struct *data =3D x; struct mm_struct * mm =3D data->mm; =20 - if (mm =3D=3D current->active_mm && !asn_locked()) + /* A targeted tbi() needs a thread of MM to be current. */ + if (mm =3D=3D current->mm && !asn_locked()) flush_tlb_current_page(mm, data->vma, data->addr); else flush_tlb_other(mm); --=20 2.53.0 From nobody Tue Sep 29 07:39:15 2026 Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 01CE9443AA1 for ; Mon, 10 Aug 2026 19:40:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786390826; cv=none; b=ERjhkw50SIXDJyNpp39oHr9sC/0Ya24iHICdMK7Mf/HV73HD7TpTyx5GwI0ot+9MUId9znhVAPfq8/TYOQOLassQbPlsXu90h2CQjqSfNsGtnmwcFPz9nUsqB9xNwpn/dM9eChtVFcqfYmF9DThChp5unrhusQ4ED1WNK/IGINQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786390826; c=relaxed/simple; bh=fkhO9HAymugVq4OmMKfG9p3rUYCS/g1mLTnUWI2PGI4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eKYPR4AClodKyG0sJi6AGmg2WdmG3nVgIy1OC6TKnEuTas5eqr7Mo6bqL0Ss8fzcuOy9jHE1CL98msE2Qgt8VOI0OQlXBxvrudqiDcxAipbKNwV9DxmZhtr3JnSA41QaSR2/Xl0JjX/fxxVvR7UIlym/gJNIPGYuwMSvvdGOXII= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=IwWxG+ev; arc=none smtp.client-ip=209.85.218.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IwWxG+ev" Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-c1712a04ddaso354575766b.2 for ; Mon, 10 Aug 2026 12:40:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786390816; x=1786995616; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=NFDzrFtlZRT9MfM2jyoJYH75f+Nc89HfWr6+v0kWxgs=; b=IwWxG+ev8YDZEsCEDXJBnR5/l6cz4mbv74B/iq98c3ZcAuoiP00/PA5BOLg7BQn4Tn qPddw/Ix2PaZt074WVfsmR2fksdDCQ8yDbirZxyVEw+i2RZA15DqL68YTEHJpeItuFul XH2dC6Yr69uIYQUP8KOKij21Z46aIzhTcM748+yOPmgc4vda1UIxZI5IxpmqQktDHOfG Gs/i5vO5xl4jy6byUqSXaHQFCtpUCrwjVGcxgpsf9xWNPbWfE+3LB03N6dWAAGZAnXh+ CTUOg054XnOfwzaySoibLU90b6eH/P7esVC1EoOwOQCqg5Rl1lSbMVqJSgwnqsM964/G aJQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786390816; x=1786995616; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=NFDzrFtlZRT9MfM2jyoJYH75f+Nc89HfWr6+v0kWxgs=; b=joBbTpO1vZEry21YWdcgB8WvP9n2/HG+zpW2UPzN67yq8wq6ZfS/X7PE+hMu5oSh6/ YCQ6NQVwXAj9BAAZlZO0zq5JyUILoyvnj1OcpQMS53csoS2CY+i/8r9jzUJ3goeRYA2F 8YGrSEYJ7eJ6h/OTarHgY2P4ug236+FenYNOBFgm+iVQSBSr5f7rmrOzOC/H3f6i+2Y7 fw41H7sxgbxmBEVqUk/pdvv7uVQ68LoS2YGrStJJnmesJF7kaLeM8cX/rc0pWfsBso6r Laltkmd+NY1KQzErMRHBal+Bbi7650sU5rwwN8Kk16RIbxI5nSksoNn3vSmkHr7/n3IK bY5A== X-Forwarded-Encrypted: i=1; AHgh+RoCk+kiREZO3Jc2cWh7dvplY8QPIURtVkvkEIMj26i/uyXBmwFOc208/YcIE3264iTOSqbWcCNl0l8Dgao=@vger.kernel.org X-Gm-Message-State: AOJu0YyJ/AuWZH7abgouJC0UEdkrBtnv6VJ1w333Lb0BAjuXgvSBdczt LgsZ5FIAYUerRIjZqKQd+HNIeXW0zz/wXFyZ57RWfwLSTptGPfvWR8AC X-Gm-Gg: AR+sD127rxSSz6/BjWnX2J+1yTKGtkT0wPBLVh6LYqbxeDcIkrPBe5Ahy39trGUpUZk WM1jUHvHxDvsi0oqcjiVECgeXIqRRU9so5AFLf+f+uf762V92mgKN2KRBUhaVWu1qjaaTwBIOMu tCUmUOk2cYkroRfMHMkIkYzBe0fCCZQ7DkGaB6Eqp+ONC9TaF9z1icCNfdmFjiJ0Eq1p7OzOUh3 AcTzbJW/pXeS4AC7vB1qcs6tYYdjnXkHJQzHhsvmVKgJiCMeUE3ES9btuHO8Ql8SQX79kQZcoVu YlMkriKwK12c+Ct/P4I9vZdPHY/gGM1eagPcA4NRFzOsxLG7etwJgK8ZBYrSf02d0Oo60bVAOw/ ltRizyxtppq49EYmmTY/1+3HIDklxOYQ2UB+fpiazVOXQXoG5ZR56AwaZdRSm9VfoG3MOpxAaOm R761sP2lVwG2e2O74XTfivM4INEUxFpOYCG3Lb9uWV0gVdA3PO5GmURIB/w0RHR+FGdwfH0tXHT LAqb/UFt8gbY8hhwn6v6SRcaWY9ht0= X-Received: by 2002:a17:907:7245:b0:c20:899:b8bc with SMTP id a640c23a62f3a-c20c672433dmr236286366b.6.1786390815810; Mon, 10 Aug 2026 12:40:15 -0700 (PDT) Received: from buildhost.darklands.se ([2001:9b1:ff:d701:51eb:176f:63d9:53f8]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c2080a29a84sm449928966b.3.2026.08.10.12.40.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2026 12:40:15 -0700 (PDT) From: Magnus Lindholm To: richard.henderson@linaro.org, mattst88@gmail.com, linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org Cc: glaubitz@physik.fu-berlin.de, mcree@orcon.net.nz, ink@unseen.parts, macro@orcam.me.uk, Magnus Lindholm , stable@vger.kernel.org Subject: [PATCH v2 3/7] alpha: fix the local TLB invalidate in flush_tlb_page() Date: Mon, 10 Aug 2026 21:34:54 +0200 Message-ID: <20260810193902.3286353-4-linmag7@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260810193902.3286353-1-linmag7@gmail.com> References: <20260810193902.3286353-1-linmag7@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" flush_tlb_page() invalidates the calling CPU itself before asking the others, and gates that on current->active_mm. For a non-executable vma that means a targeted tbi(2, addr), which acts on the context currently loaded, so as in ipi_flush_tlb_page() it reaches nothing when only active_mm names the mm, and nothing forces the old ASN to be retired afterwards. Test current->mm instead. Reached in practice by folio_mkclean() from the writeback flusher kworker, which has no mm of its own: about half the calls during writeback of a shared mapping, and none at all on anonymous memory. The caller-CPU omission in the same function is fixed in the next patch. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Signed-off-by: Magnus Lindholm --- arch/alpha/kernel/smp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index 1ad448105201..7856d23b3384 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c @@ -684,7 +684,8 @@ flush_tlb_page(struct vm_area_struct *vma, unsigned lon= g addr) =20 preempt_disable(); =20 - if (mm =3D=3D current->active_mm) { + /* As in ipi_flush_tlb_page(): a targeted tbi() needs MM current. */ + if (mm =3D=3D current->mm) { flush_tlb_current_page(mm, vma, addr); if (atomic_read(&mm->mm_users) <=3D 1) { int cpu, this_cpu =3D smp_processor_id(); --=20 2.53.0 From nobody Tue Sep 29 07:39:15 2026 Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 00A49443AA0 for ; Mon, 10 Aug 2026 19:40:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786390835; cv=none; b=bzpmKFxVAo5JlFauqEplIVXL6cu2wKhMLpOLoSmvPFcv0toUbLOSYxHoDTbwyBJ2M1UQHymdy9ifWxrABVJdY2zDubX6P0uG+zWfSHJ7Ezea9SHUIu5PFkblwlLZfLQx9ekUv3MDUno5Gvb5+r9N++5TZ8VIs4SYPaqvKU6tjT4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786390835; c=relaxed/simple; bh=SPL4waYZ68I07oMi9zqix6oLnOBZXLRhkO7049FeIOs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lsD7Q0aCo2MiTR5XKNVUiCBoSzFflehylCtzC/BoQYC/JChMqky7lDLrHotgvzEB5b5WfAfOO6XzQ51YYzWBz6RE0kA3BLHYH2+MtbaenbvNieg2Pryl9ApnM+vIN9Bo7BB1mtCMIbsLNUtYobRa2b7eoEvuUkMRFM9Kd4+x9kc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=OhCqFi6U; arc=none smtp.client-ip=209.85.218.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OhCqFi6U" Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-c167aa9500dso2930466b.3 for ; Mon, 10 Aug 2026 12:40:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786390817; x=1786995617; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=cPXRarnAO1rxE2tnGzCY8f31rq9Ep14HorPF8zSq0IU=; b=OhCqFi6UtJdECMQe/r3cWXui8d7fzyM7NFq1YW3hBuE8bPwf3PA72L47soGZa6xj6p 7xC/gxrRJAtKZb+5mYJZrPEi9KUVuzc+/YpJM2n1oWlEkw2dzKIEoraygiETm0oi0v/S lS6MCWZUNGrHp/3X1Hb4JCi0ZTbzdrNfo0jNTLRhefGbtEJFQpX+6LtL3m9ZTzEpqch7 buqCzIzbfv4h/1P1Kar/R1LBAKdVdAcnxs+lPKt6748TkGC98o2NnjW5ygnp/BvCXbqU vZFccBXWCKmnHTzW6cvFvqJ9tH+b6drCRqIvdgc6wW9LYA5Uj0FgTsNcP9C4TVkUaCg+ CqhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786390817; x=1786995617; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=cPXRarnAO1rxE2tnGzCY8f31rq9Ep14HorPF8zSq0IU=; b=T6fq9GxgB3D7O/2q5JwlihGIeF5dBMd5TSSW+tCXSL7z4nONxSecJ2fX+WDkK+h41L VMnax7x/BUsNHrI4EyCTEJ8ctyaj7Sl9hdkicDROMsSEVJoEmtlMnbdej4j6OPb3YBaZ F6oGeViRXsc0SsY87etZZWalIHxMQFYu09uAPS17KU8FzgK3qFiJ8JBJw5TTTWV/eQp2 rb2s6B2kBQamM++/kakmNNF6sF62WolHYq8SBg5Qmf3wpT4a/J/l3OKRmZVVlioAI32U XCtDIOkme7EBkh3vHcHDl69SWkwmbSDSGTq3J051b20rH+SdMpGWS1wSH3Dzd71RkKzf FW/A== X-Forwarded-Encrypted: i=1; AHgh+Rp2bGeng0APkc7RGLxvp8FmpS6tGrZ/rPmNEutDP3ZjcA29nCvGd4oFvAWO9L3n5YIrcihpi0pfRdINGis=@vger.kernel.org X-Gm-Message-State: AOJu0YyWzhJ7ZGxDaxaliKBtoAhboz7bYO88ApVu5pWKiUvkcY+nLVI1 5WSmZhK1IEcUnrBbqjo9vWrSVzMCyNYp/UiqnHi8KltFAsNneAXfRacP59+4khzi X-Gm-Gg: AR+sD10Sx9W0fDNiHFTKait5MV+FuYCl2VzXk/g8d9XYnmdr9GvNXQSnJv+cjarL533 Qe+UWcbsZ3wXMGqjAVARSmWuOLpVEr2ngQayYwLwyUo4wzc41il2c4nqXLCYIYPWYMv+yRaAEXI snJRtCUsqaPXbbkuBmk1d3hPwcTPkVucAb6NipyzRz3gUNURnJ2WTh5ML9EVsvT23XUIvNkpMIf io/ytsff6daNJoJef1vfKhXJ9oNN0oX0G3V0FYbWVkm46cv3UqgBzGSZ9fflCcQPL5PAe6td7Hq ZxTXl5dcXADviqSkHEb2IJSGUe6+n9XoaTXf+GKrT25cBED3fk7oMJAeSxQZenmBHNPpQMYlY8u VT2ttXuOG6G/55sduCshJqLn0y6RpChjsUVWeQl8X4Lp02Pf0UaDKIlHCJ4G3GeXIMNMgHSQxlY pyPqXMp+/c1MSzeJW19kfi6TCFihZTgRE3xXi5Kt+jItSW/fxZHkmzBGp3gk71QYox46Jwt2q0I bOg4qs+UB7RjwD9z322wJP+QlTlDT0= X-Received: by 2002:a17:907:3f05:b0:c1a:5d49:f99d with SMTP id a640c23a62f3a-c2039c03342mr1839607366b.7.1786390817019; Mon, 10 Aug 2026 12:40:17 -0700 (PDT) Received: from buildhost.darklands.se ([2001:9b1:ff:d701:51eb:176f:63d9:53f8]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c2080a29a84sm449928966b.3.2026.08.10.12.40.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2026 12:40:16 -0700 (PDT) From: Magnus Lindholm To: richard.henderson@linaro.org, mattst88@gmail.com, linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org Cc: glaubitz@physik.fu-berlin.de, mcree@orcon.net.nz, ink@unseen.parts, macro@orcam.me.uk, Magnus Lindholm , stable@vger.kernel.org Subject: [PATCH v2 4/7] alpha: invalidate the local context in flush_tlb_page() Date: Mon, 10 Aug 2026 21:34:55 +0200 Message-ID: <20260810193902.3286353-5-linmag7@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260810193902.3286353-1-linmag7@gmail.com> References: <20260810193902.3286353-1-linmag7@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When the target mm is not current, flush_tlb_page() does nothing locally, and smp_call_function() reaches only the other CPUs. This CPU may still hold translations for the mm and can later reuse the old ASN together with them. Add the missing else branch. flush_tlb_other() clears mm->context[cpu] so a fresh ASN is taken at the next switch. With the previous patch this also covers a lazily borrowed mm, which no longer takes the targeted path. The uniprocessor implementations of flush_tlb_mm() and flush_icache_user_page() in asm/tlbflush.h and asm/cacheflush.h already contain exactly this branch. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Signed-off-by: Magnus Lindholm --- arch/alpha/kernel/smp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index 7856d23b3384..a5a42ae4a7d8 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c @@ -698,6 +698,9 @@ flush_tlb_page(struct vm_area_struct *vma, unsigned lon= g addr) preempt_enable(); return; } + } else { + /* smp_call_function() does not call back into this CPU. */ + flush_tlb_other(mm); } =20 data.vma =3D vma; --=20 2.53.0 From nobody Tue Sep 29 07:39:15 2026 Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E4A843B6D1 for ; Mon, 10 Aug 2026 19:40:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786390834; cv=none; b=n1SJJ82z12yQnXsVTa3y1HsQIRkxzRU2cBK1zhuEZP/HX0MizjsgBtyo/Ae1I6NOHKTLQY6tsPQuIYp0WOsymNBHMbFJsL6tP+3AM2Tj0H3iIOUS2JxX9vXO210PwtnQD8agQVeq/gjAVawXlx8ZakRFU7pTHuNhn3je3ql5wxo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786390834; c=relaxed/simple; bh=HYvMhIHogsEmsh3zuOs4+nenCywngBzCFU9HdpqBDvk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ba4t5D63dW5e+CSCZUxe6aXLXfB4gI5UNcXRuTCRFxDmcJZ5PdbCQtR0sFjFztVSyfuJN7y8lCD2/gPruCsOumHtY+NWzvllX2anT5JdNipEzkdkYoow2tnKRWRf1TPd9Hk5LoJJDF7uoHL7ZwJMRPdlzNzb826vw93Y+ba3bIU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=hCEO7LfI; arc=none smtp.client-ip=209.85.218.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hCEO7LfI" Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-c16794450aeso2982166b.2 for ; Mon, 10 Aug 2026 12:40:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786390818; x=1786995618; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=5i+hFEyj9xNww6KQk9eCZA+gjMFJ8e7FKLAkoQOfyOE=; b=hCEO7LfIJyAfgqwVbXJTe02c0rGlsOStheZx4mKk8Mv1XHyWOHR2ap6o7+1lPNMekd Q52kXlZtS8LVqYw+S6oc/qnmG0lNxKjX5wW/EOVt8mOY0+USEypDjbtoFtEOg2tLHmTV X7NEPcVUpi4jZEWn0eG/KvToKPwswD60c8yyNzoDnSiX3/HwbWxbOKt1yoVxX7JeqHNh byv6hERL1sGmX68CWL6nEdNB6qmNNFvolnJXzkzem4lRYih0R4EfHcuKxDwV2ZM5I1JO a1X4fgaxsEgjx4Ak2ZL+sNeVRCsUEsFsDo4qVRbzohFJksRy0rX9SfRlEhZEYAD9MYpu Fb0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786390818; x=1786995618; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=5i+hFEyj9xNww6KQk9eCZA+gjMFJ8e7FKLAkoQOfyOE=; b=RTb0EElN2SqAGyJF1Fd51s41tcozEYDNoSy5XHhXd3RFaYjut9USgQtLAygEDhC8Mj pyf9w4+4v1PTL4MmMJV7DwAPhobDoqg6IghM5AwexXQUB1KWkgxtZ4+8eEthBEN5dJ2H UQHLb2LeQfFw1ksJ+3yOMIdLwnu/p/uKFsJ+UApJ6rAmbKTtzMi2hAEq65O8bAXjJw0n MVYFTBvayKALKjntBFouahAsw5nbFDhtr799Am0YcMLBgeEltIFOlF10VRpgsMiiBFw2 Rkjh736tDdWwZHaMfytcXF0cTKfDfxCFmIfNE+EoDurpEV+s9sgjBaBWaD9UhjE8/3pE DxYQ== X-Forwarded-Encrypted: i=1; AHgh+RqXtcwhMcha4yad2bFKR/IGvm2tDXHyukKtuXk7TmXejj53arpOYHYbvkMXIFyoyJd9xsoqHqsf5+KXEyo=@vger.kernel.org X-Gm-Message-State: AOJu0YxQHUsuuDW1D7JscfFJBxzH5vNN9z3ducypELQ0P9CzKw2Hz9oo mSltUJVUlefSJChHkhbn6K97jhBVvVaXUOzct3MwORZlZnt5iifCvwqZ X-Gm-Gg: AR+sD13H33q2i88cMRwiEt12OjWhgzA1A/JJFRwiWc+ESXpvfVzfr+RVTqNtSL1MtxX evU3RdIoCkRejfnoisIwYMKIokfDZPm4ZkoP2TZB+GeBwJWmjroUeiO0N/Rjf7xtbrMksSgZCDl MsImxS1YV/1crEnOwCqiOExS68thLD86FInXcWpDXzHM/E+/o1qE5Hn8lIaq5fGEcXv5vEJr/F6 +LjVwj1r73pahqBu0ds0iTse37fnEs2mIuBqu2uxUeQpfUd+KVH0yv9Cb9gLoacy/M3JvI64XC+ Anb8JYhUJ6ZnEfFgPGFE8MwYOb0dkB1oDhs1ZDI2h2mxtKEP744CFkbms7Bhq3sqrCdvTrBAwOO HHWMJybW4tznnMaa6QCcTgyl3FSQvsuFTtTLT/ueSeOvodKFTcLdArj8g356I2TpmC9rmruHQd7 FvW+HOv+GFAcG90en6HWr49aJqHua/RWvqMPkULYKH20O5herTFNbpzlArg2HAO15aQmYPgjRyK +tFky7Rdu0QmtPjvoVM+07rtYbAv+Jvf5Dfwu2gOQ== X-Received: by 2002:a17:907:1688:b0:c15:ee0d:9a32 with SMTP id a640c23a62f3a-c2039dcde67mr2185271866b.21.1786390818037; Mon, 10 Aug 2026 12:40:18 -0700 (PDT) Received: from buildhost.darklands.se ([2001:9b1:ff:d701:51eb:176f:63d9:53f8]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c2080a29a84sm449928966b.3.2026.08.10.12.40.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2026 12:40:17 -0700 (PDT) From: Magnus Lindholm To: richard.henderson@linaro.org, mattst88@gmail.com, linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org Cc: glaubitz@physik.fu-berlin.de, mcree@orcon.net.nz, ink@unseen.parts, macro@orcam.me.uk, Magnus Lindholm , stable@vger.kernel.org Subject: [PATCH v2 5/7] alpha: fix the local TLB invalidate in the UP flush_tlb_page() Date: Mon, 10 Aug 2026 21:34:56 +0200 Message-ID: <20260810193902.3286353-6-linmag7@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260810193902.3286353-1-linmag7@gmail.com> References: <20260810193902.3286353-1-linmag7@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The uniprocessor flush_tlb_page() in asm/tlbflush.h has the same wrong test as the SMP one: a targeted tbi() reaches an mm's translations only when a thread of that mm is current, but the gate is current->active_mm. Test current->mm instead. arch/alpha/kernel/smp.c is not built with CONFIG_SMP=3Dn, so this is how the same defect reaches a uniprocessor, where the flusher kworker necessarily shares the only CPU with the writer. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Signed-off-by: Magnus Lindholm --- arch/alpha/include/asm/tlbflush.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/alpha/include/asm/tlbflush.h b/arch/alpha/include/asm/tlb= flush.h index 0c8529997f54..9ae1902faf8e 100644 --- a/arch/alpha/include/asm/tlbflush.h +++ b/arch/alpha/include/asm/tlbflush.h @@ -87,7 +87,8 @@ flush_tlb_page(struct vm_area_struct *vma, unsigned long = addr) { struct mm_struct *mm =3D vma->vm_mm; =20 - if (mm =3D=3D current->active_mm) + /* A targeted tbi() needs a thread of MM to be current. */ + if (mm =3D=3D current->mm) flush_tlb_current_page(mm, vma, addr); else flush_tlb_other(mm); --=20 2.53.0 From nobody Tue Sep 29 07:39:15 2026 Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D919442B3F for ; Mon, 10 Aug 2026 19:40:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786390834; cv=none; b=P0RISlLIyFeK1MxUQWaxmTQp4hUJEACMNLf9PL3R8m8o7MSVYZbxnkYzXOLrKF649GCnEd6HhEX2QTjhm/FQyWIvnQQP44va+gNCev8plUQSRq5UOX/I0lPz55El7meDEEdxgJD3HeEVhC01aq8+q0EWw5HPe8szVCgT8KI6jaE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786390834; c=relaxed/simple; bh=HHYWIbYZQXa9nFoSOde0y7v8SzeS8K4QFE8dQsCXdhs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pX889FeuyQFpv0m3CT01MpmW8B/1o330UH74pyLepRrK2uy9J2m0EKVMAf8ah3i67CBKIlKLUcLSx05bfMcOPX0egVZpg+2S0NVe3xxl3rg1/ssRYPqNPc355GLCo0XU9lrihbAsLPARhvdFMLS2RBXepJS5TMn02WEJ5JnYmJs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=aztu9krM; arc=none smtp.client-ip=209.85.218.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aztu9krM" Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-c15b1da6b82so211759866b.1 for ; Mon, 10 Aug 2026 12:40:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786390819; x=1786995619; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=SMDjp/2Kph0Q/Gm3PYQzClsmsJVYRNh1rwgrPz5zZYY=; b=aztu9krMkzBKQde2jDf5M+Z9GZmONL/rsmIxCIp92K+m1GwhOqA9mUqXR2ISJ0qsO2 veVkeUtncRX4ZsQFianopBEpU+2zWwdsHyOJWylGaAqOh0dKDtTyI9Es2Go5rX+7RJGN ycb1nMlo44ImZHsAJXmpgAw3uwPT4zIpSDfo+ZdKZZx3no5hH0RVv8OGlC1bj+IBViMI LS7Q6tZrY4dDVkRE38FmdfyZR6tS6tOJ8NZSdcE80PQSZ24j+RNUbx9IMdgw3A9JkAGF RfnPiALFYfMpx+HqIYmR/Ahtz0pScXjf3hAqMZRcOfe0cwGdMQSQoCfBhAiFIBz2QUP9 bCkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786390819; x=1786995619; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=SMDjp/2Kph0Q/Gm3PYQzClsmsJVYRNh1rwgrPz5zZYY=; b=QzZ3uyONFbtFpv6FsUJy3Jz6nnLuBkBbcWrfy1mseH2ibM/TgjQYL9sHgwkwykMDrm Z+JTNVjNzo2p4HZCX+dsf7vDFfJDE3Ea45FUdUKHZ+vzlMu7Q9CydJpuouid47HjyVsT 9RHVKWeYXoF0Z0qzHHHENDVc7iX+ugU1Bd3644suVXdWHb4bTkxvhsI0fOk4O+QBFACV 3X6zNNmG7RbWvMEOLstMXIUmR9dtVy5oUHG2G8zTA90vqzNeou9peFL952VVCXghftOb 0oQnsf77Aijf2lMY1zjzMhSbCAgCmtYhZvcslu/8bRbqp6MpS6D17zbvPtrLiRBlFrwj APNg== X-Forwarded-Encrypted: i=1; AHgh+Rq2GNx8FIIyzxai1DR1t2HYWguk+Ugaskb8LnIKc2Zb1F9RNr5pUbvULuqa0RwoVXJkqjnmlpKdRPGkITs=@vger.kernel.org X-Gm-Message-State: AOJu0YyV/yZFtgBUYet1vNVrrx6g5pefG2sIdatrh1scOj5LXZvWFx/O Tyk4NDUBdZOaOEiAxRnTQGXXFmuxMpvWjPtxf8jM/mOPyiJOcgjKzKvS X-Gm-Gg: AR+sD100ZkQPvEoAQg7rXPkwghlZjDnmVmiYAhnqW3eZ6Bi9FTiFQmj72Nj106dnlBS GKsZbpZxZSmkU46RAdM542K0x+rSLsdxWeLGhm38qepqVxfID+8z5JGaz9CeyeIEr7mtOVzj7yy KcbXQxC0/CdMEs8QHB+Na/vsK8BYw4UulhW55jvacEZHcrv3vthB0ttCFDMw9vdiWY+KnE7+WQZ lAViwZokgJQ30R4s0DWsfNF70s2GO1nhG2Hyeg09QjcJIl5t2DdqXjKrNLI5O0SyidQOAd6YiWD aTDgA2YAoDZuLZnk8k07X4CDCV/PnnT0OOAwLKS87vaLrvmexEghGBc7MeKG1t5uUyN1o6kyrsF ZpiZ/g0xDERbsNYewqYVq8n9Mq6/WxQUELmRUxT4ktYo4Lwoj8nx81uJy24KH0sp7CktTBBjaZr tWRp5DG2TL9oG6ZgM6ZN9YChkZYAVEh/Fqq5HldmNMaZWKt4Vnye27gSl/LYtmBSZdSGJ4yPGoD U2PAnCim4V5JcTBNdrJTjiHs1BrH8c= X-Received: by 2002:a17:907:3e0a:b0:c15:f4bb:e663 with SMTP id a640c23a62f3a-c20871dba75mr1097344966b.10.1786390819229; Mon, 10 Aug 2026 12:40:19 -0700 (PDT) Received: from buildhost.darklands.se ([2001:9b1:ff:d701:51eb:176f:63d9:53f8]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c2080a29a84sm449928966b.3.2026.08.10.12.40.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2026 12:40:18 -0700 (PDT) From: Magnus Lindholm To: richard.henderson@linaro.org, mattst88@gmail.com, linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org Cc: glaubitz@physik.fu-berlin.de, mcree@orcon.net.nz, ink@unseen.parts, macro@orcam.me.uk, Magnus Lindholm , stable@vger.kernel.org Subject: [PATCH v2 6/7] alpha: invalidate the local context in flush_tlb_mm() Date: Mon, 10 Aug 2026 21:34:57 +0200 Message-ID: <20260810193902.3286353-7-linmag7@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260810193902.3286353-1-linmag7@gmail.com> References: <20260810193902.3286353-1-linmag7@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" flush_tlb_mm() has the same caller-CPU omission that was fixed in flush_tlb_page(): when the target mm is not the calling CPU's active_mm nothing happens locally, and smp_call_function() handles only the other CPUs, so this CPU may later reuse the old ASN together with the translations it still holds. The active_mm test itself is left alone here. That path calls flush_tlb_current(), which loads a fresh context through __load_new_mm_context() rather than issuing a targeted tbi() against whatever ASN happens to be loaded, so it does not depend on which context is current. The uniprocessor implementation in asm/tlbflush.h already has the missing branch. Counted over a fork-heavy run, flush_tlb_mm() was entered with the mm not this CPU's active_mm 2934 times, and 632 times while otherwise idle. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Signed-off-by: Magnus Lindholm --- arch/alpha/kernel/smp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index a5a42ae4a7d8..988e397b0b8a 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c @@ -649,6 +649,9 @@ flush_tlb_mm(struct mm_struct *mm) preempt_enable(); return; } + } else { + /* smp_call_function() does not call back into this CPU. */ + flush_tlb_other(mm); } =20 smp_call_function(ipi_flush_tlb_mm, mm, 1); --=20 2.53.0 From nobody Tue Sep 29 07:39:15 2026 Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 977AC442379 for ; Mon, 10 Aug 2026 19:40:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786390834; cv=none; b=coE22s5h7l8wVuCy0/X4xnqlkgNpQ2uh8mQHdZSk7msNixpUebBs/u2ZRm+9KOUAYVfqzDOUydIDBx0BhbFh5B7bUeXQnqoLFeRiOeeEUd460RAUIAYhgNh+qXh6hylJwKD2Rkqf0vDESsSIYmMLdvQA2QgLOShielIWWMLH47g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786390834; c=relaxed/simple; bh=hYk+xarhTPEsRWdAy2yebQ28Z4YDVkB5v5kYWMkVqds=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=F8KUgRek3+V19DhXd3rkzp2EAjsda2oLo2d31yZH9M5DM3LWEPyD5ODxNpa+MyU9CvO58auq7RnF21rqyHNwD7qvGBvmQblyoByKNs8BCvyPwoBZYuZRqgy5/OgjJjkhlFraA7aKatShin6mT05gI6y4yWc7KAifLmw64FZFheQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ZEGtQhsM; arc=none smtp.client-ip=209.85.208.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZEGtQhsM" Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-69c108fee7fso3032435a12.3 for ; Mon, 10 Aug 2026 12:40:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786390820; x=1786995620; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=UZlUEzCrTPRBX1FvFK7zfpZyojdDsTGC8+EAFkSxizE=; b=ZEGtQhsMx080qLIVx228RzAeqAhZwwhwkciWUOCi8Eds45zxKHdNFM3vpAgnhcXvzX ZxNLa80y3wPFij9MAX7Vo96OI35FN3+cAXTinp6ZzUsvZQFAGRLGGq/GmFoxdSwvbb5y 5qUrdJNZVEbsp3FzRmG/p3zee4+QDtMMn3bByZcQkkPKPgvjXvxSO8uou/rbcE++oAwx 5f/5JBItDXRmPYTpTnGNVjq+FxCnlbNtkRmRJFDT+jN7Os53P6L6TSd23dqF6RgB2lwW yH44JlI52b2Rw3XLULM6izxR7nllD1t+CCiDlAn1F1OR5vYZyB3SHvVfl2DY7NSvW+kw WBEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786390820; x=1786995620; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=UZlUEzCrTPRBX1FvFK7zfpZyojdDsTGC8+EAFkSxizE=; b=ZRsMAhed5+17tUXxtZt7gWNfj7DtEjmIOP5445KtAF4ECO3IXGh5TbgAPvYCjtg8Wb 8eoK5N16YMCqWYchgF+iHJLPxL8W0lf9r586IjbgS0mCpWNZ/N42fKaOhq9WbfMQ8MBB joZ+ZByVob2uJBYsmPYXXF05MwA7gvJGv/JjiDnAKVp3iGg8yb0e/0bZGLO8tJv3IiXQ ji1kfd+TA4FSp+8axx6EgMvcw4SRaVfX9WoCqFMYpLgW7MTAfIUyIOJlWfz5BLSp5bxo dwrT9LaHtW3k7sXlOcyXjQhJB8e5bZBwXwNRLRevcw8ZD8MpRgfBTygBhq7KpZ7tRI7v TYVA== X-Forwarded-Encrypted: i=1; AHgh+RrDQLPamNT6EQz5j1gXjJxGgl2MF0Y1HvrimnbDpFpjZHfshBj45zePN49Zy6/jk2rqtTxKOQYRC1P69kU=@vger.kernel.org X-Gm-Message-State: AOJu0YxORgOqHHjLRecBw4zmxnMlfoToejIi4zByaUJoFk4c/oWA11k/ 7hDNhVOdCTr8pP5TzSolksGAJIG5zwZfgjSlo5MkWkmnPy+oZzGRzZcG X-Gm-Gg: AR+sD11iDwyKeubQT/4BCyEQBlk/NumFCy3j/126u+GGZp4fHVp0SusPcS0DaVXJzPC 1fcEcAXvGJZAQ9I7/Qqh4gwJZm//t3FsV/wnIZwYi2e5td7WLt1HhdHrCX5XWoKbg7wuMulDUVS KhBYf3B92TUjHVgwpwhSQb9Cype6KNKJEtz7/HZHHzcGSNAOF07Ha2gSf/8Ffln4xLmWn1tyT7W 38F4fioVCZukq0fpAd6uLjMjMdMCDq9rQRPFXIk996W81mRevslPhvxM9iUk7e/jtGdhd501X6v muQmGudMuwhouD0w8JfTr6i/80tHxrcZfBKVyXi3487bWee/U6ViFYEsx7I9ixZSfY1xOaQt45z 8BFyb7o6gUeG9w22wh+Zb+7fnMD6Z5L3OanD2gNd4UPtJOI06tLgkhkK+UcvDMmorMiCrO1l0Sf UYHD1b2SRzg2klM358QniFgPY//2HebIILDuzPKKUb/ITo3FoVwKAv1AtdubQ4JHVB7kAxIC5dw 9BOpsh8W0VzcHws3C9KBSIT7yKyrOY= X-Received: by 2002:a17:907:c5c3:b0:c1f:1520:4de5 with SMTP id a640c23a62f3a-c20c67fab2dmr191394366b.1.1786390820261; Mon, 10 Aug 2026 12:40:20 -0700 (PDT) Received: from buildhost.darklands.se ([2001:9b1:ff:d701:51eb:176f:63d9:53f8]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c2080a29a84sm449928966b.3.2026.08.10.12.40.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2026 12:40:19 -0700 (PDT) From: Magnus Lindholm To: richard.henderson@linaro.org, mattst88@gmail.com, linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org Cc: glaubitz@physik.fu-berlin.de, mcree@orcon.net.nz, ink@unseen.parts, macro@orcam.me.uk, Magnus Lindholm , stable@vger.kernel.org Subject: [PATCH v2 7/7] alpha: invalidate the local context in flush_icache_user_page() Date: Mon, 10 Aug 2026 21:34:58 +0200 Message-ID: <20260810193902.3286353-8-linmag7@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260810193902.3286353-1-linmag7@gmail.com> References: <20260810193902.3286353-1-linmag7@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" flush_icache_user_page() has the same caller-CPU omission that the previous patch fixed in flush_tlb_mm(): when the target mm is not the calling CPU's active_mm nothing happens locally, and smp_call_function() handles only the other CPUs, so this CPU may later reuse the old ASN together with the translations it still holds. This matters here in particular because the function exists for operating on another process's mappings: the comment above it describes setting breakpoints through ptrace, and access_remote_vm() reaches it through copy_to_user_page(). The calling CPU is therefore often running something other than the target mm. As in flush_tlb_mm(), the uniprocessor implementation in asm/cacheflush.h already has the missing case. No imb() is needed, here or in ipi_flush_icache_page(). Alpha's user-space I-cache flush works by allocating a new ASN rather than by invalidating the I-cache: the entries stay, but they are tagged with the old ASN and can no longer match. An imb() is only required when the ASN space wraps and numbers are reused, and __get_new_mm_context() already does one in that case. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Signed-off-by: Magnus Lindholm --- arch/alpha/kernel/smp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index 988e397b0b8a..e21bc3920bec 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c @@ -758,6 +758,9 @@ flush_icache_user_page(struct vm_area_struct *vma, stru= ct page *page, preempt_enable(); return; } + } else { + /* smp_call_function() does not call back into this CPU. */ + flush_tlb_other(mm); } =20 smp_call_function(ipi_flush_icache_page, mm, 1); --=20 2.53.0