Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp2027501lqg; Mon, 4 Mar 2024 10:30:59 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVPk0gs7Jqodyh9TzxFJYMPVrrsu+3QWn3ZsAqj020xapqel480H7UEhLLyTigsKQJXA3q+lwwYSdeRgQM65w4qfEj5ViIlOm26CNW53A== X-Google-Smtp-Source: AGHT+IEzqKPoauuGl9QDMawOCMdsygi5u2i199jObOx9inmjuKpQtogiwjObtnO/THwp7YyTFbNK X-Received: by 2002:a05:6a20:1586:b0:19e:cb16:f03e with SMTP id h6-20020a056a20158600b0019ecb16f03emr279584pzj.30.1709577059430; Mon, 04 Mar 2024 10:30:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709577059; cv=pass; d=google.com; s=arc-20160816; b=JKlwbniZGUjbYw43tF/ri8pXQ1LMhqEigSJxAQ73bNA02hUZ4tRyNMsBlX9Mdgg5IJ Wuu6yIDWHmTEsEzejMKG+0tn+MpzDKUG4YW3Km7lSdkon5cae+ZMZDEqt1jZUcF3zqu8 tEC7CnT3HE6IQ2HzzjwKOhb835zFQNieh2Dbcfu4N+wGNiNN3XruRNT5PMmM04pWq2tr cdv+bw2dITB6C9rf2/290ni1ylLIvmhKeY+/5G2LRSA6qy12OVeTa2FgyQVN5P26L8Gn nhJX6LEqhrHEVuLCklhQkA9/wz+uc9ha1mQYZy/952X6pB+NUlRAMyZCktEA5sbNKb4i 3chA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=di+fg9FFgzeuMjxmlxXXBc1s2/VE1/VfmfRv3Zy1tWM=; fh=qYkZuPNobhD2KmvbGzcu5RcI2QtAEULe7PReXZuFqA4=; b=Y+6XwoFFGRnV/u9smKPfD3I5ehTt0fjW2AA/CrEDyh0dslYY2nQpujA0Blug1FFd8Q G1fF7nzivEzWZzy8nGi6OEPvIyJw0BIiKZK2x1cQ3txHRE7G1SskzTARJ5SMA6Hwn+vg pLeY71L7BueGoa9IOGxB1I0cokxKeNW0sjMDQUvN/FhCvoPPsr/WwfHrJavC/65zOHav 9FDTMqdK8Cida1L/mNfmYuPNHSoVNnKzfIAYExvEgvafcY3XISY8Mnvtbj2M+VcFFFFi 9b4kSakcIahmuf4GQxpUdjJQ/ajT1MZ268CNmceKzGUtfUqyAYkogsyBg+jJOYleSNyC +IJQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=netrider.rowland.org); spf=pass (google.com: domain of linux-kernel+bounces-91099-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91099-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id f11-20020a63f10b000000b005d8b6fe2b5dsi8684424pgi.569.2024.03.04.10.30.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 10:30:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-91099-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=netrider.rowland.org); spf=pass (google.com: domain of linux-kernel+bounces-91099-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91099-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1CBA4281B9F for ; Mon, 4 Mar 2024 18:30:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 384596341C; Mon, 4 Mar 2024 18:30:39 +0000 (UTC) Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by smtp.subspace.kernel.org (Postfix) with SMTP id C8034629FE for ; Mon, 4 Mar 2024 18:30:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.131.102.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709577038; cv=none; b=DfW9t08CwGJVFiXL8w83fAj+rkkBeumzYWyjGbjjTX+Zhk9wi6dlL2Pj3t63MgsvLus6BLNg4m8PT8mQHEELZZ98OPFNiBiB/owgTg8IH12gNA+smFENUtGwIyi0triD/RQ16kkDtv+LmVAlFniD2QDgZxrBLp7WGIn0ep31LRQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709577038; c=relaxed/simple; bh=l327Ek1rRgFTLb2cxfeLPD9z9HIgRjSnb72Lw1JuUNY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Jp2wbCtPUw06FnCC+JKIYC58CDl4/6E9ThtuLUF1hWWSu6ui0O3MWpaAjx0NJSPvmUEzuvmcDzMgAgfD6AhppXIDhGf0oN+Yrq26I4gYNAZQVPTwXXaLokDVYW/zuWZg7lhINW5WW+H618dcTWK+YD2cZ7ky8Dx8TJY96mWlMYM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=rowland.harvard.edu; spf=pass smtp.mailfrom=netrider.rowland.org; arc=none smtp.client-ip=192.131.102.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=rowland.harvard.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=netrider.rowland.org Received: (qmail 130228 invoked by uid 1000); 4 Mar 2024 13:30:35 -0500 Date: Mon, 4 Mar 2024 13:30:35 -0500 From: Alan Stern To: Greg KH Cc: Sam Sun , Tejun Heo , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, "xrivendell7@gmail.com" , hgajjar@de.adit-jv.com, quic_ugoswami@quicinc.com, stanley_chang@realtek.com, heikki.krogerus@linux.intel.com Subject: Re: [Bug] INFO: task hung in hub_activate Message-ID: <416a8311-c725-419a-8b22-74c80207347f@rowland.harvard.edu> References: <2024030428-graph-harmful-1597@gregkh> 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: <2024030428-graph-harmful-1597@gregkh> On Mon, Mar 04, 2024 at 05:36:19PM +0100, Greg KH wrote: > On Mon, Mar 04, 2024 at 11:15:24AM -0500, Alan Stern wrote: > > Third, this must be a generic problem. It will occur any time a sysfs > > attribute callback tries to lock its device while another process is > > trying to unregister that device. > > > > We faced this sort of problem some years ago when we were worrying > > about "suicidal" attributes -- ones which would unregister their own > > devices. I don't remember what the fix was or how it worked. But we > > need something like it here. > > > > Greg and Tejun, any ideas? Is it possible somehow for an attribute file > > to be removed while its callback is still running? > > Yes, it's a pain, and I hate it, but I think SCSI does this somehow for > one of their attributes. I don't remember how at the moment, and I > can't look it up (am traveling), but this should be a good hint. Are you thinking of the sysfs_break_active_protection() and sysfs_unbreak_active_protection() functions? They seem to be the appropriate ones to use here. Alan Stern