All of lore.kernel.org
 help / color / mirror / Atom feed
From: David <david@blue-labs.org>
To: david chan <cat@waulogy.stanford.edu>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	emu10k1-devel@opensource.creative.com,
	Ed Okerson <eokerson@quicknet.net>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fixes for Incorrect kmalloc() Sizes
Date: Wed, 09 May 2001 13:19:43 -0700	[thread overview]
Message-ID: <3AF9A65F.4050208@blue-labs.org> (raw)
In-Reply-To: <Pine.LNX.4.30.0105082303170.23207-100000@waulogy.stanford.edu>

The kernel ixj.c and associated files are severely out of date and cause 
hard machine hangs when used (kernel 2.4.n).  I suggest that the files 
in the telephony directory be brought up to date with the current CVS 
code.  At least the CVS code only causes an OOPS and doesn't kill the 
whole machine.

David

david chan wrote:

>Hi,
>
>These two patches fix silly kmalloc errors that allocate too little space.
>
>
>Thank you,
>David Chan
>
>
>---snip---
>--- drivers/sound/emu10k1/midi.c.orig	Fri Feb  9 11:30:23 2001
>+++ drivers/sound/emu10k1/midi.c	Tue May  8 19:43:43 2001
>@@ -56,7 +56,7 @@
> {
> 	struct midi_hdr *midihdr;
>
>-	if ((midihdr = (struct midi_hdr *) kmalloc(sizeof(struct midi_hdr
>*), GFP_KERNEL)) == NULL) {
>+	if ((midihdr = (struct midi_hdr *) kmalloc(sizeof(struct
>midi_hdr), GFP_KERNEL)) == NULL) {
> 		ERROR();
> 		return -EINVAL;
> 	}
>@@ -328,7 +328,7 @@
> 	if (!access_ok(VERIFY_READ, buffer, count))
> 		return -EFAULT;
>
>-	if ((midihdr = (struct midi_hdr *) kmalloc(sizeof(struct midi_hdr
>*), GFP_KERNEL)) == NULL)
>+	if ((midihdr = (struct midi_hdr *) kmalloc(sizeof(struct
>midi_hdr), GFP_KERNEL)) == NULL)
> 		return -EINVAL;
>
> 	midihdr->bufferlength = count;
>---snip---
>
>---snip---
>--- drivers/telephony/ixj.c.orig	Tue May  8 20:00:07 2001
>+++ drivers/telephony/ixj.c	Tue May  8 20:00:25 2001
>@@ -4475,7 +4475,7 @@
> {
> 	IXJ_FILTER_CADENCE *lcp;
>
>-	lcp = kmalloc(sizeof(IXJ_CADENCE), GFP_KERNEL);
>+	lcp = kmalloc(sizeof(IXJ_FILTER_CADENCE), GFP_KERNEL);
> 	if (lcp == NULL)
> 		return -ENOMEM;
> 	if (copy_from_user(lcp, (char *) cp, sizeof(IXJ_FILTER_CADENCE)))
>---snip---
>
>
>
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at  http://www.tux.org/lkml/
>



  reply	other threads:[~2001-05-09 20:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-09  6:24 [PATCH] Fixes for Incorrect kmalloc() Sizes david chan
2001-05-09 20:19 ` David [this message]
2001-05-09 20:57   ` Alan Cox

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=3AF9A65F.4050208@blue-labs.org \
    --to=david@blue-labs.org \
    --cc=cat@waulogy.stanford.edu \
    --cc=emu10k1-devel@opensource.creative.com \
    --cc=eokerson@quicknet.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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.