mbox series

[0/7,SRU,OEM-5.10] System hang with kernel general protection fault due to dell-wmi-sysman sysman_init failure

Message ID 20210610064754.1061717-1-acelan.kao@canonical.com
Headers show
Series System hang with kernel general protection fault due to dell-wmi-sysman sysman_init failure | expand

Message

AceLan Kao June 10, 2021, 6:47 a.m. UTC
From: "Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com>

BugLink: https://bugs.launchpad.net/bugs/1931509

[Impact]
Encountered below protection fault while doing reboot test since
Ubuntu-oem-5.10-5.10.0-1028.29. Ubuntu Hirsute and Impish already have all
the fixes.

Jun 9 09:06:02 ubuntu kernel: [ 6.216367] general protection fault, probably for non-canonical address 0x213146a124f901ea: 0000 [#1] SMP NOPTI
Jun 9 09:06:02 ubuntu kernel: [ 6.216371] CPU: 3 PID: 447 Comm: systemd-udevd Not tainted 5.10.0-1030-oem #31-Ubuntu
Jun 9 09:06:02 ubuntu kernel: [ 6.216372] Hardware name: Dell Inc. Latitude 5300/, BIOS 1.13.1 01/22/2021
Jun 9 09:06:02 ubuntu kernel: [ 6.216376] RIP: 0010:kobject_put+0xd/0x60
Jun 9 09:06:02 ubuntu kernel: [ 6.216378] Code: 02 0f 85 64 ff ff ff 45 31 ff e9 6e ff ff ff 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 85 ff 74 3e 55 48 89 e5 53 48 89 fb <f6> 47 3c 01 74 1a 48 8d 7b 38 b8 ff ff ff ff f0 0f c1 43 38 83 f8
Jun 9 09:06:02 ubuntu kernel: [ 6.216379] RSP: 0018:ffffb233406a7c38 EFLAGS: 00010202
Jun 9 09:06:02 ubuntu kernel: [ 6.216381] RAX: 0000000000000000 RBX: 213146a124f901ea RCX: 0000000000000000
Jun 9 09:06:02 ubuntu kernel: [ 6.216383] RDX: 0000000000000001 RSI: 0000000000000000 RDI: 213146a124f901ea
Jun 9 09:06:02 ubuntu kernel: [ 6.216384] RBP: ffffb233406a7c40 R08: 0000000000000001 R09: ffffffff9ac66400
Jun 9 09:06:02 ubuntu kernel: [ 6.216384] R10: ffff9c41106d7fa0 R11: 0000000000000001 R12: ffff9c4114011438
Jun 9 09:06:02 ubuntu kernel: [ 6.216385] R13: 213146a124f901ea R14: 0000000000000000 R15: ffffb233406a7e70
Jun 9 09:06:02 ubuntu kernel: [ 6.216387] FS: 00007f9e33410880(0000) GS:ffff9c485e4c0000(0000) knlGS:0000000000000000
Jun 9 09:06:02 ubuntu kernel: [ 6.216388] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jun 9 09:06:02 ubuntu kernel: [ 6.216389] CR2: 00007ffe51396080 CR3: 000000011211e003 CR4: 00000000003706e0
Jun 9 09:06:02 ubuntu kernel: [ 6.216390] Call Trace:
Jun 9 09:06:02 ubuntu kernel: [ 6.216394] kset_unregister+0x2a/0x40
Jun 9 09:06:02 ubuntu kernel: [ 6.216399] sysman_init+0x20e/0x1000 [dell_wmi_sysman]
Jun 9 09:06:02 ubuntu kernel: [ 6.216401] ? 0xffffffffc0ce4000
Jun 9 09:06:02 ubuntu kernel: [ 6.216404] do_one_initcall+0x48/0x1d0
Jun 9 09:06:02 ubuntu kernel: [ 6.216406] ? _cond_resched+0x19/0x30
Jun 9 09:06:02 ubuntu kernel: [ 6.216408] ? kmem_cache_alloc_trace+0x37a/0x430
Jun 9 09:06:02 ubuntu kernel: [ 6.216410] ? do_init_module+0x28/0x250
Jun 9 09:06:02 ubuntu kernel: [ 6.216412] do_init_module+0x62/0x250
Jun 9 09:06:02 ubuntu kernel: [ 6.216414] load_module+0x11ac/0x1370
Jun 9 09:06:02 ubuntu kernel: [ 6.216417] ? security_kernel_post_read_file+0x5c/0x70
Jun 9 09:06:02 ubuntu kernel: [ 6.216419] ? security_kernel_post_read_file+0x5c/0x70
Jun 9 09:06:02 ubuntu kernel: [ 6.216421] __do_sys_finit_module+0xc2/0x120
Jun 9 09:06:02 ubuntu kernel: [ 6.216423] ? __do_sys_finit_module+0xc2/0x120
Jun 9 09:06:02 ubuntu kernel: [ 6.216427] __x64_sys_finit_module+0x1a/0x20
Jun 9 09:06:02 ubuntu kernel: [ 6.216429] do_syscall_64+0x38/0x90
Jun 9 09:06:02 ubuntu kernel: [ 6.216431] entry_SYSCALL_64_after_hwframe+0x44/0xa9

[Fix]
The first commit fixes the issue, but also cherry pick some other commits
for some other potential regressions.

bdda39673fde platform/x86: dell-wmi-sysman: Fix crash caused by calling kset_unregister twice
eaa1dcc79694 platform/x86: dell-wmi-sysman: Cleanup sysman_init() error-exit handling
f4c4e9ad1523 platform/x86: dell-wmi-sysman: Fix release_attributes_data() getting called twice on init_bios_attributes() failure
ececdb898376 platform/x86: dell-wmi-sysman: Fix possible NULL pointer deref on exit
9b95665a83ec platform/x86: dell-wmi-sysman: Make sysman_init() return -ENODEV of the interfaces are not found
5e3f5973c8df platform/x86: dell-wmi-sysman: Make init_bios_attributes() ACPI object parsing more robust
42f38dcccfb3 platform/x86: dell-wmi-sysman: Cleanup create_attributes_level_sysfs_files()

[Test]
It passed 300 and 400 times reboot tests on 2 different platforms

[Where problems could occur]
Those commits are pretty straightforward, and we already done some stress
test and make sure the system continue working well.

Hans de Goede (7):
  platform/x86: dell-wmi-sysman: Fix crash caused by calling
    kset_unregister twice
  platform/x86: dell-wmi-sysman: Cleanup sysman_init() error-exit
    handling
  platform/x86: dell-wmi-sysman: Fix release_attributes_data() getting
    called twice on init_bios_attributes() failure
  platform/x86: dell-wmi-sysman: Fix possible NULL pointer deref on exit
  platform/x86: dell-wmi-sysman: Make sysman_init() return -ENODEV of
    the interfaces are not found
  platform/x86: dell-wmi-sysman: Make init_bios_attributes() ACPI object
    parsing more robust
  platform/x86: dell-wmi-sysman: Cleanup
    create_attributes_level_sysfs_files()

 .../x86/dell/dell-wmi-sysman/sysman.c         | 116 +++++++++---------
 1 file changed, 60 insertions(+), 56 deletions(-)

Comments

Timo Aaltonen June 10, 2021, 10:54 a.m. UTC | #1
On 10.6.2021 9.47, AceLan Kao wrote:
> From: "Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com>
> 
> BugLink: https://bugs.launchpad.net/bugs/1931509
> 
> [Impact]
> Encountered below protection fault while doing reboot test since
> Ubuntu-oem-5.10-5.10.0-1028.29. Ubuntu Hirsute and Impish already have all
> the fixes.
> 
> Jun 9 09:06:02 ubuntu kernel: [ 6.216367] general protection fault, probably for non-canonical address 0x213146a124f901ea: 0000 [#1] SMP NOPTI
> Jun 9 09:06:02 ubuntu kernel: [ 6.216371] CPU: 3 PID: 447 Comm: systemd-udevd Not tainted 5.10.0-1030-oem #31-Ubuntu
> Jun 9 09:06:02 ubuntu kernel: [ 6.216372] Hardware name: Dell Inc. Latitude 5300/, BIOS 1.13.1 01/22/2021
> Jun 9 09:06:02 ubuntu kernel: [ 6.216376] RIP: 0010:kobject_put+0xd/0x60
> Jun 9 09:06:02 ubuntu kernel: [ 6.216378] Code: 02 0f 85 64 ff ff ff 45 31 ff e9 6e ff ff ff 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 85 ff 74 3e 55 48 89 e5 53 48 89 fb <f6> 47 3c 01 74 1a 48 8d 7b 38 b8 ff ff ff ff f0 0f c1 43 38 83 f8
> Jun 9 09:06:02 ubuntu kernel: [ 6.216379] RSP: 0018:ffffb233406a7c38 EFLAGS: 00010202
> Jun 9 09:06:02 ubuntu kernel: [ 6.216381] RAX: 0000000000000000 RBX: 213146a124f901ea RCX: 0000000000000000
> Jun 9 09:06:02 ubuntu kernel: [ 6.216383] RDX: 0000000000000001 RSI: 0000000000000000 RDI: 213146a124f901ea
> Jun 9 09:06:02 ubuntu kernel: [ 6.216384] RBP: ffffb233406a7c40 R08: 0000000000000001 R09: ffffffff9ac66400
> Jun 9 09:06:02 ubuntu kernel: [ 6.216384] R10: ffff9c41106d7fa0 R11: 0000000000000001 R12: ffff9c4114011438
> Jun 9 09:06:02 ubuntu kernel: [ 6.216385] R13: 213146a124f901ea R14: 0000000000000000 R15: ffffb233406a7e70
> Jun 9 09:06:02 ubuntu kernel: [ 6.216387] FS: 00007f9e33410880(0000) GS:ffff9c485e4c0000(0000) knlGS:0000000000000000
> Jun 9 09:06:02 ubuntu kernel: [ 6.216388] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> Jun 9 09:06:02 ubuntu kernel: [ 6.216389] CR2: 00007ffe51396080 CR3: 000000011211e003 CR4: 00000000003706e0
> Jun 9 09:06:02 ubuntu kernel: [ 6.216390] Call Trace:
> Jun 9 09:06:02 ubuntu kernel: [ 6.216394] kset_unregister+0x2a/0x40
> Jun 9 09:06:02 ubuntu kernel: [ 6.216399] sysman_init+0x20e/0x1000 [dell_wmi_sysman]
> Jun 9 09:06:02 ubuntu kernel: [ 6.216401] ? 0xffffffffc0ce4000
> Jun 9 09:06:02 ubuntu kernel: [ 6.216404] do_one_initcall+0x48/0x1d0
> Jun 9 09:06:02 ubuntu kernel: [ 6.216406] ? _cond_resched+0x19/0x30
> Jun 9 09:06:02 ubuntu kernel: [ 6.216408] ? kmem_cache_alloc_trace+0x37a/0x430
> Jun 9 09:06:02 ubuntu kernel: [ 6.216410] ? do_init_module+0x28/0x250
> Jun 9 09:06:02 ubuntu kernel: [ 6.216412] do_init_module+0x62/0x250
> Jun 9 09:06:02 ubuntu kernel: [ 6.216414] load_module+0x11ac/0x1370
> Jun 9 09:06:02 ubuntu kernel: [ 6.216417] ? security_kernel_post_read_file+0x5c/0x70
> Jun 9 09:06:02 ubuntu kernel: [ 6.216419] ? security_kernel_post_read_file+0x5c/0x70
> Jun 9 09:06:02 ubuntu kernel: [ 6.216421] __do_sys_finit_module+0xc2/0x120
> Jun 9 09:06:02 ubuntu kernel: [ 6.216423] ? __do_sys_finit_module+0xc2/0x120
> Jun 9 09:06:02 ubuntu kernel: [ 6.216427] __x64_sys_finit_module+0x1a/0x20
> Jun 9 09:06:02 ubuntu kernel: [ 6.216429] do_syscall_64+0x38/0x90
> Jun 9 09:06:02 ubuntu kernel: [ 6.216431] entry_SYSCALL_64_after_hwframe+0x44/0xa9
> 
> [Fix]
> The first commit fixes the issue, but also cherry pick some other commits
> for some other potential regressions.
> 
> bdda39673fde platform/x86: dell-wmi-sysman: Fix crash caused by calling kset_unregister twice
> eaa1dcc79694 platform/x86: dell-wmi-sysman: Cleanup sysman_init() error-exit handling
> f4c4e9ad1523 platform/x86: dell-wmi-sysman: Fix release_attributes_data() getting called twice on init_bios_attributes() failure
> ececdb898376 platform/x86: dell-wmi-sysman: Fix possible NULL pointer deref on exit
> 9b95665a83ec platform/x86: dell-wmi-sysman: Make sysman_init() return -ENODEV of the interfaces are not found
> 5e3f5973c8df platform/x86: dell-wmi-sysman: Make init_bios_attributes() ACPI object parsing more robust
> 42f38dcccfb3 platform/x86: dell-wmi-sysman: Cleanup create_attributes_level_sysfs_files()
> 
> [Test]
> It passed 300 and 400 times reboot tests on 2 different platforms
> 
> [Where problems could occur]
> Those commits are pretty straightforward, and we already done some stress
> test and make sure the system continue working well.
> 
> Hans de Goede (7):
>    platform/x86: dell-wmi-sysman: Fix crash caused by calling
>      kset_unregister twice
>    platform/x86: dell-wmi-sysman: Cleanup sysman_init() error-exit
>      handling
>    platform/x86: dell-wmi-sysman: Fix release_attributes_data() getting
>      called twice on init_bios_attributes() failure
>    platform/x86: dell-wmi-sysman: Fix possible NULL pointer deref on exit
>    platform/x86: dell-wmi-sysman: Make sysman_init() return -ENODEV of
>      the interfaces are not found
>    platform/x86: dell-wmi-sysman: Make init_bios_attributes() ACPI object
>      parsing more robust
>    platform/x86: dell-wmi-sysman: Cleanup
>      create_attributes_level_sysfs_files()
> 
>   .../x86/dell/dell-wmi-sysman/sysman.c         | 116 +++++++++---------
>   1 file changed, 60 insertions(+), 56 deletions(-)
> 

applied to oem-5.10, thanks