Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/dist/drm/i915 Avoid NULL dev_priv->vlv...



details:   https://anonhg.NetBSD.org/src/rev/aaac3a4f2cce
branches:  trunk
changeset: 339519:aaac3a4f2cce
user:      abs <abs%NetBSD.org@localhost>
date:      Sun Jul 26 15:30:36 2015 +0000

description:
Avoid NULL dev_priv->vlv_pctx-> deref in a WARN check on Lenovo B50-30,
add an additional check for the NULL dev_priv->vlv_pctx.
System now boots (though does not recognise any of the USB(3) ports)
pullup#7

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/intel_pm.c |  2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diffs (12 lines):

diff -r 06f1d200a382 -r aaac3a4f2cce sys/external/bsd/drm2/dist/drm/i915/intel_pm.c
--- a/sys/external/bsd/drm2/dist/drm/i915/intel_pm.c    Sun Jul 26 15:15:31 2015 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/intel_pm.c    Sun Jul 26 15:30:36 2015 +0000
@@ -3625,6 +3625,8 @@
 {
        unsigned long pctx_addr = I915_READ(VLV_PCBR) & ~4095;
 
+       if (WARN_ON(!dev_priv->vlv_pctx))
+               return;
        WARN_ON(pctx_addr != dev_priv->mm.stolen_base +
                             dev_priv->vlv_pctx->stolen->start);
 }



Home | Main Index | Thread Index | Old Index