Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4491378pxj; Tue, 22 Jun 2021 01:11:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKMh8VB8+Ta2km1uUCpdgazoYtrRPNONcSVxgHK2nXah2kvORresNlHq0P7XCqn+i1YNaT X-Received: by 2002:a05:6402:19b9:: with SMTP id o25mr3215915edz.192.1624349489267; Tue, 22 Jun 2021 01:11:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624349489; cv=none; d=google.com; s=arc-20160816; b=wSyIwo2aK6P6+8+0exnp+zYR8mnNGnFecvYJAgkcOsYwV/OycP0wO7mkdb8I29J+B8 HE8POmjSVi/CQWxoeayU6cXIPFY44tPG1ItqnBif6NahQOZoAm/54KuD6NCYOX4Xhv30 IdURAUo+4sMphgacEjQgK4DMMhKl+YwHh1yuoNlOtAncJ2eoJMWzjL8b+4lWCD34xtEu 89/sefOuKbasVVCfXHkUkvHvbRXR7FaLx/IVA+CtuZe9cLdfxfMOh0C3EdYpgXun1KBw J5mVSob/sdG9tpu/36lO9wBa9IGigbMQbcazzz5rIUsIIeXSgbtYDL0KVM1O5+e7Bn+b kl8A== 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:ironport-sdr :ironport-sdr; bh=iT168Uo2GndPKuACyex3+SsTBascR1yG+wAeM7ZmNUk=; b=dwtUM7V5tH3iv84iMcYKKtTGgv4Zi4X/6o3ZwvbAqPGNTog+z7bSyoMeC8BtBeqP/9 5nCyRJzUVpDwbCAl+vnyfsAsV8l1d1q3cw7j48tswmsdVhirx5wOw6qqd6Vhp/x+rkJt HTI6LVcUbF/UC2Qw88MJbubNkrHdCZZvZWhqhnjgI+5xm+Z6f7sKCmF336C6NXv913vq iioI/VwDzWbYhZ5qiGq2WTlJGOmESiuAlgb9csiQJy1VkR11RtsGpWBnb5C1+K2QuBz9 /gJ3hXuXiB6KedFXEaq3pHGjjLAWtua80nABOKUPS6/M4LJVxAvBB3UL/nbUG9hbHZO1 KaOA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h23si9260204ejl.117.2021.06.22.01.11.06; Tue, 22 Jun 2021 01:11:29 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230013AbhFVIMX (ORCPT + 99 others); Tue, 22 Jun 2021 04:12:23 -0400 Received: from mga17.intel.com ([192.55.52.151]:34208 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229677AbhFVIMW (ORCPT ); Tue, 22 Jun 2021 04:12:22 -0400 IronPort-SDR: yLnl+IPdXaTIx0brnEEpE2SYkb9b72QQRcbYE+b0Yehk13GyMfkzG3tY+KdB5sJ+m/NcvID2hu eP2yz8iI0HLA== X-IronPort-AV: E=McAfee;i="6200,9189,10022"; a="187389686" X-IronPort-AV: E=Sophos;i="5.83,291,1616482800"; d="scan'208";a="187389686" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2021 01:09:58 -0700 IronPort-SDR: WRQWjSz6IY04U8on2iTPxmpcU3oevZrESTBlFpgmUtPBFK+YMTI37ILVe7Eo82IVljnXSI/D+h E80JfmEAPzUA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,291,1616482800"; d="scan'208";a="556537765" Received: from kuha.fi.intel.com ([10.237.72.162]) by fmsmga001.fm.intel.com with SMTP; 22 Jun 2021 01:09:55 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Tue, 22 Jun 2021 11:09:55 +0300 Date: Tue, 22 Jun 2021 11:09:55 +0300 From: Heikki Krogerus To: Dominik Brodowski 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 On Mon, Jun 21, 2021 at 05:31:50PM +0200, Dominik Brodowski wrote: > 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. Thanks Dominik. I'll clean it and send it out today. cheers, -- heikki