Message ID | 20240222190911.1903054-2-yosryahmed@google.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9227C54791 for <linux-mm@archiver.kernel.org>; Thu, 22 Feb 2024 19:09:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6A5786B0080; Thu, 22 Feb 2024 14:09:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 655436B0081; Thu, 22 Feb 2024 14:09:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4CF856B0082; Thu, 22 Feb 2024 14:09:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 3E9D16B0080 for <linux-mm@kvack.org>; Thu, 22 Feb 2024 14:09:18 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 130FA40E0C for <linux-mm@kvack.org>; Thu, 22 Feb 2024 19:09:18 +0000 (UTC) X-FDA: 81820377996.20.87DDC18 Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) by imf24.hostedemail.com (Postfix) with ESMTP id 4E55F18002C for <linux-mm@kvack.org>; Thu, 22 Feb 2024 19:09:16 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=ruy7gc0n; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf24.hostedemail.com: domain of 325vXZQoKCKYeUYXeGNSKJMUUMRK.IUSROTad-SSQbGIQ.UXM@flex--yosryahmed.bounces.google.com designates 209.85.128.202 as permitted sender) smtp.mailfrom=325vXZQoKCKYeUYXeGNSKJMUUMRK.IUSROTad-SSQbGIQ.UXM@flex--yosryahmed.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1708628956; h=from:from:sender: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=KUYsRE8+tSPKyWViBth/a0r1Ckkz1G0ugYjkWT2KW0I=; b=gfPmwGlUw8jnWtU68V11Q3l5MLEM8EqIYnCcMZd07FMWu9vROhU1GYC7QUUTBBJ0x1YGTF HcpnkPvzZpUGFBY0XUcMZ+1lSkW6hqUK25IJ1ksmN6QxeQa1z0r+cKpp29CcEVtuKoJHwm FW4lW5Jj+t9nJ/fWR/+GYd4+cCu6SP4= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=ruy7gc0n; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf24.hostedemail.com: domain of 325vXZQoKCKYeUYXeGNSKJMUUMRK.IUSROTad-SSQbGIQ.UXM@flex--yosryahmed.bounces.google.com designates 209.85.128.202 as permitted sender) smtp.mailfrom=325vXZQoKCKYeUYXeGNSKJMUUMRK.IUSROTad-SSQbGIQ.UXM@flex--yosryahmed.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1708628956; a=rsa-sha256; cv=none; b=67Dmlq3LuNPQOdTeyObr9eRyxVMcrzaG/r5LunrAPREdiSJ8NnDRsDsj5ZWPLQIGIY7YSR HW7nj1O5QlqoWv8EUiOYAiYxzIKZ8Lg/H0w/a3UHYUxrz0EmBxJ5dg84Gfb4612BrvYUhp /NzEIGHCMSi3mfjUZruMk3dv01PJPGo= Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-608ac8c5781so1197467b3.3 for <linux-mm@kvack.org>; Thu, 22 Feb 2024 11:09:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1708628955; x=1709233755; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=KUYsRE8+tSPKyWViBth/a0r1Ckkz1G0ugYjkWT2KW0I=; b=ruy7gc0nkUCMdwu8BNI+OQdciotoimnYkzOx1cmyCt1HtSLeQSjxSIsLbkKpyxeQPz R9+bR7slQqMry9XOa+opWi1zLoneYblyD4L1ZlGMnlenwvxGMor1v0tGJ+pKBGcZKucf S2yuJQLQsa49XT6ToF5QyjW08SJSJdF0tcah8Zf7L85U1dXITNDlyDwCz61zf5v1pkxm OkGvBt0dSa6vCD1Za6puFnVEmmJwMBwmx6R/WyVSiU/EOEvilCa2cChU3eB9vHsV8gyS bA8B7YpnS30yAFg56p0QEQ+rIfghHXoIILpt8B2SR/yFP4dIsJucCW85oXfks11cPSpT 9Abg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708628955; x=1709233755; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KUYsRE8+tSPKyWViBth/a0r1Ckkz1G0ugYjkWT2KW0I=; b=Zz4gggtiQK9HCFceFAz4nQ17X/z0rW6dNTv5RBm44TwUp4WSJPFd/Urwt/KrdO1P4T 7SMeXM8hue0DUyioVVC1FtSZlUWr2yYKQE4g7fc5UpaCr4/ZOj8i7MCQbFCFHGBmge6I wzGJVqZ2m5UQA/DOlIDGAompml4ZzTAP1jThlYRoQHumW4mXiZAo0Ymla5EMDULzYHs6 VyhUm212dtJluZhDpgBtraz4gdcXurmgI+VgA0KwP9Vpr3H/x9VLpc21+5eS6mpTFllU WLAUbdrhi+HNehSNAQsGR1SJVKpjX00+Q6adidDZYLR86m04jxALFe2KaEihAKnDm0jx mA5w== X-Forwarded-Encrypted: i=1; AJvYcCUb4jhE9kpxa4W550wpETRFH6UpnhmEkNRninhWzBZCzYljYXw51hxjs64U2Owj9PsJhRz6KGoASkbUHtEUoeW9PcM= X-Gm-Message-State: AOJu0YzC64P8vTLOtdbX3VQjq7zCehmuzTJQ/eV5hYgHkrV6ZkiPvY+8 r/IpLZ7EGl8WgExJk51YMRxRRIJmIbbI+IH5MT9XftDr0IvBtuBbNRomylzslJlvUCpieYNpmtX ALHFRo8Yi+j6A5ChvPw== X-Google-Smtp-Source: AGHT+IGNUOZEq4h2q64sDVSpAxoKqvTsDClH9Jr8J8zrGhX1hRnuFcUuoek/5uwALBgmzAO3wKmtgeHhgPdv5I2J X-Received: from yosry.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:29b4]) (user=yosryahmed job=sendgmr) by 2002:a25:abd0:0:b0:dc6:cafd:dce5 with SMTP id v74-20020a25abd0000000b00dc6cafddce5mr6172ybi.12.1708628955435; Thu, 22 Feb 2024 11:09:15 -0800 (PST) Date: Thu, 22 Feb 2024 19:09:11 +0000 In-Reply-To: <20240222190911.1903054-1-yosryahmed@google.com> Mime-Version: 1.0 References: <20240222190911.1903054-1-yosryahmed@google.com> X-Mailer: git-send-email 2.44.0.rc1.240.g4c46232300-goog Message-ID: <20240222190911.1903054-2-yosryahmed@google.com> Subject: [PATCH mm-stable 2/2] x86/mm: always pass NULL as the first argument of switch_mm_irqs_off() From: Yosry Ahmed <yosryahmed@google.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: Dave Hansen <dave.hansen@intel.com>, Ingo Molnar <mingo@redhat.com>, Thomas Gleixner <tglx@linutronix.de>, Borislav Petkov <bp@alien8.de>, Dave Hansen <dave.hansen@linux.intel.com>, Andy Lutomirski <luto@kernel.org>, Peter Zijlstra <peterz@infradead.org>, x86@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yosry Ahmed <yosryahmed@google.com> Content-Type: text/plain; charset="UTF-8" X-Rspam-User: X-Rspamd-Server: rspam12 X-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0fQOMWRuF9PdoIKk3Sh417+ORvH4JW7AtKtougpEglrZnzUpur1JU2MymbkYjlu9JONurbZVLEPVlrFUJH1bRqlb9MkawyxzsqieUjJOKiPdj67jcjNzLf0841AMG5AHrHUvb8jruQjk3ZdaHw7kYXtYXaCxUXpuNm6W2b17X5tLQ0gUVIPOzbNNTPOBVeWYE4Qqd/WEHawPFYWQRGcwQLreP5XZfAvz/ZZu98ffAOQDjpKi64smWGxLTGMI2uwlrPFDAu6Izfu3R0n7+7Hb2XCBk0D7FsuKH9Er0w+CWILkaFEY+JluvA5qFs1LznyyrXhNirrJ7SsLOrX06Mttkx/BOWs2MfrVZ4FKO6qE9Hh/GC3GNuhPAy7VMqwenJI+LEFzXtI/JWLyKGE8IYPIPy0MV24ryMcPXzZzNYtU3ArWDfdae36A0IkxuUMFH0u/QwoerXBH3z+ICAzpBHoKTBPhaSBA5sFmnZcw/uO8w02vkTLjGEhxFzOmEmfwZc/rF9115D3lx1B/y46PEw4hcbNGjlbqg3Zrx4Twf6cbsJldVZwDbugNHkAOR8/0V//I5PIpGcId43hNU3s3tCAaZGjddYCY67omsgmEimbp9fFl+QPQ+oFDolTYU3Vx1215Kb7Cphocrx570HYvzaDI4ympVyzoq32lmKM9ohcDxcI9+mG4XXx6kQxJZzHcAR4BUzj7/C9eaOVle0X3I2l1A== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
[mm-stable,1/2] x86/mm: further clarify switch_mm_irqs_off() documentation
|
expand
|
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 --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); }
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(-)