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=-12.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=ham 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 AB0ACC83A9E for ; Sat, 28 Nov 2020 22:23:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7A7C822370 for ; Sat, 28 Nov 2020 22:23:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="DiJBtCrd" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732814AbgK1VtZ (ORCPT ); Sat, 28 Nov 2020 16:49:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:47488 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730502AbgK1SlR (ORCPT ); Sat, 28 Nov 2020 13:41:17 -0500 Received: from archlinux (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (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 53386246B0; Sat, 28 Nov 2020 15:39:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606577974; bh=2l7SriDc+cS34lE/6C3WpeiJUZvaYDDzy7eIfEmyDeQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=DiJBtCrdnYjR+RnkfeTEaM6iazQ9N5bVONlssBDMXDCQXo9vqhqOsfalUycwsOBbc 8wo1tq8icuBSSXIHbaP9NjJV5eLENS8Bg5hkhpNbxOpkeF11BxOl7u8bMYokPDUJtJ sllzbmCu1RBpO9xtveLMe58jARcHFOmXGMqFaBWE= Date: Sat, 28 Nov 2020 15:39:29 +0000 From: Jonathan Cameron To: Linus Walleij Cc: Lorenzo Bianconi , Lorenzo Bianconi , linux-iio , Denis CIOCCA Subject: Re: [PATCH] iio: common: st_sensors: fix possible infinite loop in st_sensors_irq_thread Message-ID: <20201128153929.0e1f4419@archlinux> In-Reply-To: References: <3b8dc467b30dd6869ea60ed583cad750c74eb44e.1605450804.git.lorenzo@kernel.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Sun, 15 Nov 2020 23:50:51 +0100 Linus Walleij wrote: > On Sun, Nov 15, 2020 at 3:38 PM Lorenzo Bianconi wrote: > > > Return a boolean value in st_sensors_new_samples_available routine in > > order to avoid an infinite loop in st_sensors_irq_thread if > > stat_drdy.addr is not defined or stat_drdy read fails > > > > Fixes: 90efe05562921 ("iio: st_sensors: harden interrupt handling") > > Reported-by: Jonathan Cameron > > Signed-off-by: Lorenzo Bianconi > > This looks more clear if nothing else. > Reviewed-by: Linus Walleij Denis, This is in the 'obviously' correct category but I've been wrong before so would ideally like you to you sanity check this one and Ack. thanks, Jonathan > > Yours, > Linus Walleij