Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1254774ybh; Mon, 13 Jul 2020 13:33:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXwz3P+N32nn4GkoDDORkV1tP2FOjcud8FFjn4vz5CKO/OSMjC7G7F37jvalcayWPOv5uY X-Received: by 2002:a17:906:b813:: with SMTP id dv19mr1437120ejb.119.1594672404954; Mon, 13 Jul 2020 13:33:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594672404; cv=none; d=google.com; s=arc-20160816; b=UZIv4r2+xj64vnnxc9lvVKUmUVwzcDwmskO5JT2Ivig9TWZjGFv8h2A0kqruL5cclU 5DNBnHwAFYOg+4n1qW4YRH3wm5yJPT/cw3PIFWUQtgY4ANDH6SP9U1uSxqNeM7JvST5l SjnMSn23m6LSnRN9Tv8lQoxZwevYc+cZF3ECu62/3O/y5wjsdWM4K1uSQcIphdg1Ab4d o6iEhOFNrgCfz9uLknbeDN72goIbLMHuABbRMiw8Jm1rDpEIwyLN4EK22aEzIx/fI+12 xnSV4DCUe89+dyIlEdo/hKRlvN169MYLsFzAC3Iey7QnxxnnC12KcLMQ1f6wTpsCKQkz omVw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=NjuXsku+N7s+/ZkGgNtwqS2FMyOCE2m5xwXnbqoU004=; b=NmPpOxUZQfeq9r49flZ/AkDslL2cSRTdfeX2X6IfnwsbKMlHl6NkUKDnTyFQVdafjR bKA1LiXtX9+SW062Q0kd7I+euoArXYe3c7aUqC52x+YQG/mby/svb4smsVoBukuiflZl Ld2GVZRpqacxPYAs9cBbn+Pxz6u3G7uIKWbM/FMP3KFYj27W71CDMYn4SkNclZmn7rOX PV7LKTn25+hJgHJqCUEk9U9LGQSr3hqXRYpjEy0PbLcliJur+49TkbhQ/6Bj6aPavidW VvhoDm/eH86hyqksvkYL+LR6L3TIc3etFGky/k5K7Q+efZwo9qUzz7GfD87McMIVWz4K an4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VaS7443K; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e26si9181029ejd.180.2020.07.13.13.33.02; Mon, 13 Jul 2020 13:33:24 -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; dkim=pass header.i=@linaro.org header.s=google header.b=VaS7443K; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726974AbgGMUc2 (ORCPT + 99 others); Mon, 13 Jul 2020 16:32:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726150AbgGMUc2 (ORCPT ); Mon, 13 Jul 2020 16:32:28 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCA4EC061755 for ; Mon, 13 Jul 2020 13:32:27 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id j4so18261369wrp.10 for ; Mon, 13 Jul 2020 13:32:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=NjuXsku+N7s+/ZkGgNtwqS2FMyOCE2m5xwXnbqoU004=; b=VaS7443KrsutnWzhmjukOyEatB1jcEm5/VfgW2lPX/lwVScwUMEu8gwW8F/cDRqv57 dV9k6+gC1exYI7Jnf1f06CNH6FWa2QorqFT5631H98oZZxNYha/DLWsT8jiZ4ox+rXRP jrJGww60DVwOJBcjHEd/UdOaygoXW5fuTw+N1wV9EzJ8dlfPv7C/nhTmUtFlfmR8f7Yg azhfQYqkXwUN8/0+Z/YD5qmKF2grqhRzzDT566wbUMQPSasaP1fB1QMkwEdspeuZgO5U 3piw8aaNIkiOM/z7grOJv6lp+iTO8vJ+Aq/dkwdm3JCL7LevtBFejWx+N/l8OckWrFEq MNEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=NjuXsku+N7s+/ZkGgNtwqS2FMyOCE2m5xwXnbqoU004=; b=BZF83Feqv4447z32MWt3LlGFM63M9aCtFH5XDburdxZyPpVMfCP6nJq3DuKz6iRDQK hxdEgFJHfmYv1Oh0wq1zbayJdEEggctzg9i7IDOMxCCX2zpGf9j6CcK/ajbhBUlCd5tR hM1A1aBEuP/hnZV3j4V8EG5GcSo7M8+I98pPn+vMWjuzTCV+BrlWG1b3GPd2K7Oq0cxk JJxWaeQgzNq9C34jIEM/KurVneqjoB/ieR3zCS0NzNqX7kWhi8Ngh1CbcN7aSfHoCFnF H+VkW1WNTFwhMtB1bYp/V72dx8kzOEkB6eqzBkhl1otqEEI1brV8/AE2B/Pgl2G54ozD YbAA== X-Gm-Message-State: AOAM5318tJmuTgxDBoKq/GLOoM21Ec/cud+zsCbkkAugFRHF6xVxg0AM cExbZQmh6h3/bZlp0UaYV1s5qg== X-Received: by 2002:a5d:408c:: with SMTP id o12mr1277936wrp.412.1594672346487; Mon, 13 Jul 2020 13:32:26 -0700 (PDT) Received: from ?IPv6:2a01:e34:ed2f:f020:ace8:1637:36d9:9311? ([2a01:e34:ed2f:f020:ace8:1637:36d9:9311]) by smtp.googlemail.com with ESMTPSA id 51sm27253320wrc.44.2020.07.13.13.32.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Jul 2020 13:32:25 -0700 (PDT) Subject: Re: [PATCH v4 4/4] thermal: core: Add notifications call in the framework To: Marek Szyprowski , rui.zhang@intel.com Cc: srinivas.pandruvada@linux.intel.com, rkumbako@codeaurora.org, amit.kucheria@linaro.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Bartlomiej Zolnierkiewicz References: <20200706105538.2159-1-daniel.lezcano@linaro.org> <20200706105538.2159-4-daniel.lezcano@linaro.org> <23c5830d-0a7c-9e87-e859-821d2dccb200@linaro.org> <8a34e9c4-6457-cfd2-3d05-05f80a630a0d@samsung.com> <41466d5a-24fb-b861-93ae-3ed190af7174@samsung.com> From: Daniel Lezcano Message-ID: <75683b75-6e1b-6e4e-2354-477c487a5f5f@linaro.org> Date: Mon, 13 Jul 2020 22:32:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <41466d5a-24fb-b861-93ae-3ed190af7174@samsung.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/07/2020 11:31, Marek Szyprowski wrote: > Hi > > On 07.07.2020 11:15, Marek Szyprowski wrote: >> On 06.07.2020 15:46, Daniel Lezcano wrote: >>> On 06/07/2020 15:17, Marek Szyprowski wrote: >>>> On 06.07.2020 12:55, Daniel Lezcano wrote: >>>>> The generic netlink protocol is implemented but the different >>>>> notification functions are not yet connected to the core code. >>>>> >>>>> These changes add the notification calls in the different >>>>> corresponding places. >>>>> >>>>> Reviewed-by: Amit Kucheria >>>>> Signed-off-by: Daniel Lezcano >>>> This patch landed in today's linux-next 20200706 as commit 5df786e46560 >>>> ("thermal: core: Add notifications call in the framework"). Sadly it >>>> breaks booting various Samsung Exynos based boards. Here is an example >>>> log from Odroid U3 board: >>>> >>>> Unable to handle kernel NULL pointer dereference at virtual address >>>> 00000010 >>>> pgd = (ptrval) >>>> [00000010] *pgd=00000000 >>>> Internal error: Oops: 5 [#1] PREEMPT SMP ARM >>>> Modules linked in: >>>> CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.8.0-rc3-00015-g5df786e46560 >>>> #1146 >>>> Hardware name: Samsung Exynos (Flattened Device Tree) >>>> PC is at kmem_cache_alloc+0x13c/0x418 >>>> LR is at kmem_cache_alloc+0x48/0x418 >>>> pc : []    lr : []    psr: 20000053 >>>> ... >>>> Flags: nzCv  IRQs on  FIQs off  Mode SVC_32  ISA ARM  Segment none >>>> Control: 10c5387d  Table: 4000404a  DAC: 00000051 >>>> Process swapper/0 (pid: 1, stack limit = 0x(ptrval)) >>>> Stack: (0xee8f1cf8 to 0xee8f2000) >>>> ... >>>> [] (kmem_cache_alloc) from [] >>>> (__alloc_skb+0x5c/0x170) >>>> [] (__alloc_skb) from [] >>>> (thermal_genl_send_event+0x24/0x174) >>>> [] (thermal_genl_send_event) from [] >>>> (thermal_notify_tz_create+0x58/0x74) >>>> [] (thermal_notify_tz_create) from [] >>>> (thermal_zone_device_register+0x358/0x650) >>>> [] (thermal_zone_device_register) from [] >>>> (of_parse_thermal_zones+0x304/0x7a4) >>>> [] (of_parse_thermal_zones) from [] >>>> (thermal_init+0xdc/0x154) >>>> [] (thermal_init) from [] >>>> (do_one_initcall+0x8c/0x424) >>>> [] (do_one_initcall) from [] >>>> (kernel_init_freeable+0x190/0x204) >>>> [] (kernel_init_freeable) from [] >>>> (kernel_init+0x8/0x118) >>>> [] (kernel_init) from [] (ret_from_fork+0x14/0x20) >>>> >>>> Reverting it on top of linux-next fixes the boot issue. I will >>>> investigate it further soon. >>> Thanks for reporting this. >>> >>> Can you send the addr2line result and code it points to ? >> >> addr2line of c02b5cac (kmem_cache_alloc+0x13c/0x418) points to >> mm/slub.c +2839, but I'm not sure if we can trust it. imho it looks >> like some trashed memory somewhere, but I don't have time right now to >> analyze it further now... > > Just one more thing I've noticed. The crash happens only if the kernel > is compiled with old GCC (tested with arm-linux-gnueabi-gcc (Linaro GCC > 4.9-2017.01) 4.9.4). If I compile kernel with newed GCC (like > arm-linux-gnueabi-gcc (Linaro GCC 6.4-2017.11) 6.4.1 20171012), it works > fine... > > This happens also with Linux next-20200710, which again got this commit. So I finally succeed to reproduce on an ARM64 with a recent compiler, earlycon, and the option CONFIG_INIT_ON_ALLOC_DEFAULT_ON. -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog