Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1468422 > unrolled thread

Re: i865, drm_modeset_lock_all: BUG: unable to handle kernel NULL pointer dereference at 00000104

Started byChris Wilson <chris@chris-wilson.co.uk>
First post2016-08-23 11:20 +0200
Last post2016-08-23 12:40 +0200
Articles 4 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: i865, drm_modeset_lock_all: BUG: unable to handle kernel NULL  pointer dereference at 00000104 Chris Wilson <chris@chris-wilson.co.uk> - 2016-08-23 11:20 +0200
    Re: i865, drm_modeset_lock_all: BUG: unable to handle kernel NULL  pointer dereference at 00000104 Chris Wilson <chris@chris-wilson.co.uk> - 2016-08-23 12:20 +0200
      Re: i865, drm_modeset_lock_all: BUG: unable to handle kernel NULL  pointer dereference at 00000104 Meelis Roos <mroos@linux.ee> - 2016-08-23 12:20 +0200
    Re: i865, drm_modeset_lock_all: BUG: unable to handle kernel NULL  pointer dereference at 00000104 Meelis Roos <mroos@linux.ee> - 2016-08-23 12:40 +0200

#1468422 — Re: i865, drm_modeset_lock_all: BUG: unable to handle kernel NULL pointer dereference at 00000104

FromChris Wilson <chris@chris-wilson.co.uk>
Date2016-08-23 11:20 +0200
SubjectRe: i865, drm_modeset_lock_all: BUG: unable to handle kernel NULL pointer dereference at 00000104
Message-ID<s9g2e-1UK-13@gated-at.bofh.it>
On Tue, Aug 23, 2016 at 12:58:43PM +0300, Meelis Roos wrote:
> This on a P4 PC with 82865G chipset and onboard Intel graphics. 4.7.0 
> worked fine, current 4.8 git shows NULL pointer dereference as shown 
> below at the end of dmesg.
> 
> [   10.066261] BUG: unable to handle kernel NULL pointer dereference at 00000104
> [   10.066273] IP: [<c16054b4>] mutex_lock+0xa/0x15
> [   10.066287] *pde = 00000000 
> [   10.066295] Oops: 0002 [#1]
> [   10.066302] Modules linked in: i915(+) video i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm iTCO_wdt iTCO_vendor_support ppdev evdev snd_intel8x0 snd_ac97_codec ac97_bus psmouse snd_pcm snd_timer snd pcspkr uhci_hcd ehci_pci soundcore sr_mod ehci_hcd serio_raw i2c_i801 usbcore i2c_smbus cdrom lpc_ich mfd_core rng_core e100 mii floppy parport_pc parport acpi_cpufreq button processor usb_common eeprom lm85 hwmon_vid autofs4
> [   10.066378] CPU: 0 PID: 132 Comm: systemd-udevd Not tainted 4.8.0-rc3-00013-gef0e1ea #34
> [   10.066389] Hardware name: MicroLink                               /D865GLC                        , BIOS BF86510A.86A.0077.P25.0508040031 08/04/2005
> [   10.066401] task: f62db800 task.stack: f5970000
> [   10.066409] EIP: 0060:[<c16054b4>] EFLAGS: 00010286 CPU: 0
> [   10.066417] EIP is at mutex_lock+0xa/0x15
> [   10.066424] EAX: 00000104 EBX: 00000104 ECX: 00000000 EDX: 80000000
> [   10.066432] ESI: 00000000 EDI: 00000104 EBP: f5be8000 ESP: f5971b58
> [   10.066439]  DS: 007b ES: 007b FS: 0000 GS: 00e0 SS: 0068
> [   10.066446] CR0: 80050033 CR2: 00000104 CR3: 35945000 CR4: 000006d0
> [   10.066453] Stack:
> [   10.066459]  f503d740 f824dddf 00000000 f61170c0 f61170c0 f82371ae f850f40e 00000001
> [   10.066476]  f61170c0 f5971bcc f5be8000 f9c2d401 00000001 f8236fcc 00000001 00000000
> [   10.066491]  f5144014 f5be8104 00000008 f9c5267c 00000007 f61170c0 f5144400 f9c4ff00
> [   10.066507] Call Trace:
> [   10.066526]  [<f824dddf>] ? drm_modeset_lock_all+0x27/0xb3 [drm]
> [   10.066545]  [<f82371ae>] ? drm_encoder_cleanup+0x1a/0x132 [drm]
> [   10.066559]  [<f850f40e>] ? drm_atomic_helper_connector_reset+0x3f/0x5c [drm_kms_helper]
> [   10.066644]  [<f9c2d401>] ? intel_dvo_init+0x569/0x788 [i915]

Looks like an incorrect call to drm_encoder_cleanup() from the error
path. If we hit the error path we have never called drm_encoder_init.
Please try:

diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c
index 47bdf9dad0d3..b9e5a63a7c9e 100644
--- a/drivers/gpu/drm/i915/intel_dvo.c
+++ b/drivers/gpu/drm/i915/intel_dvo.c
@@ -554,7 +554,6 @@ void intel_dvo_init(struct drm_device *dev)
 		return;
 	}
 
-	drm_encoder_cleanup(&intel_encoder->base);
 	kfree(intel_dvo);
 	kfree(intel_connector);
 }

-- 
Chris Wilson, Intel Open Source Technology Centre

[toc] | [next] | [standalone]


#1468460

FromChris Wilson <chris@chris-wilson.co.uk>
Date2016-08-23 12:20 +0200
Message-ID<s9gYh-2wu-3@gated-at.bofh.it>
In reply to#1468422
On Tue, Aug 23, 2016 at 02:35:03PM +0300, Meelis Roos wrote:
> > Looks like an incorrect call to drm_encoder_cleanup() from the error
> > path. If we hit the error path we have never called drm_encoder_init.
> > Please try:
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c
> > index 47bdf9dad0d3..b9e5a63a7c9e 100644
> > --- a/drivers/gpu/drm/i915/intel_dvo.c
> > +++ b/drivers/gpu/drm/i915/intel_dvo.c
> > @@ -554,7 +554,6 @@ void intel_dvo_init(struct drm_device *dev)
> >  		return;
> >  	}
> >  
> > -	drm_encoder_cleanup(&intel_encoder->base);
> >  	kfree(intel_dvo);
> >  	kfree(intel_connector);
> >  }
> 
> It works - the BUG is gone.
> 
> Now I get just 
> [drm:__intel_set_cpu_fifo_underrun_reporting [i915]] *ERROR* pipe A underrun

Other than the annoying underrun, is everything else as expected? i.e.
no connected outputs? Have we lost dvo detection?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

[toc] | [prev] | [next] | [standalone]


#1468469

FromMeelis Roos <mroos@linux.ee>
Date2016-08-23 12:20 +0200
Message-ID<s9gYi-2wu-27@gated-at.bofh.it>
In reply to#1468460
> > > Looks like an incorrect call to drm_encoder_cleanup() from the error
> > > path. If we hit the error path we have never called drm_encoder_init.
> > > Please try:
> > > 
> > > diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c
> > > index 47bdf9dad0d3..b9e5a63a7c9e 100644
> > > --- a/drivers/gpu/drm/i915/intel_dvo.c
> > > +++ b/drivers/gpu/drm/i915/intel_dvo.c
> > > @@ -554,7 +554,6 @@ void intel_dvo_init(struct drm_device *dev)
> > >  		return;
> > >  	}
> > >  
> > > -	drm_encoder_cleanup(&intel_encoder->base);
> > >  	kfree(intel_dvo);
> > >  	kfree(intel_connector);
> > >  }
> > 
> > It works - the BUG is gone.
> > 
> > Now I get just 
> > [drm:__intel_set_cpu_fifo_underrun_reporting [i915]] *ERROR* pipe A underrun
> 
> Other than the annoying underrun, is everything else as expected? i.e.
> no connected outputs? Have we lost dvo detection?

Yes, as expected - there is no monitor connected.

-- 
Meelis Roos (mroos@linux.ee)

[toc] | [prev] | [next] | [standalone]


#1468473

FromMeelis Roos <mroos@linux.ee>
Date2016-08-23 12:40 +0200
Message-ID<s9gYh-2wu-5@gated-at.bofh.it>
In reply to#1468422
> Looks like an incorrect call to drm_encoder_cleanup() from the error
> path. If we hit the error path we have never called drm_encoder_init.
> Please try:
> 
> diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c
> index 47bdf9dad0d3..b9e5a63a7c9e 100644
> --- a/drivers/gpu/drm/i915/intel_dvo.c
> +++ b/drivers/gpu/drm/i915/intel_dvo.c
> @@ -554,7 +554,6 @@ void intel_dvo_init(struct drm_device *dev)
>  		return;
>  	}
>  
> -	drm_encoder_cleanup(&intel_encoder->base);
>  	kfree(intel_dvo);
>  	kfree(intel_connector);
>  }

It works - the BUG is gone.

Now I get just 
[drm:__intel_set_cpu_fifo_underrun_reporting [i915]] *ERROR* pipe A underrun

[   10.499523] agpgart-intel 0000:00:00.0: Intel 865 Chipset
[   10.499623] agpgart-intel 0000:00:00.0: detected gtt size: 131072K total, 131072K mappable
[   10.499928] agpgart-intel 0000:00:00.0: detected 16384K stolen memory
[   10.500939] [drm] Memory usable by graphics device = 128M
[   10.501029] [drm] Replacing VGA console driver
[   10.502804] Console: switching to colour dummy device 80x25
[   10.504746] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[   10.504760] [drm] Driver supports precise vblank timestamp query.
[   11.210224] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=io+mem:owns=io+mem
[   11.237197] [drm] RC6 disabled, disabling runtime PM support
[   11.237407] [drm] initialized overlay support
[   11.362560] [drm:__intel_set_cpu_fifo_underrun_reporting [i915]] *ERROR* pipe A underrun
[   11.418776] i915 0000:00:02.0: No connectors reported connected with modes
[   11.418792] [drm] Cannot find any crtc or sizes - going 1024x768
[   11.421148] fbcon: inteldrmfb (fb0) is primary device
[   11.448292] Console: switching to colour frame buffer device 128x48
[   11.458643] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device


-- 
Meelis Roos (mroos@linux.ee)

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web