All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@steeleye.com>
To: "Randy.Dunlap" <rddunlap@osdl.org>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] aha1542: queuecommand: change panic() to return
Date: 25 Jan 2004 13:34:11 -0600	[thread overview]
Message-ID: <1075059252.3909.11.camel@mulgrave> (raw)
In-Reply-To: <20040124220006.48dd7746.rddunlap@osdl.org>

On Sun, 2004-01-25 at 00:00, Randy.Dunlap wrote:
>  		cptr = (struct chain *) SCpnt->host_scribble;
>  		if (cptr == NULL)
> -			panic("aha1542.c: unable to allocate DMA memory\n");
> +			return 1;
>  		for (i = 0; i < SCpnt->use_sg; i++) {
>  			if (sgpnt[i].length == 0 || SCpnt->use_sg > 16 ||

This is really not right.  If you look, the driver has already claimed a
cdb for the command, so it will leak scarce resources in this error
path.

Also a better return might be SCSI_MLQUEUE_HOST_BUSY, since this would
be a global resource shortage for all commands.

James



  reply	other threads:[~2004-01-25 19:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-25  6:00 [PATCH] aha1542: queuecommand: change panic() to return Randy.Dunlap
2004-01-25 19:34 ` James Bottomley [this message]
2004-01-25 20:36   ` Randy.Dunlap

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=1075059252.3909.11.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=rddunlap@osdl.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.