All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rddunlap@osdl.org>
To: kernel-janitors@vger.kernel.org
Subject: Re: [Kernel-janitors] [PATCH] drivers/ide/ide-tape.c - handle
Date: Mon, 26 Jan 2004 22:34:59 +0000	[thread overview]
Message-ID: <20040126143459.2fdb4724.rddunlap@osdl.org> (raw)
In-Reply-To: <20040122040839.GA2456@eugeneteo.net>

On Thu, 22 Jan 2004 12:08:39 +0800 Eugene Teo <eugene.teo@eugeneteo.net> wrote:

| I have not compile nor test this patch. stage has to be checked for
| null. No trailing spaces too :) 
| 
| 2902: static idetape_stage_t *__idetape_kmalloc_stage (..........)
| [...]
| 2909:         if ((stage = (idetape_stage_t *) kmalloc (sizeof \
| (idetape_stage_t),GFP_KERNEL)) = NULL)
| 2910:                 return NULL;
| 
| diff -Naur -X /home/amnesia/w/dontdiff 2.6.2-rc1-orig/drivers/ide/ide-tape.c 2.6.2-rc1-fix/drivers/ide/ide-tape.c
| --- 2.6.2-rc1-orig/drivers/ide/ide-tape.c	2004-01-22 02:19:18.000000000 +0800
| +++ 2.6.2-rc1-fix/drivers/ide/ide-tape.c	2004-01-22 12:01:56.000000000 +0800
| @@ -3619,6 +3619,8 @@
|  	printk(KERN_INFO "ide-tape: %s: reading back %d frames from the drive's internal buffer\n", tape->name, frames);
|  	for (i = 0; i < frames; i++) {
|  		stage = __idetape_kmalloc_stage(tape, 0, 0);
| +		if (!stage)
| +			return;
|  		if (!first)
|  			first = stage;
|  		aux = stage->aux;
| 

so... what makes it OK for void function "idetape_onstream_read_back_buffer"
to just return at this point?  It can't (or doesn't) return an error
AFAICT, but the calling function expected certain work to be done...

I guess that it could panic(), although I hate adding panics.

--
~Randy
kernel-janitors project:  http://janitor.kernelnewbies.org/
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

  reply	other threads:[~2004-01-26 22:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-22  4:08 [Kernel-janitors] [PATCH] drivers/ide/ide-tape.c - handle kmalloc Eugene Teo
2004-01-26 22:34 ` Randy.Dunlap [this message]
2004-01-27  1:04 ` Eugene Teo
2004-01-27  4:10 ` [Kernel-janitors] [PATCH] drivers/ide/ide-tape.c - handle 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=20040126143459.2fdb4724.rddunlap@osdl.org \
    --to=rddunlap@osdl.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.