Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2185533ybe; Tue, 3 Sep 2019 09:08:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqyfcyaGlid1xxN0VgfmL2NPN4xTGCKx5smTCbRUX5OKXa93iSQ7M2rhujZkxwRPqUOc5es/ X-Received: by 2002:a63:ee0c:: with SMTP id e12mr31801034pgi.184.1567526901646; Tue, 03 Sep 2019 09:08:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567526901; cv=none; d=google.com; s=arc-20160816; b=hAjgReaqMdj9blCkKitu+R1sPLf4lGBnGJ8Sozn6LvPEdBjcr5WFgxw0B10iidXH0A vg7UbgcmeqWHCMAv/FK4fDX88AcTiZgqTz2WTC+p5AyDl7/14r3ArCyeDObipa/DFeRT YH2iejIS1jrk777Z16culjmEVZ7YqZaWoJoBdY7zWdkRi0XPLg5SEqm0xDy3P+HbharD E/8b4MDmCJuSQ1QP9+scUBgIvLfYtiXx4gPRwnLTcavPYoEUwdIHU9RrSFLCt9zrN/eB Et9k9EWiZzkT86ZfFGo7h4WBs4/S/Toh3osqL4K8oWNlGiI/aewO+A8KoCLp5Oez8XZ2 oJ3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tqiMeM8TceesmPz2bTRikxBBQDBEs3u6ayncNAD+gSk=; b=tc5OdS/KMKGefny8eJi+1kXQTdLOjGjxLnts0o1/9HsYxUESmM7sw+Z7o1FTymnam7 7MNFU7qPuFxATWozVPxO1pYbodgdPl+d+iylvDKu5e4zU5F8j8ANCSdJA41YQCYx78TT QjjteNlHzZ1RbI2nSJnw2s9GY7L7FT9lNANIb9m+ftNkgz4eVxYAiNGxKCUP4CSoqpYX hDypim+meV2qJr+XEbZjH2qqnTT1IvaPG8RoJKLxM1uf/7W3EtdPmnBR0PYDbbfKvbXw eJnFq43sEtd8pUROp5KgJveFffii1XLSMFOQy0mWYy2ws27qm0rIZrpkWWAKWUQ/w2Gp klFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=e3t1McXM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i18si301315pjx.1.2019.09.03.09.08.05; Tue, 03 Sep 2019 09:08:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=e3t1McXM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730002AbfICQGk (ORCPT + 99 others); Tue, 3 Sep 2019 12:06:40 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:35777 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728860AbfICQGk (ORCPT ); Tue, 3 Sep 2019 12:06:40 -0400 Received: by mail-pf1-f194.google.com with SMTP id 205so8613853pfw.2 for ; Tue, 03 Sep 2019 09:06:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tqiMeM8TceesmPz2bTRikxBBQDBEs3u6ayncNAD+gSk=; b=e3t1McXM+B7+qPx+6xlw63jz2BIyLqfLkwAuPUpZ/KBlMqhABGIuIsh/P2+qg4fL3G e68oPxPeHi8vjpPuXdOVgYVl7iyc9re3mqNsfOKETT5TLTMCJariudPc5aEYUvdJIMIr 8GsII5RUZLQEHyo9d62A4LFpgd69nti5zrZ7Fp+W993mrs8mrA6NQAypayAo89Qeh692 oYxKPcTw6O0k6WJPPZjWHpbXrBkjaz6giJxa+GF34nICobYKGyS0s0tAEw8F6vxQbAFt t6J97R9xlt3Cwo1btDvuXlruov3D0WO6G2ERLjOiOc9McIhcixZ4rT8uvKQxri0cBUNW EbcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tqiMeM8TceesmPz2bTRikxBBQDBEs3u6ayncNAD+gSk=; b=T4RjVVqz+Z27kqbOegeiVS7asxunzVlxZMJQjQ/0YR7MF1btP5tD5k2mpgkQnJyUMJ EwILUEHv9WGaoxdka8oS2xBsMLXx/OvT9z5CciPqN3qB8AnoXpnFi8GQrMF52gFax3Go kt9FAzSMuFA5bEokb4eV+/NQwSOK35WXlzCQc0ClUzg5U81ctWYyVOpsxxEUJid0tGHu 0O9s4SuMSOUPq34Ob6gJdfPi6SAJ3mWOxm7KinWTxhA6WEizSMdx0DpNp4Lci+VcvCa+ fWlNR0ADRPzKxtlf1uB05Eaxs5EG9J0xIX1mTdxvjqQy6vReQQoi03f2klYvSbYKU0Pk vUkQ== X-Gm-Message-State: APjAAAUFla/id66/FCcX5gA/EY0VDL9okQl0w19a1vxTXZT/wI4mWTur tvIpRSSTmP3rIjHhn0aGynI= X-Received: by 2002:a63:2903:: with SMTP id p3mr16265577pgp.306.1567526799745; Tue, 03 Sep 2019 09:06:39 -0700 (PDT) Received: from localhost.localdomain.localdomain ([2408:823c:c11:160:b8c3:8577:bf2f:3]) by smtp.gmail.com with ESMTPSA id t11sm18501567pgb.33.2019.09.03.09.06.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2019 09:06:39 -0700 (PDT) From: Pengfei Li To: akpm@linux-foundation.org Cc: cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Pengfei Li Subject: [PATCH 5/5] mm, slab_common: Make initializing KMALLOC_DMA start from 1 Date: Wed, 4 Sep 2019 00:04:30 +0800 Message-Id: <20190903160430.1368-6-lpf.vector@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190903160430.1368-1-lpf.vector@gmail.com> References: <20190903160430.1368-1-lpf.vector@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org kmalloc_caches[KMALLOC_NORMAL][0] will never be initialized, so the loop should start at 1 instead of 0 Signed-off-by: Pengfei Li --- mm/slab_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/slab_common.c b/mm/slab_common.c index af45b5278fdc..c81fc7dc2946 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -1236,7 +1236,7 @@ void __init create_kmalloc_caches(slab_flags_t flags) slab_state = UP; #ifdef CONFIG_ZONE_DMA - for (i = 0; i <= KMALLOC_SHIFT_HIGH; i++) { + for (i = 1; i <= KMALLOC_SHIFT_HIGH; i++) { struct kmem_cache *s = kmalloc_caches[KMALLOC_NORMAL][i]; if (s) { -- 2.21.0