From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422956AbXCGSDM (ORCPT ); Wed, 7 Mar 2007 13:03:12 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1422972AbXCGSDL (ORCPT ); Wed, 7 Mar 2007 13:03:11 -0500 Received: from smtp.osdl.org ([65.172.181.24]:46164 "EHLO smtp.osdl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422750AbXCGSDH (ORCPT ); Wed, 7 Mar 2007 13:03:07 -0500 Date: Wed, 7 Mar 2007 10:02:45 -0800 (PST) From: Linus Torvalds To: Oliver Neukum cc: Dmitry Torokhov , Hugh Dickins , Oliver Neukum , Maneesh Soni , Greg Kroah-Hartman , Adrian Bunk , linux-kernel@vger.kernel.org Subject: Re: 2.6.21-rc suspend regression: sysfs deadlock In-Reply-To: <200703071759.29522.oliver@neukum.org> Message-ID: References: <200703071759.29522.oliver@neukum.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 7 Mar 2007, Oliver Neukum wrote: > > The problem also exists with unplugging devices. Drivers get no feedback > to tell them when it is safe to free the data structures associated with > an attribute. So you just pointed to *another* data structure that apparently violates the "you MUST use refcounting" rule. What is it with you people? It's really simple. Data structures must be refcounted if you can reach them two different ways. If you don't use refcounting, then you'd better make sure that the data can be reached only one way (for example, by *not* exposing it for sysfs). It really *is* that simple. Read the CodingStyle rules. Linus