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=-5.6 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,USER_AGENT_SANE_2 autolearn=unavailable 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 1B29FC433EF for ; Sun, 8 Sep 2019 11:34:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E1C3321734 for ; Sun, 8 Sep 2019 11:34:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567942444; bh=73dqUp1UuFijMCdNUSXFQ3ADngSEc+MwZNdBG1PT9zY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=OyZtnBhEnkCKCGGK6eAo+uNrkeJ6FH0kh1/ueCQiYiWz4DdjHhsF0G6S/X14zwcBL rqX7HAcg/J808hJ59gDnkHFD25EtAOUPkYy2i/pgOMFVG80Xz9bvR7PM6KegQvV4eg kAcuw3dQIGMxH8/tou2iEBmS9fJ1nxjOp3+j8rOA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728891AbfIHLeD (ORCPT ); Sun, 8 Sep 2019 07:34:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:58112 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728740AbfIHLeD (ORCPT ); Sun, 8 Sep 2019 07:34:03 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (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 30899206BB; Sun, 8 Sep 2019 11:34:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567942442; bh=73dqUp1UuFijMCdNUSXFQ3ADngSEc+MwZNdBG1PT9zY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Fh9uEAA0cOTgjt6bxZJBiFsr599jUiyznIekxWDCAeOPDXWR7GQ6ITjWeEt+g0JuP /iStZTilcO/8dc9VpLYxeswMBb2VLsjzaFxOIiF4cudpG8rsRu72ApdEBSit7stduT 3OQEHjmxGqFUeEuy9wExsOz/oCillPPrfz5uOSr4= Date: Sun, 8 Sep 2019 12:33:56 +0100 From: Jonathan Cameron To: Elie Roudninski Cc: Martin Blumenstingl , Remi Pommarel , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Kevin Hilman , Neil Armstrong , linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iio: adc: meson_saradc: Fix memory allocation order Message-ID: <20190908123356.2cd844a3@archlinux> In-Reply-To: References: <20190901105410.23567-1-repk@triplefau.lt> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2 Sep 2019 21:40:49 +0100 Elie Roudninski wrote: > On Sun, Sep 1, 2019 at 12:29 PM Martin Blumenstingl > wrote: > > > > On Sun, Sep 1, 2019 at 12:45 PM Remi Pommarel wrote: > > > > > > meson_saradc's irq handler uses priv->regmap so make sure that it is > > > allocated before the irq get enabled. > > > > > > This also fixes crash when CONFIG_DEBUG_SHIRQ is enabled, as device > > > managed resources are freed in the inverted order they had been > > > allocated, priv->regmap was freed before the spurious fake irq that > > > CONFIG_DEBUG_SHIRQ adds called the handler. > > > > > > > Fixes: 3af109131b7eb8 ("iio: adc: meson-saradc: switch from polling to > > interrupt mode") > > > Reported-by: Elie Roudninski > > > Signed-off-by: Remi Pommarel > > Reviewed-by: Martin Blumenstingl > > > > thank you for fixing this! > The patch fixed the kernel panic I had, i can now successfully boot my > meson-gxl-s905x-libretech-cc boad using patched linux 5.2.11 > > Tested-by: Elie ROUDNINSKI Rather than rush through a quick pull request I'm going to hold this one until after the merge window. Applied to the fixes-togreg branch of iio.git (which is now based on staging-next). Thanks, Jonathan > > Elie > > > > > > Martin