Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6960831rwp; Tue, 18 Jul 2023 08:08:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlHrnqkhlmduIc51pGAgN6FhhmYxrZW998RuxihkXdA+B6RVQN1x/aGobE0Kaz+er3xU9Km2 X-Received: by 2002:a17:907:7ea5:b0:988:84b9:79d0 with SMTP id qb37-20020a1709077ea500b0098884b979d0mr121291ejc.74.1689692889874; Tue, 18 Jul 2023 08:08:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689692889; cv=none; d=google.com; s=arc-20160816; b=jAT+bRhN0nrW9omT3VF9yZUCorRNIX/nS+4qboyB1qXvX2TJjckixuyIeUavZpooo8 UbdX3+EZ2DLDajjdJja1mQqisQ7ViYtOqMm+LrrWzL5bBA6/U7lId9VUfWBoNWUo9Bxi q8YBAh//wY6eY3CwQzfkMUWPGvAMh5rZyE9UlZi1vp1GXiho1rHFRkHy2xO9kkudM1n1 Zq/wEOwwMge56hk7Y8mvqeWD5vbTH/pKi6UzTxoGS6DM+phFljqlw/vWGle48DkQTf5j a64JSBFn4YVPuAbkdnvSqDAy6sPwLJyueH6QFRaJqfvYlshE5pVkGabQOY9uz5bvYLsa Cz2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=7mP1WvA308W2kMhbt+edNkzHquB2vppxOQYAKJcle/Q=; fh=SMrBBmiTIsIvbOiG3KfNGEa687zQZ2pOHlQqaBrQ6Vo=; b=NEpMOP01LvjQpL6eufZV91Okr4NtI+5Pg1GKaZ9SuvoFD7ga7Pa6fxG4cnhgWtBGfR RnIBkHL9n5rDD7VqZJrMGIeeN3Kv+CfXdJTWqzeKQ2poOVsvK2Ff89FuBAWRZQdGu/f3 h+KVr/k6FkeOWGlvo85BurosuEW/byIVPHpsOMUr7T5JvISdKEkis4e/oIbHE/WtaYnE 5tvTmR7RfO3rIPHNdL01ZIg6Ezv2g/ZxxZjmVBga0e1ylh9uuHZ3TQC1oJBOove3Wrvp XSZrLV0emQMnkBTPfQ+GVnztBYJib9yVCjeJ6iJxdBgaePAdgB3kXumoR24O0BW6c+I+ yQ1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=R6i0a7rE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t14-20020a170906608e00b00992f2becb47si1256660ejj.7.2023.07.18.08.07.45; Tue, 18 Jul 2023 08:08:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=R6i0a7rE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233362AbjGROnb (ORCPT + 99 others); Tue, 18 Jul 2023 10:43:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233355AbjGROn0 (ORCPT ); Tue, 18 Jul 2023 10:43:26 -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 1C017172A for ; Tue, 18 Jul 2023 07:43:25 -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 98E57615FB for ; Tue, 18 Jul 2023 14:43:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C10AC433CA; Tue, 18 Jul 2023 14:43:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1689691404; bh=w6bVSOVVCvV+Mgr+uiH/C+j6HhM8JjZmVwgHkfRzIWA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=R6i0a7rEZt3S1wzNlBgXdBulGDrNX1JARL5zcP3cg/fg8AqzNC6CSjpdHO6+npgS/ HnvgS6BbAOiYABPLl90h7UIaF7nycBLTmIKhw4+hSjaDT9MXxuhiBQYoBs2Udx9sob cABFPM7UmpPxr86thinxvC97W4oUbpOgxaeEugAA= Date: Tue, 18 Jul 2023 16:43:20 +0200 From: Greg Kroah-Hartman To: Daniel Golle Cc: Miquel Raynal , Srinivas Kandagatla , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] nvmem: core: clear sysfs attributes for each NVMEM device Message-ID: <2023071834-sixfold-reggae-0406@gregkh> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 18, 2023 at 02:55:31PM +0100, Daniel Golle wrote: > Set nvmem_cells_group.bin_attrs to NULL in case of an NVMEM device not > having any cells in order to make sure sysfs attributes of a previously > registered NVMEM device are not accidentally reused for a follow-up > device which doesn't have any cells. Wait, attributes and devices should NEVER be reused, how is that happening here? And just setting the attribute field to NULL doesn't free or clean up anything, right? Did memory just leak with this? confused, greg k-h