Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3880492pxj; Mon, 21 Jun 2021 08:33:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKyUTdhvfG4DqYOIJ1UNhqEs7HaDjOqbI6FIMMT70tUJpF2TYiYxik/qTyDt0z+Y5g75kv X-Received: by 2002:a05:6402:1145:: with SMTP id g5mr21996986edw.217.1624289620777; Mon, 21 Jun 2021 08:33:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624289620; cv=none; d=google.com; s=arc-20160816; b=mBHNQVj+DheIXtzA7Z/GM5JAaMXayQPu4jYWl8shi5VoOrlwhCuro70/Ix9gkwQgDS ISHEKytF9kpWWDAyqxZ+es4ksUEnnq1KaiMdzERYS335H10bazUSSaGxAzYxsArCFQyY 8iZHSjRoUTVhc8H4JeGr1J9iP+6uj2sA3XImiaVJEYl90a1wWNsS63XrZ1A9Jdeqo+gn 7tOr1TTXrctGR8Uly8z5GWCNKYW8q4DK8t1CMC7grs5VQPE0zLYpuXcxouCzxAU1hQvL MNx1NCPI9EgFifpQf+MgLUVEZ6UXEGYMvdIdmamK3ZYEaXTBvdDVhzkS/I85AMNuuwDC uZug== 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; bh=Pgwpuv97r+e8lSJIss77S0QaMd/jA5cvVYAp6oi6S6g=; b=z8K5XUTrzoaZczsvPlgyqcgNlHY/b00Jp1sseJdUaqwJmNZmAsSHGOkjSrCEx5xNFU 19v8RFwNLoNDDgYBbtySZJ5PqfI+vLDug6Z1KI1Z0sc1KGWD3daj3uOUtLEvbt1v8aE/ Jn9E+OWW5aaEjiKkUMzuDo9nnS7ylLysWoSQWtYZAT/rpv/zaFdK2NWcLkZRD0tOqaUM Zm+3ZQ9ts4K3qt9pypZJUhwGsD42J2Vytsl7mDceqKF/xyfnoL3R0bW9NLLSqUg0TVGa lJ7MJ2p4AXOjn/V2E98UEcPmFyrgLO3NNkY5ePMK5scbbV0Jh5M5F0A8y+1tT+qRWBKZ M8KA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l3si12139032ejd.313.2021.06.21.08.33.18; Mon, 21 Jun 2021 08:33:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230274AbhFUPeK (ORCPT + 99 others); Mon, 21 Jun 2021 11:34:10 -0400 Received: from isilmar-4.linta.de ([136.243.71.142]:50692 "EHLO isilmar-4.linta.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230321AbhFUPeK (ORCPT ); Mon, 21 Jun 2021 11:34:10 -0400 X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES X-isilmar-external: YES Received: from owl.dominikbrodowski.net (owl.brodo.linta [10.2.0.111]) by isilmar-4.linta.de (Postfix) with ESMTPSA id 37C0C200D0F; Mon, 21 Jun 2021 15:31:54 +0000 (UTC) Received: by owl.dominikbrodowski.net (Postfix, from userid 1000) id 951488018A; Mon, 21 Jun 2021 17:31:50 +0200 (CEST) Date: Mon, 21 Jun 2021 17:31:50 +0200 From: Dominik Brodowski To: Heikki Krogerus Cc: Andy Shevchenko , Lee Jones , Linux Kernel Mailing List Subject: Re: v5.13-rcX regression - NULL pointer dereference - MFD and software node API Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Mon, Jun 21, 2021 at 01:37:59PM +0300 schrieb Heikki Krogerus: > On Mon, Jun 21, 2021 at 01:00:06PM +0300, Andy Shevchenko wrote: > > Can you, please, attach this to the bug report? > > > > Long story here is that the device creation fails but we already have added > > swnode to it. Meanwhile, device itself is not completely instantiated (yet) > > and dev_name(dev) is NULL. The software_node_notify() is called with such > > device and Oopses in the following line > > > > sysfs_remove_link(&swnode->kobj, dev_name(dev)); > > > > My patch fixes another issue that might happen before this and in the code > > that retrieves swnode itself in the device_remove_software_node(). > > > > Of course my patch won't fix this issue. > > > > I have heard that Heikki is looking how to fix the issue in your case and > > potentially in any other cases where device_add_software_node() is called > > against not formed object instance. > > Dominik, can you test the attached patch to confirm if this really is > the case. With this patch applied, the panic disappears. Many thanks, Dominik