From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A197C433E1 for ; Mon, 29 Jun 2020 18:42:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4BE882063A for ; Mon, 29 Jun 2020 18:42:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593456160; bh=ksjoalilAGETILI4C2Fb8kfMt/3YgClKp8iz0w9OlPI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=cTrF2MFxturpIk1UW+RRtNZ9Bmt/PhtAfFLwuC84Xou6Y8lBTfvcwIcBJigbzWDId 2dHQhazDeCOCmG4ssFerLEu43KIhm5b5Hgwyq004MRhZYqanZETBTPBmtei+aH5yw3 fL0xCC80gGKyYCskPBCg2BxjiyBxkcjIE1+6jiHQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726554AbgF2Smj (ORCPT ); Mon, 29 Jun 2020 14:42:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:60656 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728942AbgF2Sl0 (ORCPT ); Mon, 29 Jun 2020 14:41:26 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E08832336F; Mon, 29 Jun 2020 08:18:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593418720; bh=ksjoalilAGETILI4C2Fb8kfMt/3YgClKp8iz0w9OlPI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=MyLQDkq02SKSj9rUzc6knp5WSEHw7e5jjf6jdK8o/cTtZGNm59oWgApuO3Nc5+FcT CTltAC0tlCi3t9Udl0iYzIPdNQst8jUWEcljds/tnRQL3bfstyuBWmPaGjgd706MDj 1xdvYhVfrI33UCGK3ZHiIsN88k1j8gkAYhTI6Owk= Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jpozu-007HM1-A9; Mon, 29 Jun 2020 09:18:38 +0100 Date: Mon, 29 Jun 2020 09:18:37 +0100 Message-ID: <87tuyue142.wl-maz@kernel.org> From: Marc Zyngier To: Chanwoo Choi Cc: Heiko =?UTF-8?B?U3TDvGJuZXI=?= , Enric Balletbo i Serra , MyungJoo Ham , Kyungmin Park , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, kernel-team@android.com, "stable@vger.kernel.org" Subject: Re: [PATCH v2] PM / devfreq: rk3399_dmc: Fix kernel oops when rockchip,pmu is absent In-Reply-To: <784808d7-8943-44ab-f15a-34821e6d4d5f@samsung.com> References: <20200622152824.1054946-1-maz@kernel.org> <784808d7-8943-44ab-f15a-34821e6d4d5f@samsung.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/26.3 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: cw00.choi@samsung.com, heiko@sntech.de, enric.balletbo@collabora.com, myungjoo.ham@samsung.com, kyungmin.park@samsung.com, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, kernel-team@android.com, stable@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Hi Chanwoo, On Mon, 29 Jun 2020 03:43:37 +0100, Chanwoo Choi wrote: > > Hi Marc, > > On 6/23/20 12:28 AM, Marc Zyngier wrote: [...] > It looks good to me. But, I think that it is not necessary > fully kernel panic log about NULL pointer. It is enoughspsp > just mentioning the NULL pointer issue without full kernel panic log. I personally find the backtrace useful as it allows people with the same issue to trawl the kernel log and find whether it has already be fixed upstream. But it's only me, and I'm not attached to it. > So, how about editing the patch description as following or others simply? > and we need to add 'stable@vger.kernel.org' to Cc list for applying it > to stable branch. Looks good to me. > > > PM / devfreq: rk3399_dmc: Fix kernel oops when rockchip,pmu is absent > > Booting a recent kernel on a rk3399-based system (nanopc-t4), > equipped with a recent u-boot and ATF results in the kernel panic > about NULL pointer issue. nit: "results in a kernel panic on dereferencing a NULL pointer". > > This turns out to be due to the rk3399-dmc driver looking for > an *undocumented* property (rockchip,pmu), and happily using > a NULL pointer when the property isn't there. > > Instead, make most of what was brought in with 9173c5ceb035 > ("PM / devfreq: rk3399_dmc: Pass ODT and auto power down parameters > to TF-A.") conditioned on finding this property in the device-tree, > preventing the driver from exploding. > > Fixes: 9173c5ceb035 ("PM / devfreq: rk3399_dmc: Pass ODT and auto power down parameters to TF-A.") > Signed-off-by: Marc Zyngier > Signed-off-by: Chanwoo Choi Note that the biggest issue is still there: the driver is using an undocumented property, and this patch is just papering over it. Since I expect this property to be useful for something, it would be good for whoever knows what it does to document it. Thanks, M. -- Without deviation from the norm, progress is not possible.