From: Aviv Laufer <aviv.laufer@gmail.com>
To: rpurdie@rpsys.net, linux-kernel@vger.kernel.org
Subject: [PATCH] /drivers/video/backlight/tdo24m - crash on kmalloc
Date: Tue, 23 Jun 2009 16:28:36 +0300 [thread overview]
Message-ID: <87972c700906230628l69a8a08ds4d182128bbd5dbe@mail.gmail.com> (raw)
There is a crash in tdo24m module caused by a call to kmalloc with
the second parameter sizeof(flag) instead of flag.
Signed-off-by: Aviv Laufer <aviv.laufer@gmail.com>
---
--- linux-2.6.30/drivers/video/backlight/tdo24m.c.orig 2009-06-23
15:08:02.000000000 +0300
+++ linux-2.6.30/drivers/video/backlight/tdo24m.c 2009-06-23
15:09:05.000000000 +0300
@@ -356,7 +356,7 @@ static int __devinit tdo24m_probe(struct
lcd->power = FB_BLANK_POWERDOWN;
lcd->mode = MODE_VGA; /* default to VGA */
- lcd->buf = kmalloc(TDO24M_SPI_BUFF_SIZE, sizeof(GFP_KERNEL));
+ lcd->buf = kmalloc(TDO24M_SPI_BUFF_SIZE, GFP_KERNEL);
if (lcd->buf == NULL) {
kfree(lcd);
return -ENOMEM;
next reply other threads:[~2009-06-23 13:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-23 13:28 Aviv Laufer [this message]
2009-06-23 19:53 ` Richard Purdie
2009-06-29 7:18 ` Eric Miao
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=87972c700906230628l69a8a08ds4d182128bbd5dbe@mail.gmail.com \
--to=aviv.laufer@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rpurdie@rpsys.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®