public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Kevin Corry <corryk@us.ibm.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] EVMS core (3/9) discover.c
Date: 10 Oct 2002 22:48:42 +0200	[thread overview]
Message-ID: <p73n0pmow9h.fsf@oldwotan.suse.de> (raw)
In-Reply-To: Kevin Corry's message of "10 Oct 2002 22:20:58 +0200"

Kevin Corry <corryk@us.ibm.com> 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

       reply	other threads:[~2002-10-10 20:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <02101014305502.17770@boiler.suse.lists.linux.kernel>
     [not found] ` <02101014352905.17770@boiler.suse.lists.linux.kernel>
2002-10-10 20:48   ` Andi Kleen [this message]
2002-10-10 21:15     ` [PATCH] EVMS core (3/9) discover.c Kevin Corry
2002-10-10 22:53 Mark Peloquin
  -- strict thread matches above, loose matches on Subject: below --
2002-10-10 22:05 Mark Peloquin
2002-10-10 22:19 ` Andi Kleen
2002-10-10 19:30 [PATCH] EVMS core (0/9) Kevin Corry
2002-10-10 19:35 ` [PATCH] EVMS core (3/9) discover.c Kevin Corry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=p73n0pmow9h.fsf@oldwotan.suse.de \
    --to=ak@suse.de \
    --cc=corryk@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox