From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: dri-devel@lists.freedesktop.org, keithp@keithp.com
Subject: Unchecked memory allocations in Intel driver
Date: Mon, 4 Jul 2011 13:27:51 +0100 [thread overview]
Message-ID: <20110704132751.4eaf5489@lxorguk.ukuu.org.uk> (raw)
Found this going over intel_bios.c and cross comparing it with the
Intel/IMG driver intel_bios.c
temp_mode = kzalloc(sizeof(*temp_mode), GFP_KERNEL);
temp_downclock = panel_fixed_mode->clock;
/*
* enumerate the LVDS panel timing info entry in VBT to check
whether
* the LVDS downclock is found.
*/
for (i = 0; i < 16; i++) {
entry = (struct bdb_lvds_lfp_data_entry *)
((uint8_t *)lvds_lfp_data->data + (lfp_data_size
* i)); dvo_timing = (struct lvds_dvo_timing *)
((unsigned char *)entry + dvo_timing_offset);
fill_detail_timing_data(temp_mode, dvo_timing);
The one for IMG devices (GMA500 etc) has an additional unchecked kmalloc
which the i915 driver has fixed.
next reply other threads:[~2011-07-04 12:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-04 12:27 Alan Cox [this message]
2011-07-04 18:18 ` Unchecked memory allocations in Intel driver Keith Packard
2011-07-04 19:55 ` Alan Cox
2011-07-05 8:55 ` [PATCH] drm/i915/bios: Avoid temporary allocation whilst searching for downclock Chris Wilson
2011-07-13 18:13 ` Keith Packard
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=20110704132751.4eaf5489@lxorguk.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=dri-devel@lists.freedesktop.org \
--cc=keithp@keithp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox