diff mbox series

[mm-stable,2/2] x86/mm: always pass NULL as the first argument of switch_mm_irqs_off()

Message ID 20240222190911.1903054-2-yosryahmed@google.com (mailing list archive)
State New
Headers show
Series [mm-stable,1/2] x86/mm: further clarify switch_mm_irqs_off() documentation | expand

Commit Message

Yosry Ahmed Feb. 22, 2024, 7:09 p.m. UTC
The first argument of switch_mm_irqs_off() is unused by the x86
implementation. Make sure that x86 code never passes a non-NULL value to
make this clear. Update the only non violating caller, switch_mm().

Suggested-by: Dave Hansen <dave.hansen@intel.com>
Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
---
 arch/x86/mm/tlb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Dave Hansen Feb. 22, 2024, 7:12 p.m. UTC | #1
On 2/22/24 11:09, Yosry Ahmed wrote:
> The first argument of switch_mm_irqs_off() is unused by the x86
> implementation. Make sure that x86 code never passes a non-NULL value to
> make this clear. Update the only non violating caller, switch_mm().

Acked-by: Dave Hansen <dave.hansen@intel.com>
diff mbox series

Patch

diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
index b67545baf6973..51f9f56941058 100644
--- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c
@@ -327,7 +327,7 @@  void switch_mm(struct mm_struct *prev, struct mm_struct *next,
 	unsigned long flags;
 
 	local_irq_save(flags);
-	switch_mm_irqs_off(prev, next, tsk);
+	switch_mm_irqs_off(NULL, next, tsk);
 	local_irq_restore(flags);
 }