Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp165116pxy; Wed, 28 Apr 2021 01:34:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyeHauveSq/nJKYA/1PBcf+eg4z9LJnd/JwNdl8NU08rKpiz9cUpa+LKzfOcClhYQIHj5Xi X-Received: by 2002:a17:906:9244:: with SMTP id c4mr2199869ejx.293.1619598865505; Wed, 28 Apr 2021 01:34:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619598865; cv=none; d=google.com; s=arc-20160816; b=fo5OiSKN21LbjDXC45OIDcQqkMwzcere9Xce1wh52Arx5K7ge0qn6fYgU9+Jtv4ViP Z9+E1Ktcs+ewShSBgGyGOgYafthya9p80Q8vtYiluuSTb6s+wrecOeLXV7BQn3xesEq0 xX1U9sxj37Ih8RpMxnMjeuVEOJeK63i3J2a+DqVqsl3L3mhoFqJkCtoKMKb4cqp5CbYM 0sYwgpLhO9QLt1NsvV2wGSJuSL6suirw0ViJw04v/s/bRfNpG3iRIJfZZEPAsZaZE2dX 6PhLqQ83N4m/7v+nOKq6oPYToFFo6PnC5lCYeCKkK0ZY/7TTL9RWHTubvU4p+cSnhvP5 sn1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=qDFOzC8QyyfEkYJLCwTwkVB7iXhcJFCm9k/3LdoeInc=; b=zhPD/LGhxiKLejI4zndqbSvOaB673OVSuPdUPGAPNI4NBJ9TD8pdWvjtIYIxsTGbZ3 X5UqOhfSsqP2PJfnI9TTClicadZZc3pQvNdXcjUainHtHL+vyOEXJTk0EwXoRnuWk5oJ k9F278WV4flhy2gqMj0ZFLhlML+bJKIqOPI+35Y47+lTiElmHfMg5fOGZFRuG/fe984L fuLAtwlKzElvPAzoOGE26H/IqG8bvAbdNvhf00SsWlDsGIw39o+u3LIen5XV0h8jtdKL bOxVX3snN+T2wDJ66XiVNdhdGeClD4UWBo2SkMsJDk0/zXCbyyFuN+BzEYkauzNKfrNX +gDg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l7si2678764ejk.583.2021.04.28.01.34.02; Wed, 28 Apr 2021 01:34:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237265AbhD1Ida (ORCPT + 99 others); Wed, 28 Apr 2021 04:33:30 -0400 Received: from mga12.intel.com ([192.55.52.136]:34912 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237143AbhD1Id3 (ORCPT ); Wed, 28 Apr 2021 04:33:29 -0400 IronPort-SDR: SQjHh7guguMLAubE5IfTwtecWGkGz5Ds7MUiw3LAjSE1WbyHi9X82+IEp6JnJPURtgQftKl7bG MXSjAbTUQ06w== X-IronPort-AV: E=McAfee;i="6200,9189,9967"; a="176171157" X-IronPort-AV: E=Sophos;i="5.82,257,1613462400"; d="scan'208";a="176171157" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Apr 2021 01:32:33 -0700 IronPort-SDR: fHoMiy74TBiV48hO5Iu9KKuts6xJl9cMkBg19lPUDClkh07IFesxFZ5oYmhW0uJ/5VxG33ol/3 WpG6cC3x+kmQ== X-IronPort-AV: E=Sophos;i="5.82,257,1613462400"; d="scan'208";a="403600948" Received: from xingzhen-mobl.ccr.corp.intel.com (HELO [10.238.4.46]) ([10.238.4.46]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Apr 2021 01:32:30 -0700 Subject: Re: [LKP] Re: [mm/vunmap] e47110e905: WARNING:at_mm/vmalloc.c:#__vunmap To: Linus Torvalds , kernel test robot Cc: "Aneesh Kumar K.V" , Harish Sriram , Andrew Morton , LKML , lkp@lists.01.org, kernel test robot References: <20210423063227.GA17429@xsang-OptiPlex-9020> From: Xing Zhengjun Message-ID: <4b0fd107-5509-3d2a-1151-335f9296f8e5@linux.intel.com> Date: Wed, 28 Apr 2021 16:32:28 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, On 4/24/2021 1:18 AM, Linus Torvalds wrote: > On Thu, Apr 22, 2021 at 11:15 PM kernel test robot > wrote: >> >> commit: e47110e90584a22e9980510b00d0dfad3a83354e ("mm/vunmap: add cond_resched() in vunmap_pmd_range") > > Funky. That commit doesn't seem to have anything to do with the oops. > > The oops is odd too: > >> [ 198.731223] WARNING: CPU: 0 PID: 1948 at mm/vmalloc.c:2247 __vunmap (kbuild/src/consumer/mm/vmalloc.c:2247 (discriminator 1)) > > That's the warning for an unaligned vunmap(): > > 2247 if (WARN(!PAGE_ALIGNED(addr), "Trying to vfree() bad > address (%p)\n", > 2248 addr)) > 2249 return; > >> [ 198.744933] Call Trace: >> [ 198.745229] free_module (kbuild/src/consumer/kernel/module.c:2251) > > 2248 /* This may be empty, but that's OK */ > 2249 module_arch_freeing_init(mod); > 2250 module_memfree(mod->init_layout.base); We add debug code to print logs when mod->init_layout.base is NULL, after more than 100 times test, we find that when mod->init_layout.base is NULL, no align warning happened. From the descriptions of vfree, if @addr is NULL, no operation is performed. So when the warning happened, the mod->init_layout.base is not a NULL. void vfree(const void *addr) { BUG_ON(in_nmi()); kmemleak_free(addr); might_sleep_if(!in_interrupt()); if (!addr) return; __vfree(addr); } static void __vfree(const void *addr) { if (unlikely(in_interrupt())) __vfree_deferred(addr); else __vunmap(addr, 1); } > 2251 kfree(mod->args); > > That's the "module_memfree()" - the return address points to the > return point, which is the next line. > > And as far as I can tell, the only thing that assigns anything but > NULL to that init_layout.base is > > ptr = module_alloc(mod->init_layout.size); > > which uses __vmalloc_node_range() for the allocation. > > So absolutely nothing in this report makes sense to me. I suspect it's > some odd memory corruption. > > Oliver - how reliable is that bisection? > > Does anybody else see what might be up? > > Linus > _______________________________________________ > LKP mailing list -- lkp@lists.01.org > To unsubscribe send an email to lkp-leave@lists.01.org > -- Zhengjun Xing