Re: [PATCH 0/1] hopefully fix null pointer dereference on i915 load

From: Mihai Moldovan
Date: Mon Aug 13 2012 - 12:15:18 EST


Had another look at the code and would like to apologize for the confusion...

* On 13.08.2012 05:27 PM, Mihai Moldovan wrote:
> Uhm, no, quite on the contrary. gmbus starts at 0 (with idx 0 being labeled
> "disabled" and idx ((GMBUS_NUM_PORTS == 6) + 1) being labeled "reserved", which
> neither should be touched).

Wrong.
struct intel_gmbus gmbus[GMBUS_NUM_PORTS];
thus starting at 0 to GMBUS_NUM_PORTS-1, no more reserved or disabled ports. I
have totally overlooked the definition, sorry.

Ignore the rest of my comments and the patch, as they are based on false
assumptions (gmbus still containing the disabled and reserved ports.)

Instead, I'd like to ACK Jani's patch. The module can now be loaded fine,
there's no null ptr dereference anymore and only some gmbus warnings show up,
though this time only one message per port, so basically it's falling back to
bit banging on all gmbus ports as it should:

[ 14.722454] i915 0000:00:02.0: setting latency timer to 64
[ 14.796032] [drm] GMBUS [i915 gmbus ssc] timed out, falling back to bit
banging on pin 1
[ 15.044039] [drm] GMBUS [i915 gmbus panel] timed out, falling back to bit
banging on pin 3
[ 15.420067] [drm] GMBUS [i915 gmbus dpd] timed out, falling back to bit
banging on pin 6
[ 15.548121] i915 0000:00:02.0: irq 55 for MSI/MSI-X
[ 15.842123] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0

Best regards,


Mihai

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature