From patchwork Sun Jan 28 06:42:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Rapoport X-Patchwork-Id: 193108 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp817065dyb; Sat, 27 Jan 2024 22:42:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IG5h1HsZEhycvBD5UBptImsPB9Kipc+HAknw1Md3Epn8RdYdbhBw5nL283UyvhJu5kOeCxM X-Received: by 2002:ac8:580e:0:b0:42a:84a3:4d61 with SMTP id g14-20020ac8580e000000b0042a84a34d61mr3493500qtg.28.1706424177299; Sat, 27 Jan 2024 22:42:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706424177; cv=pass; d=google.com; s=arc-20160816; b=WY8fWK+RvGALfEjwHMQw5JYk6g/8reyceJ+9VIExhC3HM4fOeZkNYFxEn2ip2QRlwq eV3B66QqmD+xYvSK313GusCLrItvJR57lq9rRHHtKVq2smvuZf9MZsg8xeK+0vYlxP4m EnqvoL7eWgRz/fG3fKDTzbXZl8588bRuTdxQkymaZwkl/jvUHV0oK1rVWqfcZ7W6PQX/ mCJCud3ZMpqmaOvzIo8llXxxo8JMihCpS+2kvcDfTWoi9/yGHIFUwhdWsrfzdKaYrm7p MDqXmXrrDxwEarlR9pOQwGiZf8MUIirkk651+7Q6oc0DFsB2dfAUToBS5bouIt38fsEM 17ig== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date :dkim-signature; bh=PFBwURZ2tsBfQVMpzpEYe3et/Ti0jtJevAlVyKLgTKc=; fh=eiiWb+E8eFxaOHywl9czwner5c+/isAtVLL1MzOBYDc=; b=IPW74ni8ec04gFdpnwvRZFYk4uN9eEV9Mia4xTbLpGNNTX4JY2uS65tfmLlPEsx7N1 sl3fCi+i2XZI8a3W6/1M1+E/6iwgftLz7j/Sm5jgj5WhBgiaJzeXgHoE4xbpc/Y/q62V GUfRGuG/2gH/iikM/eLtVgUfCS1xscxudqudhVNZRuBY5oC1Qh0DZstVKsz6JuW8HEM4 9P8hmOfA7y7LgMW5+bUJlIoJyPdv/FaeDGQHAqwqdsMEYeK2g2LSgKGweH4p7AYIEhuF yqYcp+mq0eB4OVLRvtRvdevlIeGD+qjPtYNO1LF4lmbfd8FMJoEeK4mSL8CCV8XarNXC svRQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=P4CUHIZ3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-41553-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41553-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id o6-20020a17090a4b4600b0028bbcd027aasi5671052pjl.94.2024.01.27.22.42.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jan 2024 22:42:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-41553-ouuuleilei=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=@kernel.org header.s=k20201202 header.b=P4CUHIZ3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-41553-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41553-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 4B6B928472C for ; Sun, 28 Jan 2024 06:42:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AC18BD51C; Sun, 28 Jan 2024 06:42:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="P4CUHIZ3" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E61CF79DD for ; Sun, 28 Jan 2024 06:42:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706424164; cv=none; b=ipA6YqcmvreOjfyTdRmdIeuTcUqFyuY18599zzLNLgZMEhx/jucA4SqwBYQwidERouuwwI4mOSJIh9+hQTOkZdeeVSbVFAFR8MPS21PKLqcQ30Imfv901lbZdR2RXDYkVKqXZXy1tYu9pxadk1hpGPkr1UBC6EnIuXci+/cZ9kI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706424164; c=relaxed/simple; bh=xjirCRNXK/DYvRDptj3SiekbTqyL+FF6cdOHmoxLv0Q=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=MW/q6vDSot6+uxNAlNLU/JqXtKVF/hbkr2CAIv5bi3sw0XjVNAoxcumIIfex9wI9bUMmwK6uwoYyVYS5aF/OjJJ9SyraJRhv/hVfrCJLq7Fm0zp1eazEOH2u281NMKUSrsV4+d9ay/I1QUN2V4t7sPkwllpqOc7U2+BU9aCLIRI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=P4CUHIZ3; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4C12DC433F1; Sun, 28 Jan 2024 06:42:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706424163; bh=xjirCRNXK/DYvRDptj3SiekbTqyL+FF6cdOHmoxLv0Q=; h=Date:From:To:Cc:Subject:From; b=P4CUHIZ3G4QByLAch9O3JMJg8JjnXrKfHgBg85tdEK6FuKqf+PQSHLHJdw4pYKtdq UEofo6xjFv/yIb8KVMidUPVTTwK5fmRdh9Jur33k7lVaoDw45L3LAFRPs+97MrR7ka vOrU678ew7sr8fJF7B6DNBFDtR0GWhTkowuIQORFqmuR+1yMOWRbt0GOMgv20SLDOi fwQr5j/6YMkU+zEkj+KZ7qnhBIcueAvRyDkyAPYWLahj4cAOvult1EfTVLQguGix6t 0J+ZKH8jabB/76GyuLkqYlx79Cl6mwZ2ScNS3p0QscbBILKgawRsgJkNywuuz099WP 6xMU8rHbFv8SQ== Date: Sun, 28 Jan 2024 08:42:16 +0200 From: Mike Rapoport To: Linus Torvalds Cc: Mike Rapopoprt , Yajun Deng , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [GIT PULL] memblock: fix crash when reserved memory is not added to memory Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789315438389251413 X-GMAIL-MSGID: 1789315438389251413 Hi Linus, The following changes since commit 0dd3ee31125508cd67f7e7172247f05b7fd1753a: Linux 6.7 (2024-01-07 12:18:38 -0800) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock tags/fixes-2024-01-28 for you to fetch changes up to 6a9531c3a88096a26cf3ac582f7ec44f94a7dcb2: memblock: fix crash when reserved memory is not added to memory (2024-01-19 10:53:59 +0200) ---------------------------------------------------------------- memblock: fix crash when reserved memory is not added to memory When CONFIG_DEFERRED_STRUCT_PAGE_INIT is enabled, the initialization of reserved pages may cause access of NODE_DATA() with invalid nid and crash. Add a fall back to early_pfn_to_nid() in memmap_init_reserved_pages() to ensure a valid node id is always passed to init_reserved_page(). ---------------------------------------------------------------- Yajun Deng (1): memblock: fix crash when reserved memory is not added to memory mm/memblock.c | 3 +++ 1 file changed, 3 insertions(+)