Re: [Intel-gfx] Linux 4.16 Kernel Boot Crash

2018-04-05 Thread Hans Verkuil
On 05/04/18 11:57, Mauro Carvalho Chehab wrote:
> Em Wed, 4 Apr 2018 16:26:22 +0300
> Jaak Ristioja  escreveu:
> 
>> Hello, all!
>>
>> I experience the same issue with a Lenovo ThinkPad T440p (LENOVO
>> 20AN006VMS/20AN006VMS, BIOS GLET90WW (2.44 ) 09/13/2017). I tried to
>> bisect v4.15..v4.16 but failed.
>>
>> Best regards,
>> J
> 
> The real problem here is that the bit array is too short.
> There's an additional problem at the WARN_ON() check, with lets
> the code to do something that won't work.
> 
> The enclosed patch should fix both issues. Please test.
> 
> Regards,
> Mauro
> 
> [PATCH] media: v4l2-core: fix size of devnode_nums[] bitarray
> 
> The size of devnode_nums[] bit array is too short to store information
> for VFL_TYPE_TOUCH. That causes it to override other memory regions.
> 
> Thankfully, on recent reports, it is overriding video_device[] array,
> trigging a WARN_ON(). Yet, it just warns about the problem, but let
> the code excecuting, with generates an OOPS:
> 
> [   43.177394] WARNING: CPU: 1 PID: 711 at 
> drivers/media/v4l2-core/v4l2-dev.c:945 __video_register_device+0xc99/0x1090 
> [videodev]
> [   43.177396] Modules linked in: hid_sensor_custom hid_sensor_als 
> hid_sensor_incl_3d hid_sensor_rotation hid_sensor_magn_3d hid_sensor_accel_3d 
> hid_sensor_gyro_3d hid_sensor_trigger industrialio_triggered_buffer kfifo_buf 
> joydev hid_sensor_iio_common hid_rmi(+) rmi_core industrialio 
> videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev 
> hid_multitouch media hid_sensor_hub binfmt_misc nls_iso8859_1 
> snd_hda_codec_hdmi arc4 snd_soc_skl snd_soc_skl_ipc snd_hda_ext_core 
> snd_soc_sst_dsp snd_soc_sst_ipc snd_hda_codec_realtek snd_soc_acpi 
> snd_hda_codec_generic snd_soc_core snd_compress ac97_bus snd_pcm_dmaengine 
> snd_hda_intel snd_hda_codec intel_rapl snd_hda_core x86_pkg_temp_thermal 
> snd_hwdep intel_powerclamp coretemp snd_pcm kvm_intel snd_seq_midi 
> snd_seq_midi_event snd_rawmidi crct10dif_pclmul
> [   43.177426]  crc32_pclmul ghash_clmulni_intel iwlmvm pcbc mac80211 snd_seq 
> aesni_intel iwlwifi aes_x86_64 snd_seq_device crypto_simd glue_helper cryptd 
> snd_timer intel_cstate intel_rapl_perf input_leds serio_raw 
> intel_wmi_thunderbolt snd wmi_bmof cfg80211 soundcore ideapad_laptop 
> sparse_keymap idma64 virt_dma tpm_crb acpi_pad int3400_thermal 
> acpi_thermal_rel intel_pch_thermal processor_thermal_device mac_hid 
> int340x_thermal_zone mei_me intel_soc_dts_iosf mei intel_lpss_pci shpchp 
> intel_lpss sch_fq_codel vfio_pci nfsd vfio_virqfd parport_pc ppdev 
> auth_rpcgss nfs_acl lockd grace lp parport sunrpc ip_tables x_tables autofs4 
> hid_logitech_hidpp hid_logitech_dj hid_generic usbhid kvmgt vfio_mdev mdev 
> vfio_iommu_type1 vfio kvm irqbypass i915 i2c_algo_bit drm_kms_helper 
> syscopyarea sdhci_pci sysfillrect
> [   43.177466]  sysimgblt cqhci fb_sys_fops sdhci drm i2c_hid wmi hid video 
> pinctrl_sunrisepoint pinctrl_intel
> [   43.177474] CPU: 1 PID: 711 Comm: systemd-udevd Not tainted 4.16.0 #1
> [   43.177475] Hardware name: LENOVO 80UE/VIUU4, BIOS 2UCN10T 10/14/2016
> [   43.177481] RIP: 0010:__video_register_device+0xc99/0x1090 [videodev]
> [   43.177482] RSP: :a5c5c231b420 EFLAGS: 00010202
> [   43.177484] RAX:  RBX: 0005 RCX: 
> 
> [   43.177485] RDX: c0c44cc0 RSI:  RDI: 
> c0c44cc0
> [   43.177486] RBP: a5c5c231b478 R08: c0c96900 R09: 
> 8eda1a51f018
> [   43.177487] R10: 0600 R11: 03b6 R12: 
> 
> [   43.177488] R13: 0005 R14: c0c96900 R15: 
> 8eda1d6d91c0
> [   43.177489] FS:  7fd2d8ef2480() GS:8eda3348() 
> knlGS:
> [   43.177490] CS:  0010 DS:  ES:  CR0: 80050033
> [   43.177491] CR2: 7ffe0a6ad01c CR3: 000456ae2004 CR4: 
> 003606e0
> [   43.177492] Call Trace:
> [   43.177498]  ? devres_add+0x5f/0x70
> [   43.177502]  rmi_f54_probe+0x437/0x470 [rmi_core]
> [   43.177505]  rmi_function_probe+0x25/0x30 [rmi_core]
> [   43.177507]  driver_probe_device+0x310/0x480
> [   43.177509]  __device_attach_driver+0x86/0x100
> [   43.177511]  ? __driver_attach+0xf0/0xf0
> [   43.177512]  bus_for_each_drv+0x6b/0xb0
> [   43.177514]  __device_attach+0xdd/0x160
> [   43.177516]  device_initial_probe+0x13/0x20
> [   43.177518]  bus_probe_device+0x95/0xa0
> [   43.177519]  device_add+0x44b/0x680
> [   43.177522]  rmi_register_function+0x62/0xd0 [rmi_core]
> [   43.177525]  rmi_create_function+0x112/0x1a0 [rmi_core]
> [   43.177527]  ? rmi_driver_clear_irq_bits+0xc0/0xc0 [rmi_core]
> [   43.177530]  rmi_scan_pdt+0xca/0x1a0 [rmi_core]
> [   43.177535]  rmi_init_functions+0x5b/0x120 [rmi_core]
> [   43.177537]  rmi_driver_probe+0x152/0x3c0 [rmi_core]
> [   43.177547]  ? sysfs_create_link+0x25/0x40
> [   43.177549]  driver_probe_device+0x310/0x480
> [   43.177551]  

Re: [Intel-gfx] Linux 4.16 Kernel Boot Crash

2018-04-05 Thread Mauro Carvalho Chehab
Em Thu, 5 Apr 2018 06:57:13 -0300
Mauro Carvalho Chehab  escreveu:

> Em Wed, 4 Apr 2018 16:26:22 +0300
> Jaak Ristioja  escreveu:
> 
> > Hello, all!
> > 
> > I experience the same issue with a Lenovo ThinkPad T440p (LENOVO
> > 20AN006VMS/20AN006VMS, BIOS GLET90WW (2.44 ) 09/13/2017). I tried to
> > bisect v4.15..v4.16 but failed.
> > 
> > Best regards,
> > J  
> 
> The real problem here is that the bit array is too short.
> There's an additional problem at the WARN_ON() check, with lets
> the code to do something that won't work.
> 
> The enclosed patch should fix both issues. Please test.
> 
> Regards,
> Mauro

Sorry, wrong patch. The correct one is enclosed.

Regards,
Mauro

[PATCH] media: v4l2-core: fix size of devnode_nums[] bitarray

The size of devnode_nums[] bit array is too short to store information
for VFL_TYPE_TOUCH. That causes it to override other memory regions.

Thankfully, on recent reports, it is overriding video_device[] array,
trigging a WARN_ON(). Yet, it just warns about the problem, but let
the code excecuting, with generates an OOPS:

[   43.177394] WARNING: CPU: 1 PID: 711 at 
drivers/media/v4l2-core/v4l2-dev.c:945 __video_register_device+0xc99/0x1090 
[videodev]
[   43.177396] Modules linked in: hid_sensor_custom hid_sensor_als 
hid_sensor_incl_3d hid_sensor_rotation hid_sensor_magn_3d hid_sensor_accel_3d 
hid_sensor_gyro_3d hid_sensor_trigger industrialio_triggered_buffer kfifo_buf 
joydev hid_sensor_iio_common hid_rmi(+) rmi_core industrialio videobuf2_vmalloc 
videobuf2_memops videobuf2_v4l2 videobuf2_common videodev hid_multitouch media 
hid_sensor_hub binfmt_misc nls_iso8859_1 snd_hda_codec_hdmi arc4 snd_soc_skl 
snd_soc_skl_ipc snd_hda_ext_core snd_soc_sst_dsp snd_soc_sst_ipc 
snd_hda_codec_realtek snd_soc_acpi snd_hda_codec_generic snd_soc_core 
snd_compress ac97_bus snd_pcm_dmaengine snd_hda_intel snd_hda_codec intel_rapl 
snd_hda_core x86_pkg_temp_thermal snd_hwdep intel_powerclamp coretemp snd_pcm 
kvm_intel snd_seq_midi snd_seq_midi_event snd_rawmidi crct10dif_pclmul
[   43.177426]  crc32_pclmul ghash_clmulni_intel iwlmvm pcbc mac80211 snd_seq 
aesni_intel iwlwifi aes_x86_64 snd_seq_device crypto_simd glue_helper cryptd 
snd_timer intel_cstate intel_rapl_perf input_leds serio_raw 
intel_wmi_thunderbolt snd wmi_bmof cfg80211 soundcore ideapad_laptop 
sparse_keymap idma64 virt_dma tpm_crb acpi_pad int3400_thermal acpi_thermal_rel 
intel_pch_thermal processor_thermal_device mac_hid int340x_thermal_zone mei_me 
intel_soc_dts_iosf mei intel_lpss_pci shpchp intel_lpss sch_fq_codel vfio_pci 
nfsd vfio_virqfd parport_pc ppdev auth_rpcgss nfs_acl lockd grace lp parport 
sunrpc ip_tables x_tables autofs4 hid_logitech_hidpp hid_logitech_dj 
hid_generic usbhid kvmgt vfio_mdev mdev vfio_iommu_type1 vfio kvm irqbypass 
i915 i2c_algo_bit drm_kms_helper syscopyarea sdhci_pci sysfillrect
[   43.177466]  sysimgblt cqhci fb_sys_fops sdhci drm i2c_hid wmi hid video 
pinctrl_sunrisepoint pinctrl_intel
[   43.177474] CPU: 1 PID: 711 Comm: systemd-udevd Not tainted 4.16.0 #1
[   43.177475] Hardware name: LENOVO 80UE/VIUU4, BIOS 2UCN10T 10/14/2016
[   43.177481] RIP: 0010:__video_register_device+0xc99/0x1090 [videodev]
[   43.177482] RSP: :a5c5c231b420 EFLAGS: 00010202
[   43.177484] RAX:  RBX: 0005 RCX: 
[   43.177485] RDX: c0c44cc0 RSI:  RDI: c0c44cc0
[   43.177486] RBP: a5c5c231b478 R08: c0c96900 R09: 8eda1a51f018
[   43.177487] R10: 0600 R11: 03b6 R12: 
[   43.177488] R13: 0005 R14: c0c96900 R15: 8eda1d6d91c0
[   43.177489] FS:  7fd2d8ef2480() GS:8eda3348() 
knlGS:
[   43.177490] CS:  0010 DS:  ES:  CR0: 80050033
[   43.177491] CR2: 7ffe0a6ad01c CR3: 000456ae2004 CR4: 003606e0
[   43.177492] Call Trace:
[   43.177498]  ? devres_add+0x5f/0x70
[   43.177502]  rmi_f54_probe+0x437/0x470 [rmi_core]
[   43.177505]  rmi_function_probe+0x25/0x30 [rmi_core]
[   43.177507]  driver_probe_device+0x310/0x480
[   43.177509]  __device_attach_driver+0x86/0x100
[   43.177511]  ? __driver_attach+0xf0/0xf0
[   43.177512]  bus_for_each_drv+0x6b/0xb0
[   43.177514]  __device_attach+0xdd/0x160
[   43.177516]  device_initial_probe+0x13/0x20
[   43.177518]  bus_probe_device+0x95/0xa0
[   43.177519]  device_add+0x44b/0x680
[   43.177522]  rmi_register_function+0x62/0xd0 [rmi_core]
[   43.177525]  rmi_create_function+0x112/0x1a0 [rmi_core]
[   43.177527]  ? rmi_driver_clear_irq_bits+0xc0/0xc0 [rmi_core]
[   43.177530]  rmi_scan_pdt+0xca/0x1a0 [rmi_core]
[   43.177535]  rmi_init_functions+0x5b/0x120 [rmi_core]
[   43.177537]  rmi_driver_probe+0x152/0x3c0 [rmi_core]
[   43.177547]  ? sysfs_create_link+0x25/0x40
[   43.177549]  driver_probe_device+0x310/0x480
[   43.177551]  __device_attach_driver+0x86/0x100
[   43.177553]  ? __driver_attach+0xf0/0xf0

Re: [Intel-gfx] Linux 4.16 Kernel Boot Crash

2018-04-05 Thread Mauro Carvalho Chehab
Em Wed, 4 Apr 2018 16:26:22 +0300
Jaak Ristioja  escreveu:

> Hello, all!
> 
> I experience the same issue with a Lenovo ThinkPad T440p (LENOVO
> 20AN006VMS/20AN006VMS, BIOS GLET90WW (2.44 ) 09/13/2017). I tried to
> bisect v4.15..v4.16 but failed.
> 
> Best regards,
> J

The real problem here is that the bit array is too short.
There's an additional problem at the WARN_ON() check, with lets
the code to do something that won't work.

The enclosed patch should fix both issues. Please test.

Regards,
Mauro

[PATCH] media: v4l2-core: fix size of devnode_nums[] bitarray

The size of devnode_nums[] bit array is too short to store information
for VFL_TYPE_TOUCH. That causes it to override other memory regions.

Thankfully, on recent reports, it is overriding video_device[] array,
trigging a WARN_ON(). Yet, it just warns about the problem, but let
the code excecuting, with generates an OOPS:

[   43.177394] WARNING: CPU: 1 PID: 711 at 
drivers/media/v4l2-core/v4l2-dev.c:945 __video_register_device+0xc99/0x1090 
[videodev]
[   43.177396] Modules linked in: hid_sensor_custom hid_sensor_als 
hid_sensor_incl_3d hid_sensor_rotation hid_sensor_magn_3d hid_sensor_accel_3d 
hid_sensor_gyro_3d hid_sensor_trigger industrialio_triggered_buffer kfifo_buf 
joydev hid_sensor_iio_common hid_rmi(+) rmi_core industrialio videobuf2_vmalloc 
videobuf2_memops videobuf2_v4l2 videobuf2_common videodev hid_multitouch media 
hid_sensor_hub binfmt_misc nls_iso8859_1 snd_hda_codec_hdmi arc4 snd_soc_skl 
snd_soc_skl_ipc snd_hda_ext_core snd_soc_sst_dsp snd_soc_sst_ipc 
snd_hda_codec_realtek snd_soc_acpi snd_hda_codec_generic snd_soc_core 
snd_compress ac97_bus snd_pcm_dmaengine snd_hda_intel snd_hda_codec intel_rapl 
snd_hda_core x86_pkg_temp_thermal snd_hwdep intel_powerclamp coretemp snd_pcm 
kvm_intel snd_seq_midi snd_seq_midi_event snd_rawmidi crct10dif_pclmul
[   43.177426]  crc32_pclmul ghash_clmulni_intel iwlmvm pcbc mac80211 snd_seq 
aesni_intel iwlwifi aes_x86_64 snd_seq_device crypto_simd glue_helper cryptd 
snd_timer intel_cstate intel_rapl_perf input_leds serio_raw 
intel_wmi_thunderbolt snd wmi_bmof cfg80211 soundcore ideapad_laptop 
sparse_keymap idma64 virt_dma tpm_crb acpi_pad int3400_thermal acpi_thermal_rel 
intel_pch_thermal processor_thermal_device mac_hid int340x_thermal_zone mei_me 
intel_soc_dts_iosf mei intel_lpss_pci shpchp intel_lpss sch_fq_codel vfio_pci 
nfsd vfio_virqfd parport_pc ppdev auth_rpcgss nfs_acl lockd grace lp parport 
sunrpc ip_tables x_tables autofs4 hid_logitech_hidpp hid_logitech_dj 
hid_generic usbhid kvmgt vfio_mdev mdev vfio_iommu_type1 vfio kvm irqbypass 
i915 i2c_algo_bit drm_kms_helper syscopyarea sdhci_pci sysfillrect
[   43.177466]  sysimgblt cqhci fb_sys_fops sdhci drm i2c_hid wmi hid video 
pinctrl_sunrisepoint pinctrl_intel
[   43.177474] CPU: 1 PID: 711 Comm: systemd-udevd Not tainted 4.16.0 #1
[   43.177475] Hardware name: LENOVO 80UE/VIUU4, BIOS 2UCN10T 10/14/2016
[   43.177481] RIP: 0010:__video_register_device+0xc99/0x1090 [videodev]
[   43.177482] RSP: :a5c5c231b420 EFLAGS: 00010202
[   43.177484] RAX:  RBX: 0005 RCX: 
[   43.177485] RDX: c0c44cc0 RSI:  RDI: c0c44cc0
[   43.177486] RBP: a5c5c231b478 R08: c0c96900 R09: 8eda1a51f018
[   43.177487] R10: 0600 R11: 03b6 R12: 
[   43.177488] R13: 0005 R14: c0c96900 R15: 8eda1d6d91c0
[   43.177489] FS:  7fd2d8ef2480() GS:8eda3348() 
knlGS:
[   43.177490] CS:  0010 DS:  ES:  CR0: 80050033
[   43.177491] CR2: 7ffe0a6ad01c CR3: 000456ae2004 CR4: 003606e0
[   43.177492] Call Trace:
[   43.177498]  ? devres_add+0x5f/0x70
[   43.177502]  rmi_f54_probe+0x437/0x470 [rmi_core]
[   43.177505]  rmi_function_probe+0x25/0x30 [rmi_core]
[   43.177507]  driver_probe_device+0x310/0x480
[   43.177509]  __device_attach_driver+0x86/0x100
[   43.177511]  ? __driver_attach+0xf0/0xf0
[   43.177512]  bus_for_each_drv+0x6b/0xb0
[   43.177514]  __device_attach+0xdd/0x160
[   43.177516]  device_initial_probe+0x13/0x20
[   43.177518]  bus_probe_device+0x95/0xa0
[   43.177519]  device_add+0x44b/0x680
[   43.177522]  rmi_register_function+0x62/0xd0 [rmi_core]
[   43.177525]  rmi_create_function+0x112/0x1a0 [rmi_core]
[   43.177527]  ? rmi_driver_clear_irq_bits+0xc0/0xc0 [rmi_core]
[   43.177530]  rmi_scan_pdt+0xca/0x1a0 [rmi_core]
[   43.177535]  rmi_init_functions+0x5b/0x120 [rmi_core]
[   43.177537]  rmi_driver_probe+0x152/0x3c0 [rmi_core]
[   43.177547]  ? sysfs_create_link+0x25/0x40
[   43.177549]  driver_probe_device+0x310/0x480
[   43.177551]  __device_attach_driver+0x86/0x100
[   43.177553]  ? __driver_attach+0xf0/0xf0
[   43.177554]  bus_for_each_drv+0x6b/0xb0
[   43.177556]  __device_attach+0xdd/0x160
[   43.177558]  device_initial_probe+0x13/0x20
[   43.177560]  bus_probe_device+0x95/0xa0
[   43.177561]  

Re: [Intel-gfx] Linux 4.16 Kernel Boot Crash

2018-04-05 Thread Mauro Carvalho Chehab
Em Wed, 4 Apr 2018 16:26:22 +0300
Jaak Ristioja  escreveu:

> Hello, all!
> 
> I experience the same issue with a Lenovo ThinkPad T440p (LENOVO
> 20AN006VMS/20AN006VMS, BIOS GLET90WW (2.44 ) 09/13/2017). I tried to
> bisect v4.15..v4.16 but failed.

Could you post the complete dmesg? I also need the .config used
to build the Kernel.

From its call trace:

[   43.177492] Call Trace:
[   43.177498]  ? devres_add+0x5f/0x70
[   43.177502]  rmi_f54_probe+0x437/0x470 [rmi_core]
[   43.177505]  rmi_function_probe+0x25/0x30 [rmi_core]
[   43.177507]  driver_probe_device+0x310/0x480

It looks that this was generated by an input driver 
drivers/input/rmi4/rmi_f54.c, with could be doing something wrong when
registering at the media core.

From the logs, the warn on is happening at 
drivers/media/v4l2-core/v4l2-dev.c:945, e. g:

/* Should not happen since we thought this minor was free */
WARN_ON(video_device[vdev->minor] != NULL);

That was probably called here:

drivers/input/rmi4/rmi_f54.c:   ret = video_register_device(>vdev, 
VFL_TYPE_TOUCH, -1);

Thanks,
Mauro
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] Linux 4.16 Kernel Boot Crash

2018-04-04 Thread Jaak Ristioja
Hello, all!

I experience the same issue with a Lenovo ThinkPad T440p (LENOVO
20AN006VMS/20AN006VMS, BIOS GLET90WW (2.44 ) 09/13/2017). I tried to
bisect v4.15..v4.16 but failed.

Best regards,
J

On 04.04.2018 15:36, Jani Nikula wrote:
> On Tue, 03 Apr 2018, Peter Geis  wrote:
>> Good Evening,
>>
>> I have been trying to use the 4.16 kernel source since 4.16-rc3.
>> Every time it booted it crashed upon loading the video drivers.
>> Now with the 4.16 release, it is still occurring, so I felt it prudent 
>> to notify someone.
>>
>> The machine is a Lenovo Yoga 900 80UE-ISK2.
>> It has a i7-6560u CPU with Intel integrated graphics.
> 
> This doesn't seem to have anything to do with Intel graphics. Based on
> the backtraces, adding linux-media and linux-input mailing lists and
> maintainers.
> 
> BR,
> Jani.
> 
> 
>>
>> I have included the kernel log, what format should I submit the vmcore 
>> dump in?
>>
>> Thanks,
>> Peter Geis
>>
>>
>> ---Begin Log---
>>
>> [   43.177394] WARNING: CPU: 1 PID: 711 at 
>> drivers/media/v4l2-core/v4l2-dev.c:945 
>> __video_register_device+0xc99/0x1090 [videodev]
>> [   43.177396] Modules linked in: hid_sensor_custom hid_sensor_als 
>> hid_sensor_incl_3d hid_sensor_rotation hid_sensor_magn_3d 
>> hid_sensor_accel_3d hid_sensor_gyro_3d hid_sensor_trigger 
>> industrialio_triggered_buffer kfifo_buf joydev hid_sensor_iio_common 
>> hid_rmi(+) rmi_core industrialio videobuf2_vmalloc videobuf2_memops 
>> videobuf2_v4l2 videobuf2_common videodev hid_multitouch media 
>> hid_sensor_hub binfmt_misc nls_iso8859_1 snd_hda_codec_hdmi arc4 
>> snd_soc_skl snd_soc_skl_ipc snd_hda_ext_core snd_soc_sst_dsp 
>> snd_soc_sst_ipc snd_hda_codec_realtek snd_soc_acpi snd_hda_codec_generic 
>> snd_soc_core snd_compress ac97_bus snd_pcm_dmaengine snd_hda_intel 
>> snd_hda_codec intel_rapl snd_hda_core x86_pkg_temp_thermal snd_hwdep 
>> intel_powerclamp coretemp snd_pcm kvm_intel snd_seq_midi 
>> snd_seq_midi_event snd_rawmidi crct10dif_pclmul
>> [   43.177426]  crc32_pclmul ghash_clmulni_intel iwlmvm pcbc mac80211 
>> snd_seq aesni_intel iwlwifi aes_x86_64 snd_seq_device crypto_simd 
>> glue_helper cryptd snd_timer intel_cstate intel_rapl_perf input_leds 
>> serio_raw intel_wmi_thunderbolt snd wmi_bmof cfg80211 soundcore 
>> ideapad_laptop sparse_keymap idma64 virt_dma tpm_crb acpi_pad 
>> int3400_thermal acpi_thermal_rel intel_pch_thermal 
>> processor_thermal_device mac_hid int340x_thermal_zone mei_me 
>> intel_soc_dts_iosf mei intel_lpss_pci shpchp intel_lpss sch_fq_codel 
>> vfio_pci nfsd vfio_virqfd parport_pc ppdev auth_rpcgss nfs_acl lockd 
>> grace lp parport sunrpc ip_tables x_tables autofs4 hid_logitech_hidpp 
>> hid_logitech_dj hid_generic usbhid kvmgt vfio_mdev mdev vfio_iommu_type1 
>> vfio kvm irqbypass i915 i2c_algo_bit drm_kms_helper syscopyarea 
>> sdhci_pci sysfillrect
>> [   43.177466]  sysimgblt cqhci fb_sys_fops sdhci drm i2c_hid wmi hid 
>> video pinctrl_sunrisepoint pinctrl_intel
>> [   43.177474] CPU: 1 PID: 711 Comm: systemd-udevd Not tainted 4.16.0 #1
>> [   43.177475] Hardware name: LENOVO 80UE/VIUU4, BIOS 2UCN10T 10/14/2016
>> [   43.177481] RIP: 0010:__video_register_device+0xc99/0x1090 [videodev]
>> [   43.177482] RSP: :a5c5c231b420 EFLAGS: 00010202
>> [   43.177484] RAX:  RBX: 0005 RCX: 
>> 
>> [   43.177485] RDX: c0c44cc0 RSI:  RDI: 
>> c0c44cc0
>> [   43.177486] RBP: a5c5c231b478 R08: c0c96900 R09: 
>> 8eda1a51f018
>> [   43.177487] R10: 0600 R11: 03b6 R12: 
>> 
>> [   43.177488] R13: 0005 R14: c0c96900 R15: 
>> 8eda1d6d91c0
>> [   43.177489] FS:  7fd2d8ef2480() GS:8eda3348() 
>> knlGS:
>> [   43.177490] CS:  0010 DS:  ES:  CR0: 80050033
>> [   43.177491] CR2: 7ffe0a6ad01c CR3: 000456ae2004 CR4: 
>> 003606e0
>> [   43.177492] Call Trace:
>> [   43.177498]  ? devres_add+0x5f/0x70
>> [   43.177502]  rmi_f54_probe+0x437/0x470 [rmi_core]
>> [   43.177505]  rmi_function_probe+0x25/0x30 [rmi_core]
>> [   43.177507]  driver_probe_device+0x310/0x480
>> [   43.177509]  __device_attach_driver+0x86/0x100
>> [   43.177511]  ? __driver_attach+0xf0/0xf0
>> [   43.177512]  bus_for_each_drv+0x6b/0xb0
>> [   43.177514]  __device_attach+0xdd/0x160
>> [   43.177516]  device_initial_probe+0x13/0x20
>> [   43.177518]  bus_probe_device+0x95/0xa0
>> [   43.177519]  device_add+0x44b/0x680
>> [   43.177522]  rmi_register_function+0x62/0xd0 [rmi_core]
>> [   43.177525]  rmi_create_function+0x112/0x1a0 [rmi_core]
>> [   43.177527]  ? rmi_driver_clear_irq_bits+0xc0/0xc0 [rmi_core]
>> [   43.177530]  rmi_scan_pdt+0xca/0x1a0 [rmi_core]
>> [   43.177535]  rmi_init_functions+0x5b/0x120 [rmi_core]
>> [   43.177537]  rmi_driver_probe+0x152/0x3c0 [rmi_core]
>> [   43.177547]  ? sysfs_create_link+0x25/0x40
>> [   43.177549]  

Re: [Intel-gfx] Linux 4.16 Kernel Boot Crash

2018-04-04 Thread Peter Geis

Good Afternoon,

I have been digging into this issue further, and the problem is 
definitely with the media driver.
Rebuilt the kernel with media drivers compiled in vice modular and the 
kernel boots without issue.


The core dump states the crash occurred at 
drivers/media/v4l2-core/v4l2-dev.c, line 945.

This line is checking if the vdev minor is actually free.
There were some significant changes to v4l in 4.16 from 4.15.

Considering the following behavior:
A. It panics if it boots immediately.
B. If booted to recovery for a period of time (~5 mins) then resumed 
booting it boots without issue.
I believe that the module is being loaded before something it is 
dependent on has initialized, causing this issue.


Thank you Jani for pointing out my error, I shouldn't debug at night.

Very Repspectfully,
Peter Geis

On 04/04/2018 09:26 AM, Jaak Ristioja wrote:

Hello, all!

I experience the same issue with a Lenovo ThinkPad T440p (LENOVO
20AN006VMS/20AN006VMS, BIOS GLET90WW (2.44 ) 09/13/2017). I tried to
bisect v4.15..v4.16 but failed.

Best regards,
J

On 04.04.2018 15:36, Jani Nikula wrote:

On Tue, 03 Apr 2018, Peter Geis  wrote:

Good Evening,

I have been trying to use the 4.16 kernel source since 4.16-rc3.
Every time it booted it crashed upon loading the video drivers.
Now with the 4.16 release, it is still occurring, so I felt it prudent
to notify someone.

The machine is a Lenovo Yoga 900 80UE-ISK2.
It has a i7-6560u CPU with Intel integrated graphics.


This doesn't seem to have anything to do with Intel graphics. Based on
the backtraces, adding linux-media and linux-input mailing lists and
maintainers.

BR,
Jani.




I have included the kernel log, what format should I submit the vmcore
dump in?

Thanks,
Peter Geis


---Begin Log---

[   43.177394] WARNING: CPU: 1 PID: 711 at
drivers/media/v4l2-core/v4l2-dev.c:945
__video_register_device+0xc99/0x1090 [videodev]
[   43.177396] Modules linked in: hid_sensor_custom hid_sensor_als
hid_sensor_incl_3d hid_sensor_rotation hid_sensor_magn_3d
hid_sensor_accel_3d hid_sensor_gyro_3d hid_sensor_trigger
industrialio_triggered_buffer kfifo_buf joydev hid_sensor_iio_common
hid_rmi(+) rmi_core industrialio videobuf2_vmalloc videobuf2_memops
videobuf2_v4l2 videobuf2_common videodev hid_multitouch media
hid_sensor_hub binfmt_misc nls_iso8859_1 snd_hda_codec_hdmi arc4
snd_soc_skl snd_soc_skl_ipc snd_hda_ext_core snd_soc_sst_dsp
snd_soc_sst_ipc snd_hda_codec_realtek snd_soc_acpi snd_hda_codec_generic
snd_soc_core snd_compress ac97_bus snd_pcm_dmaengine snd_hda_intel
snd_hda_codec intel_rapl snd_hda_core x86_pkg_temp_thermal snd_hwdep
intel_powerclamp coretemp snd_pcm kvm_intel snd_seq_midi
snd_seq_midi_event snd_rawmidi crct10dif_pclmul
[   43.177426]  crc32_pclmul ghash_clmulni_intel iwlmvm pcbc mac80211
snd_seq aesni_intel iwlwifi aes_x86_64 snd_seq_device crypto_simd
glue_helper cryptd snd_timer intel_cstate intel_rapl_perf input_leds
serio_raw intel_wmi_thunderbolt snd wmi_bmof cfg80211 soundcore
ideapad_laptop sparse_keymap idma64 virt_dma tpm_crb acpi_pad
int3400_thermal acpi_thermal_rel intel_pch_thermal
processor_thermal_device mac_hid int340x_thermal_zone mei_me
intel_soc_dts_iosf mei intel_lpss_pci shpchp intel_lpss sch_fq_codel
vfio_pci nfsd vfio_virqfd parport_pc ppdev auth_rpcgss nfs_acl lockd
grace lp parport sunrpc ip_tables x_tables autofs4 hid_logitech_hidpp
hid_logitech_dj hid_generic usbhid kvmgt vfio_mdev mdev vfio_iommu_type1
vfio kvm irqbypass i915 i2c_algo_bit drm_kms_helper syscopyarea
sdhci_pci sysfillrect
[   43.177466]  sysimgblt cqhci fb_sys_fops sdhci drm i2c_hid wmi hid
video pinctrl_sunrisepoint pinctrl_intel
[   43.177474] CPU: 1 PID: 711 Comm: systemd-udevd Not tainted 4.16.0 #1
[   43.177475] Hardware name: LENOVO 80UE/VIUU4, BIOS 2UCN10T 10/14/2016
[   43.177481] RIP: 0010:__video_register_device+0xc99/0x1090 [videodev]
[   43.177482] RSP: :a5c5c231b420 EFLAGS: 00010202
[   43.177484] RAX:  RBX: 0005 RCX:

[   43.177485] RDX: c0c44cc0 RSI:  RDI:
c0c44cc0
[   43.177486] RBP: a5c5c231b478 R08: c0c96900 R09:
8eda1a51f018
[   43.177487] R10: 0600 R11: 03b6 R12:

[   43.177488] R13: 0005 R14: c0c96900 R15:
8eda1d6d91c0
[   43.177489] FS:  7fd2d8ef2480() GS:8eda3348()
knlGS:
[   43.177490] CS:  0010 DS:  ES:  CR0: 80050033
[   43.177491] CR2: 7ffe0a6ad01c CR3: 000456ae2004 CR4:
003606e0
[   43.177492] Call Trace:
[   43.177498]  ? devres_add+0x5f/0x70
[   43.177502]  rmi_f54_probe+0x437/0x470 [rmi_core]
[   43.177505]  rmi_function_probe+0x25/0x30 [rmi_core]
[   43.177507]  driver_probe_device+0x310/0x480
[   43.177509]  __device_attach_driver+0x86/0x100
[   43.177511]  ? __driver_attach+0xf0/0xf0
[   43.177512]  bus_for_each_drv+0x6b/0xb0
[   43.177514]  __device_attach+0xdd/0x160
[   

Re: [Intel-gfx] Linux 4.16 Kernel Boot Crash

2018-04-04 Thread Jani Nikula
On Tue, 03 Apr 2018, Peter Geis  wrote:
> Good Evening,
>
> I have been trying to use the 4.16 kernel source since 4.16-rc3.
> Every time it booted it crashed upon loading the video drivers.
> Now with the 4.16 release, it is still occurring, so I felt it prudent 
> to notify someone.
>
> The machine is a Lenovo Yoga 900 80UE-ISK2.
> It has a i7-6560u CPU with Intel integrated graphics.

This doesn't seem to have anything to do with Intel graphics. Based on
the backtraces, adding linux-media and linux-input mailing lists and
maintainers.

BR,
Jani.


>
> I have included the kernel log, what format should I submit the vmcore 
> dump in?
>
> Thanks,
> Peter Geis
>
>
> ---Begin Log---
>
> [   43.177394] WARNING: CPU: 1 PID: 711 at 
> drivers/media/v4l2-core/v4l2-dev.c:945 
> __video_register_device+0xc99/0x1090 [videodev]
> [   43.177396] Modules linked in: hid_sensor_custom hid_sensor_als 
> hid_sensor_incl_3d hid_sensor_rotation hid_sensor_magn_3d 
> hid_sensor_accel_3d hid_sensor_gyro_3d hid_sensor_trigger 
> industrialio_triggered_buffer kfifo_buf joydev hid_sensor_iio_common 
> hid_rmi(+) rmi_core industrialio videobuf2_vmalloc videobuf2_memops 
> videobuf2_v4l2 videobuf2_common videodev hid_multitouch media 
> hid_sensor_hub binfmt_misc nls_iso8859_1 snd_hda_codec_hdmi arc4 
> snd_soc_skl snd_soc_skl_ipc snd_hda_ext_core snd_soc_sst_dsp 
> snd_soc_sst_ipc snd_hda_codec_realtek snd_soc_acpi snd_hda_codec_generic 
> snd_soc_core snd_compress ac97_bus snd_pcm_dmaengine snd_hda_intel 
> snd_hda_codec intel_rapl snd_hda_core x86_pkg_temp_thermal snd_hwdep 
> intel_powerclamp coretemp snd_pcm kvm_intel snd_seq_midi 
> snd_seq_midi_event snd_rawmidi crct10dif_pclmul
> [   43.177426]  crc32_pclmul ghash_clmulni_intel iwlmvm pcbc mac80211 
> snd_seq aesni_intel iwlwifi aes_x86_64 snd_seq_device crypto_simd 
> glue_helper cryptd snd_timer intel_cstate intel_rapl_perf input_leds 
> serio_raw intel_wmi_thunderbolt snd wmi_bmof cfg80211 soundcore 
> ideapad_laptop sparse_keymap idma64 virt_dma tpm_crb acpi_pad 
> int3400_thermal acpi_thermal_rel intel_pch_thermal 
> processor_thermal_device mac_hid int340x_thermal_zone mei_me 
> intel_soc_dts_iosf mei intel_lpss_pci shpchp intel_lpss sch_fq_codel 
> vfio_pci nfsd vfio_virqfd parport_pc ppdev auth_rpcgss nfs_acl lockd 
> grace lp parport sunrpc ip_tables x_tables autofs4 hid_logitech_hidpp 
> hid_logitech_dj hid_generic usbhid kvmgt vfio_mdev mdev vfio_iommu_type1 
> vfio kvm irqbypass i915 i2c_algo_bit drm_kms_helper syscopyarea 
> sdhci_pci sysfillrect
> [   43.177466]  sysimgblt cqhci fb_sys_fops sdhci drm i2c_hid wmi hid 
> video pinctrl_sunrisepoint pinctrl_intel
> [   43.177474] CPU: 1 PID: 711 Comm: systemd-udevd Not tainted 4.16.0 #1
> [   43.177475] Hardware name: LENOVO 80UE/VIUU4, BIOS 2UCN10T 10/14/2016
> [   43.177481] RIP: 0010:__video_register_device+0xc99/0x1090 [videodev]
> [   43.177482] RSP: :a5c5c231b420 EFLAGS: 00010202
> [   43.177484] RAX:  RBX: 0005 RCX: 
> 
> [   43.177485] RDX: c0c44cc0 RSI:  RDI: 
> c0c44cc0
> [   43.177486] RBP: a5c5c231b478 R08: c0c96900 R09: 
> 8eda1a51f018
> [   43.177487] R10: 0600 R11: 03b6 R12: 
> 
> [   43.177488] R13: 0005 R14: c0c96900 R15: 
> 8eda1d6d91c0
> [   43.177489] FS:  7fd2d8ef2480() GS:8eda3348() 
> knlGS:
> [   43.177490] CS:  0010 DS:  ES:  CR0: 80050033
> [   43.177491] CR2: 7ffe0a6ad01c CR3: 000456ae2004 CR4: 
> 003606e0
> [   43.177492] Call Trace:
> [   43.177498]  ? devres_add+0x5f/0x70
> [   43.177502]  rmi_f54_probe+0x437/0x470 [rmi_core]
> [   43.177505]  rmi_function_probe+0x25/0x30 [rmi_core]
> [   43.177507]  driver_probe_device+0x310/0x480
> [   43.177509]  __device_attach_driver+0x86/0x100
> [   43.177511]  ? __driver_attach+0xf0/0xf0
> [   43.177512]  bus_for_each_drv+0x6b/0xb0
> [   43.177514]  __device_attach+0xdd/0x160
> [   43.177516]  device_initial_probe+0x13/0x20
> [   43.177518]  bus_probe_device+0x95/0xa0
> [   43.177519]  device_add+0x44b/0x680
> [   43.177522]  rmi_register_function+0x62/0xd0 [rmi_core]
> [   43.177525]  rmi_create_function+0x112/0x1a0 [rmi_core]
> [   43.177527]  ? rmi_driver_clear_irq_bits+0xc0/0xc0 [rmi_core]
> [   43.177530]  rmi_scan_pdt+0xca/0x1a0 [rmi_core]
> [   43.177535]  rmi_init_functions+0x5b/0x120 [rmi_core]
> [   43.177537]  rmi_driver_probe+0x152/0x3c0 [rmi_core]
> [   43.177547]  ? sysfs_create_link+0x25/0x40
> [   43.177549]  driver_probe_device+0x310/0x480
> [   43.177551]  __device_attach_driver+0x86/0x100
> [   43.177553]  ? __driver_attach+0xf0/0xf0
> [   43.177554]  bus_for_each_drv+0x6b/0xb0
> [   43.177556]  __device_attach+0xdd/0x160
> [   43.177558]  device_initial_probe+0x13/0x20
> [   43.177560]  bus_probe_device+0x95/0xa0
> [   43.177561]  device_add+0x44b/0x680
> [   43.177564]