All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Mark Salyzyn <Mark_Salyzyn@adaptec.com>
Cc: James.Bottomley@HansenPartnership.com, alan@lxorguk.ukuu.org.uk,
	linux-scsi@vger.kernel.org
Subject: Re: + aacraid-fix-unchecked-down_interruptible.patch added to -mm tree
Date: Thu, 10 Apr 2008 14:29:29 -0700	[thread overview]
Message-ID: <20080410142929.3be73136.akpm@linux-foundation.org> (raw)
In-Reply-To: <18656C81-9F7B-47D8-B02C-9E7667349500@adaptec.com>

On Thu, 10 Apr 2008 17:19:23 -0400
Mark Salyzyn <Mark_Salyzyn@adaptec.com> wrote:

> Until the epiphany that solves this problem or someone straightens me  
> out on the proper usage, I suggest a STRONG comment be added: /*  
> BADCODE DO NOT COPY */ :-)

There must be _some_ way of handling it which vaguely reflects what the
code is actually trying to do.

I assume that what you're saying is that *fibptr is about to be freed (or
reinitialised) whether or not the down_interruptible() succeeded.

If it gets freed with the lock held, CONFIG_DEBUG_LOCK_ALLOC could (should)
generate a runtime warning.

Even something like

	/*
	 * lavish comment goes here
	 */
	if (down_interruptible(&fibptr->event_wait) == 0)
		up(&fibptr->event_wait);

would fix the compile-time and runtime warnings.

  reply	other threads:[~2008-04-10 21:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-10 20:26 + aacraid-fix-unchecked-down_interruptible.patch added to -mm tree akpm
2008-04-10 20:54 ` James Bottomley
2008-04-10 21:19   ` Mark Salyzyn
2008-04-10 21:29     ` Andrew Morton [this message]
2008-04-10 21:44       ` Mark Salyzyn
2008-04-10 21:57         ` James Bottomley
2008-04-14 18:20           ` Mark Salyzyn
  -- strict thread matches above, loose matches on Subject: below --
2008-04-14 23:41 akpm

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=20080410142929.3be73136.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=Mark_Salyzyn@adaptec.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-scsi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.