lkml.org 
[lkml]   [2001]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
Subject[PATCH] Fixes for Incorrect kmalloc() Sizes (fwd)
Hi,

I was told that these patches were word-wrapped and needed resending. So
here they are.

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/

\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.726 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site