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 9ACF0CCA47B for ; Fri, 10 Jun 2022 14:56:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232471AbiFJO4n (ORCPT ); Fri, 10 Jun 2022 10:56:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232547AbiFJO4m (ORCPT ); Fri, 10 Jun 2022 10:56:42 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C2866141; Fri, 10 Jun 2022 07:56:40 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id z7so35618698edm.13; Fri, 10 Jun 2022 07:56:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=27H3ValQb+HBvUPzRu8Xf/glxEPwy0TQVzU1GqPnVOU=; b=eoLQQvbaXDJR95EC5g5LJ5CxHbAJV47MdiWWQDebUGy9Q4ljUChinzTC65zAyx9+cu P1TKzxsUNIbMO6DgJKWLF02va3yYhlizG8M969o8ytL6wp0eioeV35oB2ovGhpg0HL2J AtE27v900JQInLKWLqxjz95V4dBqhK4TH2d+FpSxvJHnaV2+W4R07LunLSpcHXFduZip CtWpeygUURiujmqCRQx07U09RQlXGX3kfWPB66KuMLyPm04qs+bAtSY+koRjNgs1IcDR 1X5UPyx91NZwB8hqYfnf3lsrVd7c+3ZPhRnd7kjLUGHQEmxcvRwvNYyB/XfwXQBjPuch iMdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=27H3ValQb+HBvUPzRu8Xf/glxEPwy0TQVzU1GqPnVOU=; b=BLZplKxXqRALUxWoA0WIT+yyjwulSMxbuf6Po8ZSIXZdVQJl9RM8plCFbTxHVzd2aG ygwnGzKXU8vm/I1KZtzguMlhjXTfFLhH7QmJo4jCNgM064fI35sbak59Q0Y4XAGyUW8a RBaltiZLrvAivGO+IerZJ9wHafR37gK7cRzpuH0bUogSWwNpoofATfij/DKZlJTasrkI Q53/dXcMe4fQQp07rvjDPKdeWCAuwElkQL2kO4WDnYVX4j+prwxqhCmt7g3x0+muLa/K pZoOlIazk7WEIymPSOcVRuumWfivF1HwaPLF/VC1jUq5a9jf/YFnup7NscshxD/R5SoY LZVA== X-Gm-Message-State: AOAM5325u0TJLjrs+W5JDX092P/F4/2TGwvWnPUA2oj1jfvlRdh2Hjtm WRGb4uEletcTg+hKijYH0JIGCkjhht250PoMsSU= X-Google-Smtp-Source: ABdhPJy+4W6TzW/Fih8FB8596xZDMbGHtv+y8KFgg0s5ncZshszK0PY5LIku4jQLDiOJ5W3CjVR22n6jku9zOiOB+lo= X-Received: by 2002:aa7:d303:0:b0:42d:d192:4c41 with SMTP id p3-20020aa7d303000000b0042dd1924c41mr52267347edq.178.1654872998983; Fri, 10 Jun 2022 07:56:38 -0700 (PDT) MIME-Version: 1.0 References: <20220610084545.547700-1-nuno.sa@analog.com> <20220610084545.547700-21-nuno.sa@analog.com> In-Reply-To: <20220610084545.547700-21-nuno.sa@analog.com> From: Andy Shevchenko Date: Fri, 10 Jun 2022 16:56:02 +0200 Message-ID: Subject: Re: [PATCH 20/34] iio: inkern: only relase the device node when done with it To: =?UTF-8?B?TnVubyBTw6E=?= Cc: dl-linux-imx , Linux-Renesas , "open list:BROADCOM NVRAM DRIVER" , linux-arm Mailing List , chrome-platform@lists.linux.dev, Lad Prabhakar , "moderated list:ARM/Mediatek SoC support" , linux-stm32@st-md-mailman.stormreply.com, linux-arm-msm , linux-iio , OpenBMC Maillist , Cai Huoqing , Benjamin Fair , Jishnu Prakash , Linus Walleij , Lars-Peter Clausen , Alexandre Torgue , Amit Kucheria , Andy Gross , Michael Hennerich , Haibo Chen , Benson Leung , "Rafael J. Wysocki" , Alexandre Belloni , Christophe Branchereau , Patrick Venture , Arnd Bergmann , Nancy Yuen , Sascha Hauer , Daniel Lezcano , Gwendal Grignou , Saravanan Sekar , Tali Perry , Maxime Coquelin , Paul Cercueil , Thara Gopinath , Avi Fishman , Lorenzo Bianconi , Claudiu Beznea , Pengutronix Kernel Team , Fabrice Gasnier , Matthias Brugger , Tomer Maimon , Bjorn Andersson , Nicolas Ferre , Jonathan Cameron , Zhang Rui , Shawn Guo , Guenter Roeck , Fabio Estevam , Olivier Moysan , Eugen Hristev , Miquel Raynal Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org On Fri, Jun 10, 2022 at 10:48 AM Nuno S=C3=A1 wrote: > > 'of_node_put()' can potentially release the memory pointed to by > 'iiospec.np' which would leave us with an invalid pointer (and we would > still pass it in 'of_xlate()'). As such, we can only release the node > after we are done with it. The question you should answer in the commit message is the following: "Can an OF node, attached to a struct device, be gone before the device itself?" If it so, then patch is good, otherwise there is no point in this patch in the first place. --=20 With Best Regards, Andy Shevchenko