Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp843492ybh; Mon, 13 Jul 2020 02:46:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyneOZq5lvxFjUa2B2eBT9htoauqfSaWFBmddsXXaDBvrVGSgaqQ01giFa4bBeuenBzgrw6 X-Received: by 2002:aa7:cf82:: with SMTP id z2mr72149840edx.15.1594633590890; Mon, 13 Jul 2020 02:46:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594633590; cv=none; d=google.com; s=arc-20160816; b=0tyZdw7XfBw6VwTDBcNz+FFp++5wobowYL7i5N8lIktAqo1fZBfZWrsVIqAAsJcvLr Bsi3PCpM/fcDEdemp3To4HNtEgbSYGdA99H/QJvOXy7SGBZAMJ30f3rV9f6cce2EU7rC 6cNXIbNxOLIB1KJD54IV2E1QadkSFbVmkC+qIZyNClbbHs9Uzmn1OsVvZrNyCAGB3yqq TdTdbJeVbR+Tik98i8M5zLJWYBIGAE0N9lQYQGuaW8Xsnu9/bmlMiwLl+XTu0DBnMmov OU0D9uSoTYq9d71/uv3/ihwm5dvTzvuyr33pPuDf/AGu6vNYsw3epEk5uDkcuWsaOO9x WGNg== 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=otVulKjc0ogv42O2JFqcEJScHvHl4vp3m32t3UYd2Kw=; b=YRdlMjl7khLI5ZLEtjttppGrRILtg5LduMlbmLxMJfcbwSrn974o8xVu+cnhEXe84A WQ6kCul5qI4rjBwUF4jB/VkB8bKUBdVpKgj+idzkF9Jq1fRZJQTB0cHE0TC/1MwIbExQ m81Zn2DXJ7S1m4pZVLK4G/b25OoSoHhsdT8gX5Q9SiShZmjGH7ucsyW+IMLJEP9Udmit VzwoP8AAAiaQthJfABmBpaAKw+Mkltd4JHHmVkLOIb8yOAYB6s1hrYfXwTrjqXxw2J/H QjkKTL3bxCTsDtwZZQjY15MhytYCGPs7DvOVVn/xU7xT/5yDLEOmZ6r+gH855/ja4Dkq 9KQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xZkDaSdO; 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 t7si8878289ejx.225.2020.07.13.02.46.08; Mon, 13 Jul 2020 02:46:30 -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=xZkDaSdO; 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 S1729498AbgGMJpe (ORCPT + 99 others); Mon, 13 Jul 2020 05:45:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726523AbgGMJpd (ORCPT ); Mon, 13 Jul 2020 05:45:33 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73B08C061755 for ; Mon, 13 Jul 2020 02:45:33 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id g75so12639228wme.5 for ; Mon, 13 Jul 2020 02:45:33 -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=otVulKjc0ogv42O2JFqcEJScHvHl4vp3m32t3UYd2Kw=; b=xZkDaSdOHPEuGUwfOb6nqqxZOvsPfL1pnepML+/Ed+UjvcgcEO/o0p33DH/SpU+JpV qvqgb7VDlYs6FjP1uLWfp/CF8LUjqY9Dp/4N4wWePkbMjnalzR+k82j0NrHN2KxOmgyY tlfhpO8ISIVj+kiDIEeqh7Z2sCBI4ga87fW5Pd5uuthrc+vuyPnARbVVKHyC8JvjOq1a +XSxNnEHzRDLAMc+brEL/6ZMWsDauigI6FWUkg9Rylhy3+RpoiTfCqgNrVWh4qcGUe5j m9HoTRmZZpoYfapnA7BbtCwdtuhghjRTeWCVrCtVnaXPoK3Gph7UhLMdndE7Cgan4fKJ GM2Q== 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=otVulKjc0ogv42O2JFqcEJScHvHl4vp3m32t3UYd2Kw=; b=YjHgyqRZ+MEDZuIqdPm1NrwrNTrdP/v76hiPx5XcjesLBaSNUz3EpfECUTSCPau2yT eNU8ihx+ZI6SboE9BEFknKdGYhviA9+GJbJGdGbwRQaRroxsH/yHFF+Uu+Thce2ykjav g2ZwKgD4VUypJrAiXjcNPrnz0JImYEwPdADNl7dqiQqI3AW0FmohLTM0yeT4aO/N8h3s KRqQ0YbqveNzNb4YuDWtqsU/G27QB5bW4/XztZAxHH+xN7z5nAqjIjOuDjGrmjlimbFI s1HWcPWnv6P6J1rciEpc32uCbw4ZKYnmPE5OKkQ/2LhDjZjtElvWWeJMe5ektlD/tFyi YKfw== X-Gm-Message-State: AOAM530g7HhTwYgZaesAi/rwWdMlPbKNEO7tZqJyKLk3LaArHudbWNsi JvkK1FGlX0hcPa2hNntrDlU36g== X-Received: by 2002:a1c:f007:: with SMTP id a7mr17993993wmb.103.1594633531976; Mon, 13 Jul 2020 02:45:31 -0700 (PDT) Received: from ?IPv6:2a01:e34:ed2f:f020:501b:b12d:3463:93f8? ([2a01:e34:ed2f:f020:501b:b12d:3463:93f8]) by smtp.googlemail.com with ESMTPSA id n14sm23603421wro.81.2020.07.13.02.45.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Jul 2020 02:45:31 -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 , Arnd Bergmann 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: Date: Mon, 13 Jul 2020 11:45:30 +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 Added Arnd in Cc. 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. Arnd, are you aware of any issue with this gcc version which can explain this kernel panic ? Sounds like the problem does not appear with more recent version. -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog