Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 10 Oct 2002 16:42:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 10 Oct 2002 16:42:57 -0400 Received: from ns.suse.de ([213.95.15.193]:56837 "EHLO Cantor.suse.de") by vger.kernel.org with ESMTP id ; Thu, 10 Oct 2002 16:42:56 -0400 To: Kevin Corry Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] EVMS core (3/9) discover.c References: <02101014305502.17770@boiler.suse.lists.linux.kernel> <02101014352905.17770@boiler.suse.lists.linux.kernel> From: Andi Kleen Date: 10 Oct 2002 22:48:42 +0200 In-Reply-To: Kevin Corry's message of "10 Oct 2002 22:20:58 +0200" Message-ID: X-Mailer: Gnus v5.7/Emacs 20.6 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 804 Lines: 24 Kevin Corry writes: > + list_for_each_entry(plugin, &plugin_head, headers) { > + if (GetPluginType(plugin->id) == EVMS_DEVICE_MANAGER) { > + spin_unlock(&plugin_lock); > + DISCOVER(plugin, disk_list); > + spin_lock(&plugin_lock); > + } How do you know "plugin" and its successors are still valid when retaking the spinlock? Looks like you need a reference count on the object here. Similar with other functions. > + > + if (!gd) { > + gd = alloc_disk(); > + BUG_ON(!gd); BUG_ON ? Can't this fail for legal reasons? -Andi - 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/