Unchecked memory allocations in Intel driver
Alan Cox
alan at lxorguk.ukuu.org.uk
Mon Jul 4 05:27:51 PDT 2011
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.
More information about the dri-devel
mailing list