Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751301AbWBOVfQ (ORCPT ); Wed, 15 Feb 2006 16:35:16 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751300AbWBOVfQ (ORCPT ); Wed, 15 Feb 2006 16:35:16 -0500 Received: from accolon.hansenpartnership.com ([64.109.89.108]:15754 "EHLO accolon.hansenpartnership.com") by vger.kernel.org with ESMTP id S1751301AbWBOVfO (ORCPT ); Wed, 15 Feb 2006 16:35:14 -0500 Subject: Re: [linux-usb-devel] Re: Linux 2.6.16-rc3 From: James Bottomley To: Alan Stern Cc: Kernel development list , Greg KH In-Reply-To: References: Content-Type: text/plain Date: Wed, 15 Feb 2006 13:58:11 -0600 Message-Id: <1140033491.2883.11.camel@mulgrave.il.steeleye.com> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 (2.2.3-2.fc4) Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 921 Lines: 22 On Wed, 2006-02-15 at 11:07 -0500, Alan Stern wrote: > Could we perhaps make this safer and more general? > > For instance, add to struct device a "pending puts" counter and a list > header (both protected by a global spinlock), and have a kernel thread > periodically check the list, doing put_device wherever needed. How does > that sound? That's what I've been discussing with Jens elsewhere on this list. However, I think what you're proposing is overly complex. All we really need is for a way of flagging a kobject (or kref) so the final put will be in user context. Then we can use storage within the kobject or device (or something else) for the purpose. James - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/