Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp301734lqp; Wed, 12 Jun 2024 01:54:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUmvEfYrabQi7+ONXeImlSnBAOKhD1yn9QzZxtD8rJJoQb+D+y2NXf+4hhVakWSvZoajbJ/TZ+X5tHnkDct/IbzXbb63Idmypf/f9OaLw== X-Google-Smtp-Source: AGHT+IGNUjbfzt8bszBzIEC++dwQcf4Uq4VFAUybTK5tFyYLTk3lMLCkutGpD4iZzw4gGvVD3bkt X-Received: by 2002:a05:6a00:2e1a:b0:705:c310:60be with SMTP id d2e1a72fcca58-705c3106251mr234244b3a.13.1718182439870; Wed, 12 Jun 2024 01:53:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718182439; cv=pass; d=google.com; s=arc-20160816; b=Fye+qtRintxVyh0dJfyw4JsGqXC2A8eYqZ3La4BbtT1S1zZtJv/Va4VSCa2+OXBd1g Vw4D2ohZsIvHK+U4Ose8kOKb1mhCsS2yZKJijdwYUE14SSc7ra+OpqMgZjgzP/QcLunc zvgAwhlr3LiXRjcDaNwxvXyAaZ9BP98lbz3tiXpdInLxLgdSwUPw69D4KljMP5iJk/0J Xfq5U0NlecF6IQEn2frxsfJpSvVk6VLLopkvYNbV8/XyYHxuxZVafmz+4jh26Br3i6U8 OmNDJMRWF2nS36R4gYwKJ+7zlvPB90/M9E9JZ11I9ntuOFeoWrFGnVcagj0Yx6dlG6k4 tuYw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=tkb5TXp35uMGhFX0bOi9/AXX3CAg0/55l8fdoR7W0aA=; fh=kYGqj/d5xmYQH5ANs1trM/BawJqbaM2gCNUoGfv8O8I=; b=VQQlGH6rLwFF7/6ngc3EEbuMcBYVWNtGwo3bbgeTVRsMLvMB0D7f2e6N+ynBqyWFw2 WwW7V7VC0M3kksq+d3RVKzj8jRUrsFAOtlwY45ct/wPjBp5ZfxKCL+6TpvlUuwZiyiOd u05o7hzNigNcEAkOEkj+Madnrb8cQ3UVF2sX4NfPH3aYozSfkMYb/gz0lacBjH/XxRd8 l8vICwiJCEgcefD/T7x8XkDS/AN69OsSi601GZCPgE+fgzy6e4l3+dsNj0ZtiZO/eFCI tiyrXD0Vf6f0XY64jeHWNNX9fBV4b1p5tMvbmnc4t3vKYetZre7C39zXuplbLIpqXr+l JQGw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=m7M1JMks; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-211211-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211211-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de276061cbsi10989252a12.538.2024.06.12.01.53.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 01:53:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211211-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=m7M1JMks; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-211211-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211211-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 79888283DF8 for ; Wed, 12 Jun 2024 08:53:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8028D16D4DC; Wed, 12 Jun 2024 08:53:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="m7M1JMks" Received: from out-186.mta1.migadu.com (out-186.mta1.migadu.com [95.215.58.186]) (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 E4A2B16D307 for ; Wed, 12 Jun 2024 08:53:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.186 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718182433; cv=none; b=Mam12GsRejRRSxGda0Xs6TsoXb08pSG6ir7hRmnCgUUrLFVFq5IyhN9jI0zkjSh7/eTNlDw10oQmEER9/mObNcCFGEUBvrEzjemavoiZ4GX3suntuM/IGhhAFp+NTTIvNCjWZf3itmTz9HIZJmfreU3UQMax5rg1yh74LNjtWY0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718182433; c=relaxed/simple; bh=tkb5TXp35uMGhFX0bOi9/AXX3CAg0/55l8fdoR7W0aA=; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc: Message-Id:References:To; b=BdxVVehVu90d+C41qXXdjdDguLDSDX1f9P+SebQGFG6SPQdgEQv7V5ncaPGQtEY3oiYDghjYbTp0+WgO5ExQ3TpAYBqBvUjA0wSx3u21/hiRYm3H/7hFKPixmN4CV0b0AOFKhhytS8f1BAoqkFu7kba/3h6OlEZTPVhQScwUNXw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=m7M1JMks; arc=none smtp.client-ip=95.215.58.186 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: osalvador@suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1718182427; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tkb5TXp35uMGhFX0bOi9/AXX3CAg0/55l8fdoR7W0aA=; b=m7M1JMksvokr1bofKdKf2BIM/5M5utHaSOr8niE0TgI76JF+tYn84j7lC3rpIiN55isHJR jL+Kcd/EWm0bCgAvlsPuMhj8o3LDqJpYEw10R1BuqpC+IMdirAifuNob4jJEqNQVcBAphG y/74Ol4AtjQHKBMBUBGOFopjkcyyvE8= X-Envelope-To: akpm@linux-foundation.org X-Envelope-To: linux-kernel@vger.kernel.org X-Envelope-To: linux-mm@kvack.org X-Envelope-To: vivek.kasireddy@intel.com X-Envelope-To: syzbot+569ed13f4054f271087b@syzkaller.appspotmail.com Content-Type: text/plain; charset=us-ascii Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Re: [PATCH] mm/hugetlb: Guard dequeue_hugetlb_folio_nodemask against NUMA_NO_NODE uses X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Muchun Song In-Reply-To: <20240612082936.10867-1-osalvador@suse.de> Date: Wed, 12 Jun 2024 16:53:34 +0800 Cc: Andrew Morton , LKML , Linux-MM , Vivek Kasireddy , syzbot+569ed13f4054f271087b@syzkaller.appspotmail.com Content-Transfer-Encoding: quoted-printable Message-Id: <5237BBD3-818B-4E06-A56A-80BE705EB024@linux.dev> References: <20240612082936.10867-1-osalvador@suse.de> To: Oscar Salvador X-Migadu-Flow: FLOW_OUT > On Jun 12, 2024, at 16:29, Oscar Salvador wrote: >=20 > dequeue_hugetlb_folio_nodemask() expects a preferred node where to get = the > hugetlb page from. > It does not expect, though, users to pass NUMA_NO_NODE, otherwise we = will > get trash when trying to get the zonelist from that node. > All current users are careful enough to not pass NUMA_NO_NODE, but > it opens the door for new users to get this wrong since it is not > documented [0]. > Guard against this by getting the local nid if NUMA_NO_NODE was = passed. >=20 > [0] = https://lore.kernel.org/linux-mm/0000000000004f12bb061a9acf07@google.com/ >=20 > Closes: = https://lore.kernel.org/linux-mm/0000000000004f12bb061a9acf07@google.com/ > Reported-and-tested-by: = syzbot+569ed13f4054f271087b@syzkaller.appspotmail.com > Signed-off-by: Oscar Salvador Reviewed-by: Muchun Song Thanks.=