Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp3041322ybe; Sun, 8 Sep 2019 06:01:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqwiIK8rL59zwfwOo987ddZYCtpR5/IRp3EgryEojZfxjluGrd2HUnFWCCnK23dqzKR2SSck X-Received: by 2002:a17:906:c72d:: with SMTP id fj13mr15568432ejb.36.1567947688652; Sun, 08 Sep 2019 06:01:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567947688; cv=none; d=google.com; s=arc-20160816; b=RZ1cxrsPXwghKdwO/aphsPxANW8UmHiZhv80Y+e/FFMG4OAMK3J53DLo/fyznGfWD0 AyvE67Bxqifz+lLFrVlk0d/Tc4Y/9JJAA16ak1bab+aGB8Qfjle2M2f9bWae+RS1sDqE Mp3UdNwZF6EK9LvaCHakdK8zKaO/R5ZZUnyuWhJU8bTiZDyw6O3Uo12odzuoCsNSG3dI CbXwMKM2ZsIuvFfaZqa0R1UasN2Mz/iatoQVI9vL1tOBhi/kv3CTHEzRJA58KbQU1opv YTCGUpyzDMke7+J6O3S5GSVjMB8f0wj1v9I3kAjqAf05NSOlPd8S41My1kpw7GDylesD TIsA== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=GdzowCjz2+xhlPk0zQuyCKiV6L7+70GLThsUI/nX7gg=; b=qhcupBTgr9lGmHjInF7RhdlB4WE+HjIO4X2utJrh9LZETB4IhvBdjQuP/7FjvjDGhI sNym9ToQ1ZFcP09urRfSSD8J3omo0m6jKMhqf4CbWxJyuXYSmsWOmsL1hlu9VpmJarbX 20ZDYxJe/zFIKKadj7ilhGB6jjU1dY8Am438d30CaV/oYN+FzVAXp7Ub+S/34VIycnwz GZRgtjOZyBXSeARV4Ve2VuafuAU4srvaUoVXp2TpfmTDMW3NqfzBkqj4aTrM1pbkSIMB in2Q1EBc6eSj3tRcHKdYwSEPGDT0ilwMkZjn8fISsYKBJ4N6+O8rNNS1zJ8JG6HQrUir /6NQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Fh9uEAA0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id c22si5792015ejr.377.2019.09.08.06.01.04; Sun, 08 Sep 2019 06:01:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Fh9uEAA0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728871AbfIHLeD (ORCPT + 99 others); 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