Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756374Ab0KKMXq (ORCPT ); Thu, 11 Nov 2010 07:23:46 -0500 Received: from kroah.org ([198.145.64.141]:53041 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756222Ab0KKMXp (ORCPT ); Thu, 11 Nov 2010 07:23:45 -0500 Date: Thu, 11 Nov 2010 04:04:53 -0800 From: Greg KH To: Boaz Harrosh Cc: Vladislav Bolkhovitin , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, scst-devel , James Bottomley , Andrew Morton , FUJITA Tomonori , Mike Christie , Vu Pham , Bart Van Assche , James Smart , Joe Eykholt , Andy Yan , Chetan Loke , Dmitry Torokhov , Hannes Reinecke , Richard Sharpe , Daniel Henrique Debonzi Subject: Re: [PATCH 8/19]: SCST SYSFS interface implementation Message-ID: <20101111120453.GA672@kroah.com> References: <4CC1CA4D.1090609@vlnb.net> <20101022175624.GA13640@kroah.com> <4CC1DAA2.7030602@vlnb.net> <20101022185437.GA9103@kroah.com> <4CD8566D.1020202@vlnb.net> <20101109002829.GA22633@kroah.com> <4CD9A9B8.70708@vlnb.net> <4CDA6CD4.3010308@panasas.com> <4CDAFE6E.7050200@vlnb.net> <4CDBBE80.40908@panasas.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4CDBBE80.40908@panasas.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 634 Lines: 22 On Thu, Nov 11, 2010 at 11:59:28AM +0200, Boaz Harrosh wrote: > 4. Exactly Like 3 but without the extra kref member > Only x_put() changes and x_kref_release() now receives > an x_object > > int x_put(struct object_x *x) > { > if (kobject_put(&x->kobj) == 1) > // Like above [3] x_kref_release() > x_kref_release(x); > } This is racy, please never do this. thanks, greg k-h -- 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/