From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C643D1DE3DC for ; Sat, 27 Dec 2025 15:08:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766848094; cv=none; b=Z2Oop0tAzS4z+BGSLvwxpAVTyPXDo72cCHrC3mknEnat22c1I3+jBc+ovfKUIy86c14HuKrLRiVPHlybeUp927u2+6vsFtJQ9zr/yH6wrWc193mAauq0ZByiiwg8PLvpLnWGyaU+FoXUVZ0mUmHT9/HNk7yz9gz6K/xAW/4y/n4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766848094; c=relaxed/simple; bh=nokbZUBtGJz+9lTtAToHWMoqoay1Q0X5TfXzkA4lT/8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=eeXXch0+kjf278uYoib546SIDlwEUclrF51BJTyOD8oaUSMvLETDYnTLfP7LwnRhric2CA6l7g0XwWJF+qRWl/ffnb5HLLimJlRix+c2xNG5W7Wk05xj/kNM3n5vk0H8RtcL8dWEANy9aZERRidoWofVjJk2N8BD8eVeYZbz4Zs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=cxL9cII6; arc=none smtp.client-ip=192.198.163.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="cxL9cII6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1766848092; x=1798384092; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=nokbZUBtGJz+9lTtAToHWMoqoay1Q0X5TfXzkA4lT/8=; b=cxL9cII6LMgZN4Tcd5tFGPUfct5VWqn86acMj7K/5oiJaXt5Xit2lg8w C3tWHql1SlDwDTTnOMVFXxFdH1vQov+5V1nZyQXheuMAI+b31EuuEPxmM FptjXqVURiF04JrS72z1ZY8d3YHy3P7jxDTX/rHUtQV/r9LZ8u7QgJc4t 7IAfQziX3LiME/nlc0VB/FX05mhckR0Dc1zAjCD1QZo/Wv8Y+2L/po6Sm ntWAHRfMYF+KSCIoapNXvPUu+eR+f4ipYVU3WuYFtwDBQtgRECf2gsdrL 7/2xYnnacaJzPIsLgAiMKyYzOTJfzPbMhNdc4/3aNDGsm51H5DK/eL+2C g==; X-CSE-ConnectionGUID: bdqMD6FgRWmnxyf9ivFfAQ== X-CSE-MsgGUID: Q5IZ9gPmT+6Qm2NFjDZxBg== X-IronPort-AV: E=McAfee;i="6800,10657,11654"; a="79178610" X-IronPort-AV: E=Sophos;i="6.21,180,1763452800"; d="scan'208";a="79178610" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Dec 2025 07:08:10 -0800 X-CSE-ConnectionGUID: iCm6ZcmcSDyiyrh9/8CxQA== X-CSE-MsgGUID: TThJ/9OeSQGUCF67ttHpqQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,180,1763452800"; d="scan'208";a="237968645" Received: from egrumbac-mobl6.ger.corp.intel.com (HELO localhost) ([10.245.244.211]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Dec 2025 07:08:08 -0800 Date: Sat, 27 Dec 2025 17:08:05 +0200 From: Andy Shevchenko To: Diederik de Haas Cc: Michael Wu , myungjoo.ham@samsung.com, cw00.choi@samsung.com, linux-kernel@vger.kernel.org, Dragan Simic , linux-rockchip@lists.infradead.org Subject: Re: [PATCH v3] extcon: Fixed sysfs duplicate filename issue Message-ID: References: <20251024024946.16618-1-michael@allwinnertech.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo On Sun, Dec 21, 2025 at 03:01:11PM +0100, Diederik de Haas wrote: > On Fri Oct 24, 2025 at 4:49 AM CEST, Michael Wu wrote: > > With current extcon_dev_unregister() timing, ida_free is before > > device_unregister(), that may cause current id re-alloc to another > > device in extcon_dev_register() context but sysfs filename path not > > removal completed yet. > > I periodically get errors like this: > > [ 7.116152] rockchip-usb2phy fe8a0000.usb2phy: error -EEXIST: failed to register extcon device > [ 7.117005] rockchip-usb2phy fe8a0000.usb2phy: probe with driver rockchip-usb2phy failed with error -17 > > This was today on a NanoPi R5S (rk3568), but I have seen it before and > on multiple devices. They are all Rockchip based, but that's (quite) > possible because that's what I use the most (and where I pay quite a bit > of attention to dmesg). > > Slightly fuller dmesg output of the above error is here: > https://paste.sr.ht/~diederik/42c6b3405386c823cd9f837d73a9a32e810361be > And via 'journalctl' I hopefully got the full dmesg output: > https://paste.sr.ht/~diederik/7a6109115b1ad85290de482db091dad3759ec159 > > Here are 2 similar logs, this time on PineTab2 and Quartz64-A (both rk3566) > https://paste.sr.ht/~diederik/cfe606801d3dab0267bea7049687d24c0d6e8d71 > > Those are all the logs I have saved, but it has happened several times > besides that. But most times I just rebooted and didn't save the log. > Today I looked a bit further, found commit 7bba9e81a6fb, searched on > lore.k.o and found this patch. > > So I'm wondering whether this patch would also fix 'my' issue? > Or is this a different issue? But have you had a chance to test it? The code looks correct after this patch as the first we remove the struct device and all associated data (including sysfs nodes) and then remove the ID from the list. Without that there is a window to get the same id for the devices that is pending to be removed. -- With Best Regards, Andy Shevchenko