All of lore.kernel.org
 help / color / mirror / Atom feed
From: Timmy Yee <shoujun@masterofpi.org>
To: kernel-janitors@vger.kernel.org
Subject: [Kernel-janitors] [PATCH] change kmalloc() auditing in aha1542.c
Date: Wed, 21 Jan 2004 03:32:14 +0000	[thread overview]
Message-ID: <20040121033214.GA1414@masterofpi.org> (raw)

Hi,

The aha1542 driver calls panic() if kmalloc() fails, which it shouldn't
do. This patch changes that by having the code return a nonzero value, so
it tells the SCSI mid-layer to retry the command, as suggested by Randy.

--- linux-2.6.1/drivers/scsi/aha1542.c	2003-08-09 18:19:18.000000000 -0700
+++ linux-2.6.1-mpi/drivers/scsi/aha1542.c	2004-01-20 19:12:07.000000000 -0800
@@ -708,7 +708,7 @@
 		sgpnt = (struct scatterlist *) SCpnt->request_buffer;
 		cptr = (struct chain *) SCpnt->host_scribble;
 		if (cptr = NULL)
-			panic("aha1542.c: unable to allocate DMA memory\n");
+			return -ENOMEM;
 		for (i = 0; i < SCpnt->use_sg; i++) {
 			if (sgpnt[i].length = 0 || SCpnt->use_sg > 16 ||
 			    (((int) sgpnt[i].offset) & 1) || (sgpnt[i].length & 1)) {
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

             reply	other threads:[~2004-01-21  3:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-21  3:32 Timmy Yee [this message]
2004-01-21  4:28 ` [Kernel-janitors] [PATCH] change kmalloc() auditing in aha1542.c rddunlap
2004-01-21 19:49 ` 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=20040121033214.GA1414@masterofpi.org \
    --to=shoujun@masterofpi.org \
    --cc=kernel-janitors@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.