linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Toralf Förster" <toralf.foerster@gmx.de>
To: Hillf Danton <hdanton@sina.com>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: kernel 5.5.4: BUG: kernel NULL pointer dereference, address: 000000000000000
Date: Sun, 16 Feb 2020 22:17:59 +0100	[thread overview]
Message-ID: <9543d83b-055c-cd84-6a68-f3d72e3dbecb@gmx.de> (raw)
In-Reply-To: <20200216145518.9728-1-hdanton@sina.com>

On 2/16/20 3:55 PM, Hillf Danton wrote:
> 
> On Sun, 16 Feb 2020 11:33:02 +0100 Toralf Foerster wrote:
>> On 2/16/20 4:26 AM, Hillf Danton wrote:
>>> Looks like a stray lock counts for the above NULL dereference.
>>>
>> Hi, the patch applied on top of 5.5.4 breaks the internal display now even
>>  in the boot phase.
> 
> My bad.
> 
> Then try to do fence signaling before taking request's lock as we'll
> take the fence specific lock if we're in the right direction.
> 
> --- a/drivers/gpu/drm/i915/i915_request.c
> +++ b/drivers/gpu/drm/i915/i915_request.c
> @@ -252,10 +252,10 @@ bool i915_request_retire(struct i915_req
>  	 */
>  	remove_from_engine(rq);
>  
> +	dma_fence_signal(&rq->fence);
> +
>  	spin_lock_irq(&rq->lock);
>  	i915_request_mark_complete(rq);
> -	if (!i915_request_signaled(rq))
> -		dma_fence_signal_locked(&rq->fence);
>  	if (test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT, &rq->fence.flags))
>  		i915_request_cancel_breadcrumb(rq);
>  	if (i915_request_has_waitboost(rq)) {
> 

This is similar to the behaviour before, the BUG occurres after few minutes/hours.
It brought now:


Feb 16 22:09:01 t44 CROND[8918]: (root) CMD (/usr/lib/sa/sa1 30 2 -S XALL)
Feb 16 22:10:01 t44 CROND[8980]: (root) CMD (/usr/lib/sa/sa1 30 2 -S XALL)
Feb 16 22:10:37 t44 kernel: BUG: kernel NULL pointer dereference, address: 0000000000000000
Feb 16 22:10:37 t44 kernel: #PF: supervisor instruction fetch in kernel mode
Feb 16 22:10:37 t44 kernel: #PF: error_code(0x0010) - not-present page
Feb 16 22:10:37 t44 kernel: PGD 0 P4D 0 
Feb 16 22:10:37 t44 kernel: Oops: 0010 [#1] SMP PTI
Feb 16 22:10:37 t44 kernel: CPU: 1 PID: 3403 Comm: X Tainted: G                T 5.5.4 #3
Feb 16 22:10:37 t44 kernel: Hardware name: LENOVO 20AQCTO1WW/20AQCTO1WW, BIOS GJET92WW (2.42 ) 03/03/2017
Feb 16 22:10:37 t44 kernel: RIP: 0010:0x0
Feb 16 22:10:37 t44 kernel: Code: Bad RIP value.
Feb 16 22:10:37 t44 kernel: RSP: 0018:ffffad37009eba20 EFLAGS: 00010087
Feb 16 22:10:37 t44 kernel: RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00000000000e68b0
Feb 16 22:10:37 t44 kernel: RDX: 0000000000000000 RSI: ffff8b35598cba88 RDI: ffff8b362d9146c0
Feb 16 22:10:37 t44 kernel: RBP: ffff8b362d9146c0 R08: 0000000000000000 R09: ffff8b35598cbe00
Feb 16 22:10:37 t44 kernel: R10: 0000000000000002 R11: 0000000000000005 R12: ffffad37009eba28
Feb 16 22:10:37 t44 kernel: R13: 0000000000000000 R14: ffff8b36a40fa200 R15: ffff8b369bf99600
Feb 16 22:10:37 t44 kernel: FS:  00007f2b751398c0(0000) GS:ffff8b36b2680000(0000) knlGS:0000000000000000
Feb 16 22:10:37 t44 kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Feb 16 22:10:37 t44 kernel: CR2: ffffffffffffffd6 CR3: 0000000323292001 CR4: 00000000001606e0
Feb 16 22:10:37 t44 kernel: Call Trace:
Feb 16 22:10:37 t44 kernel:  dma_fence_signal_locked+0x85/0xc0
Feb 16 22:10:37 t44 kernel:  dma_fence_signal+0x1f/0x40
Feb 16 22:10:37 t44 kernel:  i915_request_retire+0x9a/0x290 [i915]
Feb 16 22:10:37 t44 kernel:  i915_request_create+0x3f/0xc0 [i915]
Feb 16 22:10:37 t44 kernel:  i915_gem_do_execbuffer+0x973/0x17d0 [i915]
Feb 16 22:10:37 t44 kernel:  i915_gem_execbuffer2_ioctl+0xe9/0x3a0 [i915]
Feb 16 22:10:37 t44 kernel:  ? i915_gem_execbuffer_ioctl+0x2c0/0x2c0 [i915]
Feb 16 22:10:37 t44 kernel:  drm_ioctl_kernel+0xae/0x100 [drm]
Feb 16 22:10:37 t44 kernel:  drm_ioctl+0x223/0x400 [drm]
Feb 16 22:10:37 t44 kernel:  ? i915_gem_execbuffer_ioctl+0x2c0/0x2c0 [i915]
Feb 16 22:10:37 t44 kernel:  do_vfs_ioctl+0x4d4/0x760
Feb 16 22:10:37 t44 kernel:  ksys_ioctl+0x5b/0x90
Feb 16 22:10:37 t44 kernel:  __x64_sys_ioctl+0x15/0x20
Feb 16 22:10:37 t44 kernel:  do_syscall_64+0x46/0x100
Feb 16 22:10:37 t44 kernel:  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Feb 16 22:10:37 t44 kernel: RIP: 0033:0x7f2b75372137
Feb 16 22:10:37 t44 kernel: Code: 00 00 00 75 0c 48 c7 c0 ff ff ff ff 48 83 c4 18 c3 e8 2d d4 01 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 19 ed 0c 00 f7 d8 64 89 01 48
Feb 16 22:10:37 t44 kernel: RSP: 002b:00007ffebe2b4c38 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
Feb 16 22:10:37 t44 kernel: RAX: ffffffffffffffda RBX: 00007ffebe2b4c80 RCX: 00007f2b75372137
Feb 16 22:10:37 t44 kernel: RDX: 00007ffebe2b4c80 RSI: 0000000040406469 RDI: 000000000000000d
Feb 16 22:10:37 t44 kernel: RBP: 0000000040406469 R08: 0000561477eb8670 R09: 0000000000000202
Feb 16 22:10:37 t44 kernel: R10: 0000000000000000 R11: 0000000000000246 R12: 0000561477e7b0b0
Feb 16 22:10:37 t44 kernel: R13: 000000000000000d R14: 00007f2b74b51c48 R15: 0000000000000000
Feb 16 22:10:37 t44 kernel: Modules linked in: af_packet bridge stp llc ip6table_filter ip6_tables xt_MASQUERADE iptable_nat nf_nat nf_log_ipv4 nf_log_common xt_LOG xt_limit xt_recent xt_conntrack nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 iptable_filter ip_tables uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videodev videobuf2_common btusb btrtl btbcm btintel bluetooth ecdh_generic ecc rmi_smbus rmi_core mousedev x86_pkg_temp_thermal coretemp kvm_intel kvm i915 irqbypass intel_gtt i2c_algo_bit drm_kms_helper cfbfillrect syscopyarea input_leds snd_hda_codec_realtek snd_hda_codec_generic cfbimgblt sysfillrect sysimgblt fb_sys_fops cfbcopyarea wmi_bmof snd_hda_intel snd_intel_dspcfg drm snd_hda_codec tpm_tis psmouse aesni_intel snd_hda_core glue_helper crypto_simd iwlmvm cryptd snd_pcm thinkpad_acpi ledtrig_audio tpm_tis_core iwlwifi pcspkr drm_panel_orientation_quirks ehci_pci atkbd e1000e i2c_i801 ehci_hcd tpm thermal snd_timer ac snd soundcore battery rng_core agpgart i2c_core wmi evdev
Feb 16 22:10:37 t44 kernel: CR2: 0000000000000000
Feb 16 22:10:37 t44 kernel: ---[ end trace 7df1d4246cb74d36 ]---
Feb 16 22:10:37 t44 kernel: RIP: 0010:0x0
Feb 16 22:10:37 t44 kernel: Code: Bad RIP value.
Feb 16 22:10:37 t44 kernel: RSP: 0018:ffffad37009eba20 EFLAGS: 00010087
Feb 16 22:10:37 t44 kernel: RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00000000000e68b0
Feb 16 22:10:37 t44 kernel: RDX: 0000000000000000 RSI: ffff8b35598cba88 RDI: ffff8b362d9146c0
Feb 16 22:10:37 t44 kernel: RBP: ffff8b362d9146c0 R08: 0000000000000000 R09: ffff8b35598cbe00
Feb 16 22:10:37 t44 kernel: R10: 0000000000000002 R11: 0000000000000005 R12: ffffad37009eba28
Feb 16 22:10:37 t44 kernel: R13: 0000000000000000 R14: ffff8b36a40fa200 R15: ffff8b369bf99600
Feb 16 22:10:37 t44 kernel: FS:  00007f2b751398c0(0000) GS:ffff8b36b2680000(0000) knlGS:0000000000000000
Feb 16 22:10:37 t44 kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Feb 16 22:10:37 t44 kernel: CR2: ffffffffffffffd6 CR3: 0000000323292001 CR4: 00000000001606e0
Feb 16 22:11:01 t44 CROND[8996]: (root) CMD (/usr/lib/sa/sa1 30 2 -S XALL)
Feb 16 22:12:49 t44 syslog-ng[1912]: syslog-ng starting up; version='3.22.1'
Feb 16 22:12:49 t44 acpid[1943]: starting up with netlink and the input layer




-- 
Toralf

  parent reply	other threads:[~2020-02-16 21:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200216032625.11452-1-hdanton@sina.com>
2020-02-16 10:33 ` kernel 5.5.4: BUG: kernel NULL pointer dereference, address: 000000000000000 Toralf Förster
     [not found] ` <20200216145518.9728-1-hdanton@sina.com>
2020-02-16 21:17   ` Toralf Förster [this message]
     [not found]   ` <20200217023013.5696-1-hdanton@sina.com>
2020-02-18 18:10     ` [Intel-gfx] " Chris Wilson
2020-02-15 16:20 Toralf Förster

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=9543d83b-055c-cd84-6a68-f3d72e3dbecb@gmx.de \
    --to=toralf.foerster@gmx.de \
    --cc=hdanton@sina.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).