From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161360AbXCIAli (ORCPT ); Thu, 8 Mar 2007 19:41:38 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1161361AbXCIAli (ORCPT ); Thu, 8 Mar 2007 19:41:38 -0500 Received: from mo-p07-ob.rzone.de ([81.169.146.189]:38826 "EHLO mo-p07-ob.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161360AbXCIAlh convert rfc822-to-8bit (ORCPT ); Thu, 8 Mar 2007 19:41:37 -0500 From: Oliver Neukum To: Dmitry Torokhov , Maneesh Soni , gregkh@suse.de, linux-kernel@vger.kernel.org, Alan Stern Subject: Fwd: Re: 2.6.21-rc suspend regression: sysfs deadlock Date: Fri, 9 Mar 2007 01:41:10 +0100 User-Agent: KMail/1.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT Content-Disposition: inline Message-Id: <200703090141.11044.oliver@neukum.org> X-RZG-AUTH: kN+qSWxTQH+Xqix8Cni7tCsVYhPCm1GPE5pUNaoG1wTinqjVVl1GKJZKNFH/1RwARfh8 X-RZG-CLASS-ID: mo07 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org To let you hear the verdict. Regards Oliver ---------- Weitergeleitete Nachricht ---------- Subject: Re: 2.6.21-rc suspend regression: sysfs deadlock Date: Mittwoch, 7. März 2007 19:02 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 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 -------------------------------------------------------