Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2969849ybt; Mon, 29 Jun 2020 11:45:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVEC+MLrOINWLP5dkqNtyTXH4KruXoawpbYt5S4slT80KrFv4LKUKq951gxjZC9aX1+N+H X-Received: by 2002:a17:906:4a17:: with SMTP id w23mr15872124eju.360.1593456327662; Mon, 29 Jun 2020 11:45:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593456327; cv=none; d=google.com; s=arc-20160816; b=fXCRSmPpFM73Vn8ArmAHFunFf/F3ylP3RmK9ZoJ9KiKFR+NCJMphO8ifhz0Js9l2bL NjOJ0UKJNSZRHBgcvYPdutt1PHd7RDWKhSaMbQN6TQUfxEiXz0LZ0RRT24acDadAz80S 6t59DcreknlOwTjs0cqJ14TW6PmXsKVMzUrgOWa+wOSHUSJNWFJbc1V2pkUDQEYK/VvO sFRujh85t752TL01WxjnVkvGt6GDP2oH99hieQcAPKav7QBpav7ZgQu8D5Aohg9ITY4R 8NBA/pcjKS+bqH+MXscsxH2xXn/6MQJfGU20GypMKHv4KVfZjAJtZXodKpFOIh2QTpiC MnQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:subject:cc:to:from:message-id:date:dkim-signature; bh=aCiVTBKFrM3GxNAgGs8gl+UUmx1vGChTobC87vqWEpA=; b=dY9ZqVNwV7JD044ClKLma4VSAfIu9GHwaXNtoXEcLZFdnmF9f5uQ2ttC85q1XalAjM DjBH0Q6N0Ffam+UbD5q5nGvm20+xUPh6N95zZ43TbSXTSY3VwzjfFumI0/2IzX1DFAs9 117luP00Nf9e+gqQK/o3w1pUynOhysN+f2zeC/Xzt9flEXNByRvHm3srM/lBBFwO9czH scGOXAM7Hf5/yzde3pAJT9DtLdUcJHVA1RFhm4lLxkrh6Wtb7OWC8eIXHylQQtVs2muq BJl9P/ZNlADBZuaZDzpVJJmU+ThI1mz7AdpFjusgA1RCWulAXrKtvwRn2yPuQDAQMtH8 a3Bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MyLQDkq0; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dm20si379039ejc.159.2020.06.29.11.45.03; Mon, 29 Jun 2020 11:45:27 -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=@kernel.org header.s=default header.b=MyLQDkq0; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728018AbgF2Smk (ORCPT + 99 others); Mon, 29 Jun 2020 14:42:40 -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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.