Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5976968ybe; Tue, 10 Sep 2019 11:37:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqwsuHuoRUpDeHkgHQ0OAd3775D7oENInfIuUYVK+w9BBNk2nn0VLoKD/Dkr+adGc8Izgtbl X-Received: by 2002:a17:906:4d82:: with SMTP id s2mr25834719eju.94.1568140632329; Tue, 10 Sep 2019 11:37:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568140632; cv=none; d=google.com; s=arc-20160816; b=rUkrOj1/l1iB+zofv2FkU7H9JgJM/JImFgXA6vXK1hvoCBSWVsDDvw8lQjZ+yaDeD+ nSexu5KvVgREEaCWAyD6XDkpuizjp8+lB+wq1djGtvOlHAwYbOyyI/W3kQoq6OQUWMJw 7h6Rb0jx0Hyd9tU0efyCGi2gQQAVo1zspeVZlDVvqc2fZjR8IsuNTO6YODJqlND+rpJ5 KuZsObt0ep0Ct3qWxABH5p6MCB6dZnt10d9VpOjui51bBvjSHWHS7bBxwiJ4Hkhxqm4v 5iDRTBzKT12R5Q7M1bzORh78+slY6gYIxbFqHtMunOjuBpEPzZRtB79Cip5agr5Av7mW EylA== 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=po3z9vVT8yU9vPmX7PJ6RtAkWylGnCZpE16E0o8CVfM=; b=p1RRBDtwoNmEPMW8IVUp0P8foAnEn+0kKAuxMFenQ3wKX9It3O+MG8NGbX5Qyas0/z l4YQjO8yEjSMi5rVEtnGl9UoUao/HqILOaA8PIGjqPMmbTFbtcxHHddXCmBXkg5ejhhe 6RsWBrEkMCmDAgqOEUpvikgm+4PEVz+PdH7DUv7GQa1YFGXDCrpjb/u+F9yZzKgM3B7E AS8/u3DwiVPqpCHAvI/z46A6ENjAAQYkKP9OlvXFxpe0CjbhtXlIHeyfItV7ytpVeO+u W5ZaTSphUsjsIKvwxZ+IN+1d9fv3IIY2dYTxgVdUwjH/GVk0BPywgyb9bTamkx3pr83l GLgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tEqQBjJ3; 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 y17si10620680edo.354.2019.09.10.11.36.47; Tue, 10 Sep 2019 11:37:12 -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=tEqQBjJ3; 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 S2405399AbfIIRIg (ORCPT + 99 others); Mon, 9 Sep 2019 13:08:36 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:44211 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405382AbfIIRIg (ORCPT ); Mon, 9 Sep 2019 13:08:36 -0400 Received: by mail-pg1-f195.google.com with SMTP id i18so8146279pgl.11 for ; Mon, 09 Sep 2019 10:08:35 -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=po3z9vVT8yU9vPmX7PJ6RtAkWylGnCZpE16E0o8CVfM=; b=tEqQBjJ3ODXxSMvYG+vcVbfl2luxsciSY2E+CsqLqrqbVjCNyZKwHecdfEmyUpgt3I uha/ukETxtto5BMjuu0dtOR0bYwM3A1N2k9GAforKbjH3v39Y5ea/j9ZpYQ3OCBTtK2j uwwuuHbyjZlL+Bx7dXXGCY658Q/G9QSrYzDYKb3Ns/Sw9adFXQ9rX8iGQvxXsa1RsP88 g7wSH3FezbdWKoyybVGvKS9N5w3eDSsmPRcg5IznZHJC25aPpJlNTgg0dvd5BXWv71qP MdpLYxk3Aa1LfwYDJdCMXY7pgZS9dvze3XMZ/8A4hJesCTjq+iB8TYQ/DG3DsyNNxxEH CB1g== 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=po3z9vVT8yU9vPmX7PJ6RtAkWylGnCZpE16E0o8CVfM=; b=mD5vjbPGN2BR57tIJz5b+cuS1K//ZwolR6H814gXytujXVePtgBmQd90kGlZlHAqyE 1dfGE7TSyH7rBH3E9hSdnOKvywWUrcEi3Vl6gCoX93IViE8zFA//qPAN+EfzEOrQBl1v HOSMVo//Td2a8125HOUeuenk3bJP7ePZyAuRC7bDcUfXiuL9idNGVU3LKQAxR8yXlPX2 w/ykk7KbUNkI3Tae1545GJzeq5QtuKZFhvrXA+Ctx/iRQuBgM7Fh6mRe29uhTQvPMmeh 7nMXSiF//g+m8U5PCoaGCs60k6jeWj5a6Hq1SgU5mD2uekX6WW+L952XTqH1BJCDBoXZ Mi5A== X-Gm-Message-State: APjAAAVjxm4g5BPAIAZI3A5enEG0nA8NNIHxiOIgrEkPfMA2XlosH/0s ywPHjGZAnI76M//NTBEUG7w= X-Received: by 2002:aa7:8d8e:: with SMTP id i14mr3798050pfr.262.1568048915686; Mon, 09 Sep 2019 10:08:35 -0700 (PDT) Received: from localhost.localdomain.localdomain ([2408:823c:c11:160:b8c3:8577:bf2f:3]) by smtp.gmail.com with ESMTPSA id b18sm107015pju.16.2019.09.09.10.08.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Sep 2019 10:08:35 -0700 (PDT) From: Pengfei Li To: akpm@linux-foundation.org Cc: vbabka@suse.cz, 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 v2 4/4] mm, slab_common: Make initializing KMALLOC_DMA start from 1 Date: Tue, 10 Sep 2019 01:07:15 +0800 Message-Id: <20190909170715.32545-5-lpf.vector@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190909170715.32545-1-lpf.vector@gmail.com> References: <20190909170715.32545-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 d64a64660f86..6b3e526934d9 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