From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932279AbXCGP4Z (ORCPT ); Wed, 7 Mar 2007 10:56:25 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932253AbXCGP4Z (ORCPT ); Wed, 7 Mar 2007 10:56:25 -0500 Received: from nz-out-0506.google.com ([64.233.162.232]:48196 "EHLO nz-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932279AbXCGP4Y (ORCPT ); Wed, 7 Mar 2007 10:56:24 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=U9KLA2SUacxQ0hDwnL2ymaOQA4bjPZIRsZcsIru0A6cBIqQxQqPl5aKNLctXBYOaIO1fK+QA//XajVjhmYSyyT0dRCzPBtWP5gHq3N+m8uV/uHtXy7hOthGMIlE+tnYz2BX38QBcmZA1rAOw6oG0Hd1BBDRuMj3r6Aitd8IGEaU= Message-ID: Date: Wed, 7 Mar 2007 10:56:22 -0500 From: "Dmitry Torokhov" To: "Linus Torvalds" Subject: Re: 2.6.21-rc suspend regression: sysfs deadlock Cc: "Hugh Dickins" , "Oliver Neukum" , "Maneesh Soni" , "Greg Kroah-Hartman" , "Adrian Bunk" , linux-kernel@vger.kernel.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On 3/6/07, Linus Torvalds wrote: > > - removing the buffer is now just > > mutex_lock(&inode->i_mutex); > buffer = inode->i_private; > inode->i_private = NULL; > mutex_unlock(&inode->i_mutex); > > put_sysfs_buffer(buffer); > > - everybody is happy! > ... with the exception that it will again make data associated with sysfs attributes accessible past the point of returning from sysfs_remove_file. And that was the point so drivers would not have to care about handling access to extra data (such as static strings) past the driver unload. I wonder if we should keep Oliver's change and require attribute implementations to offload "delete me" kind of actions to workqueues. -- Dmitry