Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3330052imw; Mon, 11 Jul 2022 06:42:19 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vszg1OEkR/vsYYGspbO56R1pIcm1jqn9wYwfcF6gEfBX9mUV6nCYChL0PTK/5mbr42KA5D X-Received: by 2002:a65:6e4d:0:b0:411:c102:397e with SMTP id be13-20020a656e4d000000b00411c102397emr16390389pgb.271.1657546939278; Mon, 11 Jul 2022 06:42:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657546939; cv=none; d=google.com; s=arc-20160816; b=poVy7XfmUoXBlkLfvab4g8aMMH8PFwE1vNljuwS40+/1qHL2WA8yGJR+nLMh33c/c2 9Nt+T3X1G9dPkfpbrcH05RB9VpAyunYva1TazTtUNNwHWoXzwuJfSkVkHL/v2VMF3rs9 3xTH+3Y1LkTntJhGcghj7Lj8seICRQasd0eM3JoRZytiD+c4uxwvXS7h0zqnFMbLBRT4 ja2zjQn2sdNrN2kul2Ek3Wyb3tqmwejH8qwkiGhAjssj82vzz9o+M+gMxoSxP7na33JH UEOVnIm7WbDAlV9476NO+f1vOMX+yTE3OuA1iHcyuGCfNF1FFUvI1OIwN0LBzZbTerP8 uyjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=woMUqB+NxQVyx9bqJ/hMWppoqlKQKTrKDVZNrHx8Kic=; b=A7YNE9yTxugnRzYEOKcaqeISWT0drIm0uZvXobNq+guO/IgC1JqOGfHNGPJlFQg1Hy a9zPdHPzHwH2Tl9ImrGNZcvhxtg0Fw2+IHbDQsAjaYjgFN/7o5Knwy2vVwTRmJ2aKamA tMNlmP+ZO6xUbC/Lp+sbfQYfJcwb/2tUvLqA45Y9TTClF+aJR48NZuqGMvh0nRFkZ9mS R80BzAqPzsC+HtuL2VxQE1FdR3BAlKs/WXGV18VIUUhwwJ55w/3s8wo6wwcX3ITG6enh qRxXbJo4l5C1PtMDIJM9w38SXZjhjVhrV+/HoJnhSM9KzWC9e9+iz8imheSGVvH5jk1S 2sdQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u10-20020a17090282ca00b0016c1c1484aasi9367671plz.474.2022.07.11.06.42.07; Mon, 11 Jul 2022 06:42:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230200AbiGKNjk (ORCPT + 99 others); Mon, 11 Jul 2022 09:39:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229844AbiGKNji (ORCPT ); Mon, 11 Jul 2022 09:39:38 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0D1C8419AE for ; Mon, 11 Jul 2022 06:39:37 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3857C1596; Mon, 11 Jul 2022 06:39:37 -0700 (PDT) Received: from monolith.localdoman (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 22E803F70D; Mon, 11 Jul 2022 06:39:35 -0700 (PDT) Date: Mon, 11 Jul 2022 14:40:08 +0100 From: Alexandru Elisei To: Mark Brown Cc: lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com, heiko@sntech.de, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, judyhsiao@chromium.org Subject: Re: [PATCH] ASoC: rockchip: i2s: Fix NULL pointer dereference when pinctrl is not found Message-ID: References: <20220711130522.401551-1-alexandru.elisei@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mark, On Mon, Jul 11, 2022 at 02:23:59PM +0100, Mark Brown wrote: > On Mon, Jul 11, 2022 at 02:05:22PM +0100, Alexandru Elisei wrote: > > Commit a5450aba737d ("ASoC: rockchip: i2s: switch BCLK to GPIO") switched > > BCLK to GPIO functions when probing the i2s bus interface, but missed > > adding a check for when devm_pinctrl_get() returns an error. This can lead > > to the following NULL pointer dereference on a rockpro64-v2 if there are no > > "pinctrl" properties in the i2s device tree node: > > > > [ 0.658381] rockchip-i2s ff880000.i2s: failed to find i2s default state > > [ 0.658993] rockchip-i2s ff880000.i2s: failed to find i2s gpio state > > [ 0.660072] rockchip-i2s ff890000.i2s: failed to find i2s default state > > [ 0.660670] rockchip-i2s ff890000.i2s: failed to find i2s gpio state > > Please think hard before including complete backtraces in upstream > reports, they are very large and contain almost no useful information I'm at a loss here. Are you saying that those 4 lines represent a complete backtrace and they are very large? Or are you talking about the panic log that I've included in the commit message? > relative to their size so often obscure the relevant content in your > message. If part of the backtrace is usefully illustrative (it often is > for search engines if nothing else) then it's usually better to pull out > the relevant sections. Would you mind pointing out what you think the relevant sections are? I would also find it very useful (for future patches) if you can explain why they are relevant, and why those parts you've left out aren't. It's not very easy to figure out what is relevant when you're not familiar with a subsystem. Thanks, Alex