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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 437A5EB64DA for ; Sat, 22 Jul 2023 16:53:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229707AbjGVQxh (ORCPT ); Sat, 22 Jul 2023 12:53:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229477AbjGVQxg (ORCPT ); Sat, 22 Jul 2023 12:53:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 338B71A1; Sat, 22 Jul 2023 09:53:36 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BD0F760B06; Sat, 22 Jul 2023 16:53:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D819CC433C7; Sat, 22 Jul 2023 16:53:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690044815; bh=Y29p/fyLP/yVWP0radrZBPnFb3gL4bnZcfdmPVFRRtM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=M4QMkDp2kGt5STnfWhJkOy/+l0IUZ0ny7T7N2BPIdexHV9XgsjpqQXPLo2m58Keca 9hkpGmyJkgPT96sMMBruP8I2zeLXrHOGC1L/u+srkxR86XPHjntWFoew+/r7APg5Mo fpsiIgaLgwmIUwfs/s6CzoLH0WkvuiqWURVliwOOvl64/+jVjtUOuv3C4hpXImR38e 9MdH7QPmxqEgc7KngHMSyd2uX4ctzy+QyInwCcCD9KbGAPCp+VfvN9SG1lPUHhZRmG L01VFFTEtGErn65fvkNMg9vYB3/AKdHMRfQ7wx307p9CwzDTjcmkUMXSsOFn7c7PvO yTyGMGEvGVfWw== Date: Sat, 22 Jul 2023 17:53:32 +0100 From: Jonathan Cameron To: Andy Shevchenko Cc: Milan Zamazal , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Lars-Peter Clausen , Nuno =?UTF-8?B?U8Oh?= Subject: Re: [PATCH v3] iio: core: Prevent invalid memory access when there is no parent Message-ID: <20230722175332.3ac83cc8@jic23-huawei> In-Reply-To: References: <20230719083208.88149-1-mzamazal@redhat.com> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; 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 Wed, 19 Jul 2023 18:27:45 +0300 Andy Shevchenko wrote: > On Wed, Jul 19, 2023 at 10:32:08AM +0200, Milan Zamazal wrote: > > > Changes in v3: > > - The call trace in the commit message reduced to the minimum lines > > needed to explain the problem. > > Precisely, that deserves my tag which I already had given :-) > Thank you! > Applied to the fixes-togreg branch of iio.git. In theory every device should have a parent, but this fix is more minimal than adding one for the dummy device (which we should still do - even if it's a virtual device of some type that we create just for this purpose). That reminds me, I was in process of fixing this for perf drivers and forgot to finish it off :) Jonathan