[Kernel-packages] [Bug 1956519] Re: amd_sfh: Null pointer dereference on early device init causes early panic and fails to boot

2022-01-19 Thread Vadik Mironov
Kleber, works like a charm! Thanks a lot for the bugfix.

MINIPC-PN50:~$ uname -ra
Linux MINIPC-PN50 5.13.0-28-generic #31-Ubuntu SMP Thu Jan 13 17:41:06 UTC 2022 
x86_64 x86_64 x86_64 GNU/Linux


** Tags removed: verification-needed-impish
** Tags added: verification-done-impish

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1956519

Title:
  amd_sfh: Null pointer dereference on early device init causes early
  panic and fails to boot

Status in linux package in Ubuntu:
  Fix Released
Status in linux source package in Impish:
  Fix Committed

Bug description:
  BugLink: https://bugs.launchpad.net/bugs/1956519

  [Impact]

  A regression was introduced into 5.13.0-23-generic for devices using
  AMD Ryzen chipsets that incorporate AMD Sensor Fusion Hub (SFH) HID
  devices, which are mostly Ryzen based laptops, but desktops do have
  the SOC embedded as well.

  On early boot, when the driver initialises the device, it hits a null
  pointer dereference with the following stack trace:

  BUG: kernel NULL pointer dereference, address: 000c
  #PF: supervisor write access in kernel mode
  #PF: error_code(0x0002) - not-present page
  PGD 0 P4D 0
  Oops: 0002 [#1] SMP NOPTI
  CPU: 0 PID: 175 Comm: systemd-udevd Not tainted 5.13.0-23-generic #23-Ubuntu
  RIP: 0010:amd_sfh_hid_client_init+0x47/0x350 [amd_sfh]
  Call Trace:
? __pci_set_master+0x5f/0xe0
amd_mp2_pci_probe+0xad/0x160 [amd_sfh]
local_pci_probe+0x48/0x80
pci_device_probe+0x105/0x1c0
really_probe+0x24b/0x4c0
driver_probe_device+0xf0/0x160
device_driver_attach+0xab/0xb0
__driver_attach+0xb2/0x140
? device_driver_attach+0xb0/0xb0
bus_for_each_dev+0x7e/0xc0
driver_attach+0x1e/0x20
bus_add_driver+0x135/0x1f0
driver_register+0x95/0xf0
? 0xc03d2000
__pci_register_driver+0x57/0x60
amd_mp2_pci_driver_init+0x23/0x1000 [amd_sfh]
do_one_initcall+0x48/0x1d0
? kmem_cache_alloc_trace+0xfb/0x240
do_init_module+0x62/0x290
load_module+0xa8f/0xb10
__do_sys_finit_module+0xc2/0x120
__x64_sys_finit_module+0x18/0x20
do_syscall_64+0x61/0xb0
? ksys_mmap_pgoff+0x135/0x260
? exit_to_user_mode_prepare+0x37/0xb0
? syscall_exit_to_user_mode+0x27/0x50
? __x64_sys_mmap+0x33/0x40
? do_syscall_64+0x6e/0xb0
? do_syscall_64+0x6e/0xb0
? do_syscall_64+0x6e/0xb0
? syscall_exit_to_user_mode+0x27/0x50
? do_syscall_64+0x6e/0xb0
? exc_page_fault+0x8f/0x170
? asm_exc_page_fault+0x8/0x30
entry_SYSCALL_64_after_hwframe+0x44/0xae

  This causes a panic and the system is unable to continue booting, and
  the user must select an older kernel to boot.

  [Fix]

  The issue was introduced in 5.13.0-23-generic by the commit:

  commit d46ef750ed58cbeeba2d9a55c99231c30a172764
  commit-impish 56559d7910e704470ad72da58469b5588e8cbf85
  Author: Evgeny Novikov 
  Date: Tue Jun 1 19:38:01 2021 +0300
  Subject:HID: amd_sfh: Fix potential NULL pointer dereference
  Link: 
https://github.com/torvalds/linux/commit/d46ef750ed58cbeeba2d9a55c99231c30a172764

  The issue is pretty straightforward, amd_sfh_client.c attempts to
  dereference cl_data, but it is NULL:

  $ eu-addr2line -ifae 
./usr/lib/debug/lib/modules/5.13.0-23-generic/kernel/drivers/hid/amd-sfh-hid/amd_sfh.ko
 amd_sfh_hid_client_init+0x47
  0x0767
  amd_sfh_hid_client_init
  
/build/linux-k2e9CH/linux-5.13.0/drivers/hid/amd-sfh-hid/amd_sfh_client.c:147:27

  134 int amd_sfh_hid_client_init(struct amd_mp2_dev *privdata)
  135 {
  ...
  146
  147 cl_data->num_hid_devices = amd_mp2_get_sensor_num(privdata, 
&cl_data->sensor_idx[0]);
  148
  ...

  The patch moves the call to amd_sfh_hid_client_init() before
  privdata->cl_data is actually allocated by devm_kzalloc, hence cl_data
  being NULL.

  + rc = amd_sfh_hid_client_init(privdata);
  + if (rc)
  + return rc;
  +
  privdata->cl_data = devm_kzalloc(&pdev->dev, sizeof(struct 
amdtp_cl_data), GFP_KERNEL);
  if (!privdata->cl_data)
  return -ENOMEM;
  ...
  - return amd_sfh_hid_client_init(privdata);
  + return 0;

  The issue was fixed upstream in 5.15-rc4 by the commit:

  commit 88a04049c08cd62e698bc1b1af2d09574b9e0aee
  Author: Basavaraj Natikar 
  Date: Thu Sep 23 17:59:27 2021 +0530
  Subject: HID: amd_sfh: Fix potential NULL pointer dereference
  Link: 
https://github.com/torvalds/linux/commit/88a04049c08cd62e698bc1b1af2d09574b9e0aee

  The fix places the call to amd_sfh_hid_client_init() after
  privdata->cl_data is allocated, and it changes the order of
  amd_sfh_hid_client_init() to happen before devm_add_action_or_reset()
  fixing the actual null pointer dereference which caused these commits
  to exist.

  This patch also landed in 5.14.10 -stable, but it seems it was omitted
  from being backported to impish, likely due to it sharing the exact
  same subject line as the regression commi

[Kernel-packages] [Bug 1956519] [NEW] kernel panic after upgrading to kernel 5.13.0-23

2022-01-05 Thread Vadik Mironov
Public bug reported:

After upgrading my son's Asus PN50 with Ubuntu 21.10 to the latest
kernel 5.13.0-23, I am no longer able to boot it normally. Kernel fails
with the panic halfway through the boot process (which got overall
suspiciously slow):

[1.359465] BUG: kernel NULL pointer dereference, address: 000c
[1.359498] #PF: supervisor write access in kernel mode
[1.359519] #PF: error_code(0x0002) - not-present page
[1.359540] PGD 0 P4D 0
[1.359553] Oops: 0002 [#1] SMP NOPTI
[1.359569] CPU: 0 PID: 175 Comm: systemd-udevd Not tainted 
5.13.0-23-generic #23-Ubuntu
[1.359602] Hardware name: ASUSTeK COMPUTER INC. MINIPC PN50/PN50, BIOS 0623 
05/13/2021
[1.359632] RIP: 0010:amd_sfh_hid_client_init+0x47/0x350 [amd_sfh]
[1.359661] Code: 00 53 48 83 ec 20 48 8b 5f 08 48 8b 07 48 8d b3 22 01 00 
00 4c 8d b0 c8 00 00 00 e8 23 07 00 00 45 31 c0 31 c9 ba 00 00 20 00 <89> 43 0c 
48 8d 83 68 01 00 00 48 8d bb 80 01 00 00 48 c7 c6 20 6d
[1.359729] RSP: 0018:bf71c099f9d8 EFLAGS: 00010246
[1.359750] RAX:  RBX:  RCX: 
[1.359777] RDX: 0020 RSI: c03cd249 RDI: a680004c
[1.359804] RBP: bf71c099fa20 R08:  R09: 0006
[1.359831] R10: bf71c0d0 R11: 0007 R12: 000fffe0
[1.359857] R13: 992bc3387cd8 R14: 992bc11560c8 R15: 992bc3387cd8
[1.359884] FS:  7ff0ec1a48c0() GS:992ebf60() 
knlGS:
[1.359915] CS:  0010 DS:  ES:  CR0: 80050033
[1.359937] CR2: 000c CR3: 000102fd CR4: 00350ef0
[1.359964] Call Trace:
[1.359976]  ? __pci_set_master+0x5f/0xe0
[1.359997]  amd_mp2_pci_probe+0xad/0x160 [amd_sfh]
[1.360021]  local_pci_probe+0x48/0x80
[1.360038]  pci_device_probe+0x105/0x1c0
[1.360056]  really_probe+0x24b/0x4c0
[1.360073]  driver_probe_device+0xf0/0x160
[1.360091]  device_driver_attach+0xab/0xb0
[1.360110]  __driver_attach+0xb2/0x140
[1.360126]  ? device_driver_attach+0xb0/0xb0
[1.360145]  bus_for_each_dev+0x7e/0xc0
[1.360161]  driver_attach+0x1e/0x20
[1.360177]  bus_add_driver+0x135/0x1f0
[1.360194]  driver_register+0x95/0xf0
[1.360210]  ? 0xc03d2000
[1.360225]  __pci_register_driver+0x57/0x60
[1.360242]  amd_mp2_pci_driver_init+0x23/0x1000 [amd_sfh]
[1.360266]  do_one_initcall+0x48/0x1d0
[1.360284]  ? kmem_cache_alloc_trace+0xfb/0x240
[1.360306]  do_init_module+0x62/0x290
[1.360323]  load_module+0xa8f/0xb10
[1.360340]  __do_sys_finit_module+0xc2/0x120
[1.360359]  __x64_sys_finit_module+0x18/0x20
[1.360377]  do_syscall_64+0x61/0xb0
[1.361638]  ? ksys_mmap_pgoff+0x135/0x260
[1.362883]  ? exit_to_user_mode_prepare+0x37/0xb0
[1.364121]  ? syscall_exit_to_user_mode+0x27/0x50
[1.365343]  ? __x64_sys_mmap+0x33/0x40
[1.366550]  ? do_syscall_64+0x6e/0xb0
[1.367749]  ? do_syscall_64+0x6e/0xb0
[1.368923]  ? do_syscall_64+0x6e/0xb0
[1.370079]  ? syscall_exit_to_user_mode+0x27/0x50
[1.371227]  ? do_syscall_64+0x6e/0xb0
[1.372359]  ? exc_page_fault+0x8f/0x170
[1.373478]  ? asm_exc_page_fault+0x8/0x30
[1.374584]  entry_SYSCALL_64_after_hwframe+0x44/0xae
[1.375684] RIP: 0033:0x7ff0ec73a94d
[1.376767] Code: 5b 41 5c c3 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 48 89 
f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 
f0 ff ff 73 01 c3 48 8b 0d b3 64 0f 00 f7 d8 64 89 01 48
[1.377926] RSP: 002b:7ffd00724ba8 EFLAGS: 0246 ORIG_RAX: 
0139
[1.379076] RAX: ffda RBX: 55e130084390 RCX: 7ff0ec73a94d
[1.380225] RDX:  RSI: 7ff0ec8ca3fe RDI: 0005
[1.381363] RBP: 0002 R08:  R09: 
[1.382488] R10: 0005 R11: 0246 R12: 7ff0ec8ca3fe
[1.383598] R13: 55e130083370 R14: 55e130084480 R15: 55e130086cb0
[1.384698] Modules linked in: ahci(+) libahci i2c_piix4(+) r8169(+) 
amd_sfh(+) i2c_hid_acpi realtek i2c_hid xhci_pci(+) xhci_pci_renesas wmi(+) 
video(+) fjes(+) hid
[1.385841] CR2: 000c
[1.386955] ---[ end trace b2ebcacf74b788da ]---
[1.388064] RIP: 0010:amd_sfh_hid_client_init+0x47/0x350 [amd_sfh]
[1.389176] Code: 00 53 48 83 ec 20 48 8b 5f 08 48 8b 07 48 8d b3 22 01 00 
00 4c 8d b0 c8 00 00 00 e8 23 07 00 00 45 31 c0 31 c9 ba 00 00 20 00 <89> 43 0c 
48 8d 83 68 01 00 00 48 8d bb 80 01 00 00 48 c7 c6 20 6d
[1.390374] RSP: 0018:bf71c099f9d8 EFLAGS: 00010246
[1.391560] RAX:  RBX:  RCX: 
[1.392338] piix4_smbus :00:14.0: Auxiliary SMBus Host Controller at 
0xb20
[1.392763] RDX: 0020 RSI: c03cd249 RDI: a680004c
[1.395162] RBP: bf71c099fa20 R08:  R09: 00

[Kernel-packages] [Bug 1956519] Re: kernel panic after upgrading to kernel 5.13.0-23

2022-01-05 Thread Vadik Mironov
** Attachment added: "dmesg_kernel_panic"
   
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1956519/+attachment/5551779/+files/dmesg_kernel_panic_5.13.0-23-generic

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1956519

Title:
  kernel panic after upgrading to kernel 5.13.0-23

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  After upgrading my son's Asus PN50 with Ubuntu 21.10 to the latest
  kernel 5.13.0-23, I am no longer able to boot it normally. Kernel
  fails with the panic halfway through the boot process (which got
  overall suspiciously slow):

  [1.359465] BUG: kernel NULL pointer dereference, address: 000c
  [1.359498] #PF: supervisor write access in kernel mode
  [1.359519] #PF: error_code(0x0002) - not-present page
  [1.359540] PGD 0 P4D 0
  [1.359553] Oops: 0002 [#1] SMP NOPTI
  [1.359569] CPU: 0 PID: 175 Comm: systemd-udevd Not tainted 
5.13.0-23-generic #23-Ubuntu
  [1.359602] Hardware name: ASUSTeK COMPUTER INC. MINIPC PN50/PN50, BIOS 
0623 05/13/2021
  [1.359632] RIP: 0010:amd_sfh_hid_client_init+0x47/0x350 [amd_sfh]
  [1.359661] Code: 00 53 48 83 ec 20 48 8b 5f 08 48 8b 07 48 8d b3 22 01 00 
00 4c 8d b0 c8 00 00 00 e8 23 07 00 00 45 31 c0 31 c9 ba 00 00 20 00 <89> 43 0c 
48 8d 83 68 01 00 00 48 8d bb 80 01 00 00 48 c7 c6 20 6d
  [1.359729] RSP: 0018:bf71c099f9d8 EFLAGS: 00010246
  [1.359750] RAX:  RBX:  RCX: 

  [1.359777] RDX: 0020 RSI: c03cd249 RDI: 
a680004c
  [1.359804] RBP: bf71c099fa20 R08:  R09: 
0006
  [1.359831] R10: bf71c0d0 R11: 0007 R12: 
000fffe0
  [1.359857] R13: 992bc3387cd8 R14: 992bc11560c8 R15: 
992bc3387cd8
  [1.359884] FS:  7ff0ec1a48c0() GS:992ebf60() 
knlGS:
  [1.359915] CS:  0010 DS:  ES:  CR0: 80050033
  [1.359937] CR2: 000c CR3: 000102fd CR4: 
00350ef0
  [1.359964] Call Trace:
  [1.359976]  ? __pci_set_master+0x5f/0xe0
  [1.359997]  amd_mp2_pci_probe+0xad/0x160 [amd_sfh]
  [1.360021]  local_pci_probe+0x48/0x80
  [1.360038]  pci_device_probe+0x105/0x1c0
  [1.360056]  really_probe+0x24b/0x4c0
  [1.360073]  driver_probe_device+0xf0/0x160
  [1.360091]  device_driver_attach+0xab/0xb0
  [1.360110]  __driver_attach+0xb2/0x140
  [1.360126]  ? device_driver_attach+0xb0/0xb0
  [1.360145]  bus_for_each_dev+0x7e/0xc0
  [1.360161]  driver_attach+0x1e/0x20
  [1.360177]  bus_add_driver+0x135/0x1f0
  [1.360194]  driver_register+0x95/0xf0
  [1.360210]  ? 0xc03d2000
  [1.360225]  __pci_register_driver+0x57/0x60
  [1.360242]  amd_mp2_pci_driver_init+0x23/0x1000 [amd_sfh]
  [1.360266]  do_one_initcall+0x48/0x1d0
  [1.360284]  ? kmem_cache_alloc_trace+0xfb/0x240
  [1.360306]  do_init_module+0x62/0x290
  [1.360323]  load_module+0xa8f/0xb10
  [1.360340]  __do_sys_finit_module+0xc2/0x120
  [1.360359]  __x64_sys_finit_module+0x18/0x20
  [1.360377]  do_syscall_64+0x61/0xb0
  [1.361638]  ? ksys_mmap_pgoff+0x135/0x260
  [1.362883]  ? exit_to_user_mode_prepare+0x37/0xb0
  [1.364121]  ? syscall_exit_to_user_mode+0x27/0x50
  [1.365343]  ? __x64_sys_mmap+0x33/0x40
  [1.366550]  ? do_syscall_64+0x6e/0xb0
  [1.367749]  ? do_syscall_64+0x6e/0xb0
  [1.368923]  ? do_syscall_64+0x6e/0xb0
  [1.370079]  ? syscall_exit_to_user_mode+0x27/0x50
  [1.371227]  ? do_syscall_64+0x6e/0xb0
  [1.372359]  ? exc_page_fault+0x8f/0x170
  [1.373478]  ? asm_exc_page_fault+0x8/0x30
  [1.374584]  entry_SYSCALL_64_after_hwframe+0x44/0xae
  [1.375684] RIP: 0033:0x7ff0ec73a94d
  [1.376767] Code: 5b 41 5c c3 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 48 89 
f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 
f0 ff ff 73 01 c3 48 8b 0d b3 64 0f 00 f7 d8 64 89 01 48
  [1.377926] RSP: 002b:7ffd00724ba8 EFLAGS: 0246 ORIG_RAX: 
0139
  [1.379076] RAX: ffda RBX: 55e130084390 RCX: 
7ff0ec73a94d
  [1.380225] RDX:  RSI: 7ff0ec8ca3fe RDI: 
0005
  [1.381363] RBP: 0002 R08:  R09: 

  [1.382488] R10: 0005 R11: 0246 R12: 
7ff0ec8ca3fe
  [1.383598] R13: 55e130083370 R14: 55e130084480 R15: 
55e130086cb0
  [1.384698] Modules linked in: ahci(+) libahci i2c_piix4(+) r8169(+) 
amd_sfh(+) i2c_hid_acpi realtek i2c_hid xhci_pci(+) xhci_pci_renesas wmi(+) 
video(+) fjes(+) hid
  [1.385841] CR2: 000c
  [1.386955] ---[ end trace b2ebcacf74b788da ]---
  [1.388064] RIP: 0010:amd_sfh_hid_client_init+0x47/0x350 [amd_sfh]
  [  

[Kernel-packages] [Bug 1956519] Re: kernel panic after upgrading to kernel 5.13.0-23

2022-01-05 Thread Vadik Mironov
I am attaching the full dmesg output for both bad kernel version and
good version booting successfully. Please let me know if there is
anything else I can provide.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1956519

Title:
  kernel panic after upgrading to kernel 5.13.0-23

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  After upgrading my son's Asus PN50 with Ubuntu 21.10 to the latest
  kernel 5.13.0-23, I am no longer able to boot it normally. Kernel
  fails with the panic halfway through the boot process (which got
  overall suspiciously slow):

  [1.359465] BUG: kernel NULL pointer dereference, address: 000c
  [1.359498] #PF: supervisor write access in kernel mode
  [1.359519] #PF: error_code(0x0002) - not-present page
  [1.359540] PGD 0 P4D 0
  [1.359553] Oops: 0002 [#1] SMP NOPTI
  [1.359569] CPU: 0 PID: 175 Comm: systemd-udevd Not tainted 
5.13.0-23-generic #23-Ubuntu
  [1.359602] Hardware name: ASUSTeK COMPUTER INC. MINIPC PN50/PN50, BIOS 
0623 05/13/2021
  [1.359632] RIP: 0010:amd_sfh_hid_client_init+0x47/0x350 [amd_sfh]
  [1.359661] Code: 00 53 48 83 ec 20 48 8b 5f 08 48 8b 07 48 8d b3 22 01 00 
00 4c 8d b0 c8 00 00 00 e8 23 07 00 00 45 31 c0 31 c9 ba 00 00 20 00 <89> 43 0c 
48 8d 83 68 01 00 00 48 8d bb 80 01 00 00 48 c7 c6 20 6d
  [1.359729] RSP: 0018:bf71c099f9d8 EFLAGS: 00010246
  [1.359750] RAX:  RBX:  RCX: 

  [1.359777] RDX: 0020 RSI: c03cd249 RDI: 
a680004c
  [1.359804] RBP: bf71c099fa20 R08:  R09: 
0006
  [1.359831] R10: bf71c0d0 R11: 0007 R12: 
000fffe0
  [1.359857] R13: 992bc3387cd8 R14: 992bc11560c8 R15: 
992bc3387cd8
  [1.359884] FS:  7ff0ec1a48c0() GS:992ebf60() 
knlGS:
  [1.359915] CS:  0010 DS:  ES:  CR0: 80050033
  [1.359937] CR2: 000c CR3: 000102fd CR4: 
00350ef0
  [1.359964] Call Trace:
  [1.359976]  ? __pci_set_master+0x5f/0xe0
  [1.359997]  amd_mp2_pci_probe+0xad/0x160 [amd_sfh]
  [1.360021]  local_pci_probe+0x48/0x80
  [1.360038]  pci_device_probe+0x105/0x1c0
  [1.360056]  really_probe+0x24b/0x4c0
  [1.360073]  driver_probe_device+0xf0/0x160
  [1.360091]  device_driver_attach+0xab/0xb0
  [1.360110]  __driver_attach+0xb2/0x140
  [1.360126]  ? device_driver_attach+0xb0/0xb0
  [1.360145]  bus_for_each_dev+0x7e/0xc0
  [1.360161]  driver_attach+0x1e/0x20
  [1.360177]  bus_add_driver+0x135/0x1f0
  [1.360194]  driver_register+0x95/0xf0
  [1.360210]  ? 0xc03d2000
  [1.360225]  __pci_register_driver+0x57/0x60
  [1.360242]  amd_mp2_pci_driver_init+0x23/0x1000 [amd_sfh]
  [1.360266]  do_one_initcall+0x48/0x1d0
  [1.360284]  ? kmem_cache_alloc_trace+0xfb/0x240
  [1.360306]  do_init_module+0x62/0x290
  [1.360323]  load_module+0xa8f/0xb10
  [1.360340]  __do_sys_finit_module+0xc2/0x120
  [1.360359]  __x64_sys_finit_module+0x18/0x20
  [1.360377]  do_syscall_64+0x61/0xb0
  [1.361638]  ? ksys_mmap_pgoff+0x135/0x260
  [1.362883]  ? exit_to_user_mode_prepare+0x37/0xb0
  [1.364121]  ? syscall_exit_to_user_mode+0x27/0x50
  [1.365343]  ? __x64_sys_mmap+0x33/0x40
  [1.366550]  ? do_syscall_64+0x6e/0xb0
  [1.367749]  ? do_syscall_64+0x6e/0xb0
  [1.368923]  ? do_syscall_64+0x6e/0xb0
  [1.370079]  ? syscall_exit_to_user_mode+0x27/0x50
  [1.371227]  ? do_syscall_64+0x6e/0xb0
  [1.372359]  ? exc_page_fault+0x8f/0x170
  [1.373478]  ? asm_exc_page_fault+0x8/0x30
  [1.374584]  entry_SYSCALL_64_after_hwframe+0x44/0xae
  [1.375684] RIP: 0033:0x7ff0ec73a94d
  [1.376767] Code: 5b 41 5c c3 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 48 89 
f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 
f0 ff ff 73 01 c3 48 8b 0d b3 64 0f 00 f7 d8 64 89 01 48
  [1.377926] RSP: 002b:7ffd00724ba8 EFLAGS: 0246 ORIG_RAX: 
0139
  [1.379076] RAX: ffda RBX: 55e130084390 RCX: 
7ff0ec73a94d
  [1.380225] RDX:  RSI: 7ff0ec8ca3fe RDI: 
0005
  [1.381363] RBP: 0002 R08:  R09: 

  [1.382488] R10: 0005 R11: 0246 R12: 
7ff0ec8ca3fe
  [1.383598] R13: 55e130083370 R14: 55e130084480 R15: 
55e130086cb0
  [1.384698] Modules linked in: ahci(+) libahci i2c_piix4(+) r8169(+) 
amd_sfh(+) i2c_hid_acpi realtek i2c_hid xhci_pci(+) xhci_pci_renesas wmi(+) 
video(+) fjes(+) hid
  [1.385841] CR2: 000c
  [1.386955] ---[ end trace b2ebcacf74b788da ]---
  [1.388064] RIP: 0010:amd_sfh_hid_client_init+0x47/0x350 [amd_sfh]
  [1.389

[Kernel-packages] [Bug 1956519] Re: kernel panic after upgrading to kernel 5.13.0-23

2022-01-05 Thread Vadik Mironov
** Attachment added: "dmesg_normal_boot"
   
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1956519/+attachment/5551780/+files/dmesg_normal_boot_5.13.0-22-generic

** Description changed:

- After upgrading my son's Asus PN50 with Ubuntu 21.10 to latest kernel
- 5.13.0-23, I no longer able to boot it normally. Kernel fails with the
- following somewhere in the middle of the boot process (which got
+ After upgrading my son's Asus PN50 with Ubuntu 21.10 to the latest
+ kernel 5.13.0-23, I am no longer able to boot it normally. Kernel fails
+ with the panic halfway through the boot process (which got overall
  suspiciously slow):
  
  [1.359465] BUG: kernel NULL pointer dereference, address: 000c
  [1.359498] #PF: supervisor write access in kernel mode
  [1.359519] #PF: error_code(0x0002) - not-present page
  [1.359540] PGD 0 P4D 0
  [1.359553] Oops: 0002 [#1] SMP NOPTI
  [1.359569] CPU: 0 PID: 175 Comm: systemd-udevd Not tainted 
5.13.0-23-generic #23-Ubuntu
  [1.359602] Hardware name: ASUSTeK COMPUTER INC. MINIPC PN50/PN50, BIOS 
0623 05/13/2021
  [1.359632] RIP: 0010:amd_sfh_hid_client_init+0x47/0x350 [amd_sfh]
  [1.359661] Code: 00 53 48 83 ec 20 48 8b 5f 08 48 8b 07 48 8d b3 22 01 00 
00 4c 8d b0 c8 00 00 00 e8 23 07 00 00 45 31 c0 31 c9 ba 00 00 20 00 <89> 43 0c 
48 8d 83 68 01 00 00 48 8d bb 80 01 00 00 48 c7 c6 20 6d
  [1.359729] RSP: 0018:bf71c099f9d8 EFLAGS: 00010246
  [1.359750] RAX:  RBX:  RCX: 

  [1.359777] RDX: 0020 RSI: c03cd249 RDI: 
a680004c
  [1.359804] RBP: bf71c099fa20 R08:  R09: 
0006
  [1.359831] R10: bf71c0d0 R11: 0007 R12: 
000fffe0
  [1.359857] R13: 992bc3387cd8 R14: 992bc11560c8 R15: 
992bc3387cd8
  [1.359884] FS:  7ff0ec1a48c0() GS:992ebf60() 
knlGS:
  [1.359915] CS:  0010 DS:  ES:  CR0: 80050033
  [1.359937] CR2: 000c CR3: 000102fd CR4: 
00350ef0
  [1.359964] Call Trace:
  [1.359976]  ? __pci_set_master+0x5f/0xe0
  [1.359997]  amd_mp2_pci_probe+0xad/0x160 [amd_sfh]
  [1.360021]  local_pci_probe+0x48/0x80
  [1.360038]  pci_device_probe+0x105/0x1c0
  [1.360056]  really_probe+0x24b/0x4c0
  [1.360073]  driver_probe_device+0xf0/0x160
  [1.360091]  device_driver_attach+0xab/0xb0
  [1.360110]  __driver_attach+0xb2/0x140
  [1.360126]  ? device_driver_attach+0xb0/0xb0
  [1.360145]  bus_for_each_dev+0x7e/0xc0
  [1.360161]  driver_attach+0x1e/0x20
  [1.360177]  bus_add_driver+0x135/0x1f0
  [1.360194]  driver_register+0x95/0xf0
  [1.360210]  ? 0xc03d2000
  [1.360225]  __pci_register_driver+0x57/0x60
  [1.360242]  amd_mp2_pci_driver_init+0x23/0x1000 [amd_sfh]
  [1.360266]  do_one_initcall+0x48/0x1d0
  [1.360284]  ? kmem_cache_alloc_trace+0xfb/0x240
  [1.360306]  do_init_module+0x62/0x290
  [1.360323]  load_module+0xa8f/0xb10
  [1.360340]  __do_sys_finit_module+0xc2/0x120
  [1.360359]  __x64_sys_finit_module+0x18/0x20
  [1.360377]  do_syscall_64+0x61/0xb0
  [1.361638]  ? ksys_mmap_pgoff+0x135/0x260
  [1.362883]  ? exit_to_user_mode_prepare+0x37/0xb0
  [1.364121]  ? syscall_exit_to_user_mode+0x27/0x50
  [1.365343]  ? __x64_sys_mmap+0x33/0x40
  [1.366550]  ? do_syscall_64+0x6e/0xb0
  [1.367749]  ? do_syscall_64+0x6e/0xb0
  [1.368923]  ? do_syscall_64+0x6e/0xb0
  [1.370079]  ? syscall_exit_to_user_mode+0x27/0x50
  [1.371227]  ? do_syscall_64+0x6e/0xb0
  [1.372359]  ? exc_page_fault+0x8f/0x170
  [1.373478]  ? asm_exc_page_fault+0x8/0x30
  [1.374584]  entry_SYSCALL_64_after_hwframe+0x44/0xae
  [1.375684] RIP: 0033:0x7ff0ec73a94d
  [1.376767] Code: 5b 41 5c c3 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 48 89 
f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 
f0 ff ff 73 01 c3 48 8b 0d b3 64 0f 00 f7 d8 64 89 01 48
  [1.377926] RSP: 002b:7ffd00724ba8 EFLAGS: 0246 ORIG_RAX: 
0139
  [1.379076] RAX: ffda RBX: 55e130084390 RCX: 
7ff0ec73a94d
  [1.380225] RDX:  RSI: 7ff0ec8ca3fe RDI: 
0005
  [1.381363] RBP: 0002 R08:  R09: 

  [1.382488] R10: 0005 R11: 0246 R12: 
7ff0ec8ca3fe
  [1.383598] R13: 55e130083370 R14: 55e130084480 R15: 
55e130086cb0
  [1.384698] Modules linked in: ahci(+) libahci i2c_piix4(+) r8169(+) 
amd_sfh(+) i2c_hid_acpi realtek i2c_hid xhci_pci(+) xhci_pci_renesas wmi(+) 
video(+) fjes(+) hid
  [1.385841] CR2: 000c
  [1.386955] ---[ end trace b2ebcacf74b788da ]---
  [1.388064] RIP: 0010:amd_sfh_hid_client_init+0x47/0x350 [amd_sfh]
  [1.389176] Code: 00 53 48 83 ec 20 48 8b 5f 08 48 8

[Kernel-packages] [Bug 1956519] Re: kernel panic after upgrading to kernel 5.13.0-23

2022-01-07 Thread Vadik Mironov
*** This bug is a duplicate of bug 1956401 ***
https://bugs.launchpad.net/bugs/1956401

Thanks a lot Kelsey.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1956519

Title:
  kernel panic after upgrading to kernel 5.13.0-23

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  After upgrading my son's Asus PN50 with Ubuntu 21.10 to the latest
  kernel 5.13.0-23, I am no longer able to boot it normally. Kernel
  fails with the panic halfway through the boot process (which got
  overall suspiciously slow):

  [1.359465] BUG: kernel NULL pointer dereference, address: 000c
  [1.359498] #PF: supervisor write access in kernel mode
  [1.359519] #PF: error_code(0x0002) - not-present page
  [1.359540] PGD 0 P4D 0
  [1.359553] Oops: 0002 [#1] SMP NOPTI
  [1.359569] CPU: 0 PID: 175 Comm: systemd-udevd Not tainted 
5.13.0-23-generic #23-Ubuntu
  [1.359602] Hardware name: ASUSTeK COMPUTER INC. MINIPC PN50/PN50, BIOS 
0623 05/13/2021
  [1.359632] RIP: 0010:amd_sfh_hid_client_init+0x47/0x350 [amd_sfh]
  [1.359661] Code: 00 53 48 83 ec 20 48 8b 5f 08 48 8b 07 48 8d b3 22 01 00 
00 4c 8d b0 c8 00 00 00 e8 23 07 00 00 45 31 c0 31 c9 ba 00 00 20 00 <89> 43 0c 
48 8d 83 68 01 00 00 48 8d bb 80 01 00 00 48 c7 c6 20 6d
  [1.359729] RSP: 0018:bf71c099f9d8 EFLAGS: 00010246
  [1.359750] RAX:  RBX:  RCX: 

  [1.359777] RDX: 0020 RSI: c03cd249 RDI: 
a680004c
  [1.359804] RBP: bf71c099fa20 R08:  R09: 
0006
  [1.359831] R10: bf71c0d0 R11: 0007 R12: 
000fffe0
  [1.359857] R13: 992bc3387cd8 R14: 992bc11560c8 R15: 
992bc3387cd8
  [1.359884] FS:  7ff0ec1a48c0() GS:992ebf60() 
knlGS:
  [1.359915] CS:  0010 DS:  ES:  CR0: 80050033
  [1.359937] CR2: 000c CR3: 000102fd CR4: 
00350ef0
  [1.359964] Call Trace:
  [1.359976]  ? __pci_set_master+0x5f/0xe0
  [1.359997]  amd_mp2_pci_probe+0xad/0x160 [amd_sfh]
  [1.360021]  local_pci_probe+0x48/0x80
  [1.360038]  pci_device_probe+0x105/0x1c0
  [1.360056]  really_probe+0x24b/0x4c0
  [1.360073]  driver_probe_device+0xf0/0x160
  [1.360091]  device_driver_attach+0xab/0xb0
  [1.360110]  __driver_attach+0xb2/0x140
  [1.360126]  ? device_driver_attach+0xb0/0xb0
  [1.360145]  bus_for_each_dev+0x7e/0xc0
  [1.360161]  driver_attach+0x1e/0x20
  [1.360177]  bus_add_driver+0x135/0x1f0
  [1.360194]  driver_register+0x95/0xf0
  [1.360210]  ? 0xc03d2000
  [1.360225]  __pci_register_driver+0x57/0x60
  [1.360242]  amd_mp2_pci_driver_init+0x23/0x1000 [amd_sfh]
  [1.360266]  do_one_initcall+0x48/0x1d0
  [1.360284]  ? kmem_cache_alloc_trace+0xfb/0x240
  [1.360306]  do_init_module+0x62/0x290
  [1.360323]  load_module+0xa8f/0xb10
  [1.360340]  __do_sys_finit_module+0xc2/0x120
  [1.360359]  __x64_sys_finit_module+0x18/0x20
  [1.360377]  do_syscall_64+0x61/0xb0
  [1.361638]  ? ksys_mmap_pgoff+0x135/0x260
  [1.362883]  ? exit_to_user_mode_prepare+0x37/0xb0
  [1.364121]  ? syscall_exit_to_user_mode+0x27/0x50
  [1.365343]  ? __x64_sys_mmap+0x33/0x40
  [1.366550]  ? do_syscall_64+0x6e/0xb0
  [1.367749]  ? do_syscall_64+0x6e/0xb0
  [1.368923]  ? do_syscall_64+0x6e/0xb0
  [1.370079]  ? syscall_exit_to_user_mode+0x27/0x50
  [1.371227]  ? do_syscall_64+0x6e/0xb0
  [1.372359]  ? exc_page_fault+0x8f/0x170
  [1.373478]  ? asm_exc_page_fault+0x8/0x30
  [1.374584]  entry_SYSCALL_64_after_hwframe+0x44/0xae
  [1.375684] RIP: 0033:0x7ff0ec73a94d
  [1.376767] Code: 5b 41 5c c3 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 48 89 
f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 
f0 ff ff 73 01 c3 48 8b 0d b3 64 0f 00 f7 d8 64 89 01 48
  [1.377926] RSP: 002b:7ffd00724ba8 EFLAGS: 0246 ORIG_RAX: 
0139
  [1.379076] RAX: ffda RBX: 55e130084390 RCX: 
7ff0ec73a94d
  [1.380225] RDX:  RSI: 7ff0ec8ca3fe RDI: 
0005
  [1.381363] RBP: 0002 R08:  R09: 

  [1.382488] R10: 0005 R11: 0246 R12: 
7ff0ec8ca3fe
  [1.383598] R13: 55e130083370 R14: 55e130084480 R15: 
55e130086cb0
  [1.384698] Modules linked in: ahci(+) libahci i2c_piix4(+) r8169(+) 
amd_sfh(+) i2c_hid_acpi realtek i2c_hid xhci_pci(+) xhci_pci_renesas wmi(+) 
video(+) fjes(+) hid
  [1.385841] CR2: 000c
  [1.386955] ---[ end trace b2ebcacf74b788da ]---
  [1.388064] RIP: 0010:amd_sfh_hid_client_init+0x47/0x350 [amd_sfh]
  [1.389176] Code: 00 53 48 83 ec 20 48 8b 5f 08 48 8b 07 4

[Kernel-packages] [Bug 1956519] Re: kernel panic after upgrading to kernel 5.13.0-23

2022-01-07 Thread Vadik Mironov
*** This bug is a duplicate of bug 1956401 ***
https://bugs.launchpad.net/bugs/1956401

Kelsey, following the suggestion from bug 1956401, I've upgraded to
5.13.0-24-generic and it's exactly the same story as with 5.13.0-23:

1.330735] BUG: kernel NULL pointer dereference, address: 000c
[1.330768] #PF: supervisor write access in kernel mode
[1.330788] #PF: error_code(0x0002) - not-present page
[1.330809] PGD 0 P4D 0 
[1.330822] Oops: 0002 [#1] SMP NOPTI
[1.330838] CPU: 0 PID: 204 Comm: systemd-udevd Not tainted 
5.13.0-24-generic #24-Ubuntu
[1.330870] Hardware name: ASUSTeK COMPUTER INC. MINIPC PN50/PN50, BIOS 0623 
05/13/2021
[1.330900] RIP: 0010:amd_sfh_hid_client_init+0x47/0x350 [amd_sfh]
[1.330930] Code: 00 53 48 83 ec 20 48 8b 5f 08 48 8b 07 48 8d b3 22 01 00 
00 4c 8d b0 c8 00 00 00 e8 23 07 00 00 45 31 c0 31 c9 ba 00 00 20 00 <89> 43 0c 
48 8d 83 68 01 00 00 48 8d bb 80 01 00 00 48 c7 c6 f0 6d
[1.330997] RSP: 0018:a523c0b939e0 EFLAGS: 00010246
[1.331018] RAX:  RBX:  RCX: 
[1.331045] RDX: 0020 RSI: c040c249 RDI: 934c
[1.331072] RBP: a523c0b93a28 R08:  R09: 0006
[1.331100] R10: a523c0d0 R11: 0007 R12: 000fffe0
[1.331127] R13: 8a4ac11c5cd8 R14: 8a4ac11570c8 R15: 8a4ac11c5cd8
[1.331154] FS:  7feacb0ca8c0() GS:8a4dbf20() 
knlGS:
[1.331184] CS:  0010 DS:  ES:  CR0: 80050033
[1.331206] CR2: 000c CR3: 000117148000 CR4: 00350ef0
[1.331233] Call Trace:
[1.331245]  
[1.331255]  ? __pci_set_master+0x5f/0xe0
[1.331276]  amd_mp2_pci_probe+0xad/0x160 [amd_sfh]
[1.331298]  local_pci_probe+0x48/0x80
[1.331315]  pci_device_probe+0x105/0x1c0
[1.331333]  really_probe+0x24b/0x4c0
[1.331351]  driver_probe_device+0xf0/0x160
[1.331369]  device_driver_attach+0xab/0xb0
[1.331388]  __driver_attach+0xb2/0x140
[1.331405]  ? device_driver_attach+0xb0/0xb0
[1.331423]  bus_for_each_dev+0x7e/0xc0
[1.331440]  driver_attach+0x1e/0x20
[1.331458]  bus_add_driver+0x135/0x1f0
[1.331475]  driver_register+0x95/0xf0
[1.331492]  ? 0xc0411000
[1.331506]  __pci_register_driver+0x57/0x60
[1.331524]  amd_mp2_pci_driver_init+0x23/0x1000 [amd_sfh]
[1.331548]  do_one_initcall+0x48/0x1d0
[1.331566]  ? kmem_cache_alloc_trace+0xfb/0x240
[1.331587]  do_init_module+0x62/0x290
[1.331605]  load_module+0xa8f/0xb10
[1.331621]  __do_sys_finit_module+0xc2/0x120
[1.331641]  __x64_sys_finit_module+0x18/0x20
[1.332883]  do_syscall_64+0x61/0xb0
[1.334112]  ? fput+0x13/0x20
[1.335316]  ? ksys_mmap_pgoff+0x135/0x260
[1.336514]  ? exit_to_user_mode_prepare+0x37/0xb0
[1.337702]  ? syscall_exit_to_user_mode+0x27/0x50
[1.338877]  ? __x64_sys_mmap+0x33/0x40
[1.340036]  ? do_syscall_64+0x6e/0xb0
[1.341180]  ? do_syscall_64+0x6e/0xb0
[1.342303]  entry_SYSCALL_64_after_hwframe+0x44/0xae
[1.343422] RIP: 0033:0x7feacb66094d
[1.344527] Code: 5b 41 5c c3 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 48 89 
f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 
f0 ff ff 73 01 c3 48 8b 0d b3 64 0f 00 f7 d8 64 89 01 48
[1.345707] RSP: 002b:7ffc5c487aa8 EFLAGS: 0246 ORIG_RAX: 
0139
[1.346879] RAX: ffda RBX: 55ce67fb06d0 RCX: 7feacb66094d
[1.348048] RDX:  RSI: 7feacb7f03fe RDI: 0005
[1.349211] RBP: 0002 R08:  R09: 
[1.349613] libphy: r8169: probed
[1.350355] R10: 0005 R11: 0246 R12: 7feacb7f03fe
[1.351649] r8169 :02:00.0 eth0: RTL8168ep/8111ep, 24:4b:fe:c8:7e:6d, 
XID 502, IRQ 35
[1.352626] R13: 55ce67fc6440 R14: 55ce67fe9420 R15: 55ce67fe9760
[1.352628]  
[1.352629] Modules linked in: amd_sfh(+) i2c_hid_acpi i2c_hid r8169(+) 
xhci_pci(+) realtek i2c_piix4 xhci_pci_renesas wmi(+) video(+)
[1.353776] r8169 :02:00.0 eth0: jumbo features [frames: 9194 bytes, tx 
checksumming: ko]
[1.354912]  fjes(+) hid
[1.359502] CR2: 000c
[1.360640] ---[ end trace 98bea865e3daeb73 ]---
[1.361773] RIP: 0010:amd_sfh_hid_client_init+0x47/0x350 [amd_sfh]
[1.362911] Code: 00 53 48 83 ec 20 48 8b 5f 08 48 8b 07 48 8d b3 22 01 00 
00 4c 8d b0 c8 00 00 00 e8 23 07 00 00 45 31 c0 31 c9 ba 00 00 20 00 <89> 43 0c 
48 8d 83 68 01 00 00 48 8d bb 80 01 00 00 48 c7 c6 f0 6d
[1.364128] RSP: 0018:a523c0b939e0 EFLAGS: 00010246
[1.365338] RAX:  RBX:  RCX: 
[1.366562] RDX: 0020 RSI: c040c249 RDI: 934c
[1.367776] RBP: a523c0b93a28 R08:  R09: 0006
[1.368986] R10: a523c0d

[Kernel-packages] [Bug 1956519] Re: kernel panic after upgrading to kernel 5.13.0-23

2022-01-07 Thread Vadik Mironov
*** This bug is a duplicate of bug 1956401 ***
https://bugs.launchpad.net/bugs/1956401

Full dmesg output from 5.13.0-24 run attached

** Attachment added: "kernel_panic_linux-image-5.13.0-24-generic"
   
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1956519/+attachment/5552643/+files/kernel_panic_linux-image-5.13.0-24-generic

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1956519

Title:
  kernel panic after upgrading to kernel 5.13.0-23

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  After upgrading my son's Asus PN50 with Ubuntu 21.10 to the latest
  kernel 5.13.0-23, I am no longer able to boot it normally. Kernel
  fails with the panic halfway through the boot process (which got
  overall suspiciously slow):

  [1.359465] BUG: kernel NULL pointer dereference, address: 000c
  [1.359498] #PF: supervisor write access in kernel mode
  [1.359519] #PF: error_code(0x0002) - not-present page
  [1.359540] PGD 0 P4D 0
  [1.359553] Oops: 0002 [#1] SMP NOPTI
  [1.359569] CPU: 0 PID: 175 Comm: systemd-udevd Not tainted 
5.13.0-23-generic #23-Ubuntu
  [1.359602] Hardware name: ASUSTeK COMPUTER INC. MINIPC PN50/PN50, BIOS 
0623 05/13/2021
  [1.359632] RIP: 0010:amd_sfh_hid_client_init+0x47/0x350 [amd_sfh]
  [1.359661] Code: 00 53 48 83 ec 20 48 8b 5f 08 48 8b 07 48 8d b3 22 01 00 
00 4c 8d b0 c8 00 00 00 e8 23 07 00 00 45 31 c0 31 c9 ba 00 00 20 00 <89> 43 0c 
48 8d 83 68 01 00 00 48 8d bb 80 01 00 00 48 c7 c6 20 6d
  [1.359729] RSP: 0018:bf71c099f9d8 EFLAGS: 00010246
  [1.359750] RAX:  RBX:  RCX: 

  [1.359777] RDX: 0020 RSI: c03cd249 RDI: 
a680004c
  [1.359804] RBP: bf71c099fa20 R08:  R09: 
0006
  [1.359831] R10: bf71c0d0 R11: 0007 R12: 
000fffe0
  [1.359857] R13: 992bc3387cd8 R14: 992bc11560c8 R15: 
992bc3387cd8
  [1.359884] FS:  7ff0ec1a48c0() GS:992ebf60() 
knlGS:
  [1.359915] CS:  0010 DS:  ES:  CR0: 80050033
  [1.359937] CR2: 000c CR3: 000102fd CR4: 
00350ef0
  [1.359964] Call Trace:
  [1.359976]  ? __pci_set_master+0x5f/0xe0
  [1.359997]  amd_mp2_pci_probe+0xad/0x160 [amd_sfh]
  [1.360021]  local_pci_probe+0x48/0x80
  [1.360038]  pci_device_probe+0x105/0x1c0
  [1.360056]  really_probe+0x24b/0x4c0
  [1.360073]  driver_probe_device+0xf0/0x160
  [1.360091]  device_driver_attach+0xab/0xb0
  [1.360110]  __driver_attach+0xb2/0x140
  [1.360126]  ? device_driver_attach+0xb0/0xb0
  [1.360145]  bus_for_each_dev+0x7e/0xc0
  [1.360161]  driver_attach+0x1e/0x20
  [1.360177]  bus_add_driver+0x135/0x1f0
  [1.360194]  driver_register+0x95/0xf0
  [1.360210]  ? 0xc03d2000
  [1.360225]  __pci_register_driver+0x57/0x60
  [1.360242]  amd_mp2_pci_driver_init+0x23/0x1000 [amd_sfh]
  [1.360266]  do_one_initcall+0x48/0x1d0
  [1.360284]  ? kmem_cache_alloc_trace+0xfb/0x240
  [1.360306]  do_init_module+0x62/0x290
  [1.360323]  load_module+0xa8f/0xb10
  [1.360340]  __do_sys_finit_module+0xc2/0x120
  [1.360359]  __x64_sys_finit_module+0x18/0x20
  [1.360377]  do_syscall_64+0x61/0xb0
  [1.361638]  ? ksys_mmap_pgoff+0x135/0x260
  [1.362883]  ? exit_to_user_mode_prepare+0x37/0xb0
  [1.364121]  ? syscall_exit_to_user_mode+0x27/0x50
  [1.365343]  ? __x64_sys_mmap+0x33/0x40
  [1.366550]  ? do_syscall_64+0x6e/0xb0
  [1.367749]  ? do_syscall_64+0x6e/0xb0
  [1.368923]  ? do_syscall_64+0x6e/0xb0
  [1.370079]  ? syscall_exit_to_user_mode+0x27/0x50
  [1.371227]  ? do_syscall_64+0x6e/0xb0
  [1.372359]  ? exc_page_fault+0x8f/0x170
  [1.373478]  ? asm_exc_page_fault+0x8/0x30
  [1.374584]  entry_SYSCALL_64_after_hwframe+0x44/0xae
  [1.375684] RIP: 0033:0x7ff0ec73a94d
  [1.376767] Code: 5b 41 5c c3 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 48 89 
f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 
f0 ff ff 73 01 c3 48 8b 0d b3 64 0f 00 f7 d8 64 89 01 48
  [1.377926] RSP: 002b:7ffd00724ba8 EFLAGS: 0246 ORIG_RAX: 
0139
  [1.379076] RAX: ffda RBX: 55e130084390 RCX: 
7ff0ec73a94d
  [1.380225] RDX:  RSI: 7ff0ec8ca3fe RDI: 
0005
  [1.381363] RBP: 0002 R08:  R09: 

  [1.382488] R10: 0005 R11: 0246 R12: 
7ff0ec8ca3fe
  [1.383598] R13: 55e130083370 R14: 55e130084480 R15: 
55e130086cb0
  [1.384698] Modules linked in: ahci(+) libahci i2c_piix4(+) r8169(+) 
amd_sfh(+) i2c_hid_acpi realtek i2c_hid xhci_pci(+) xhci_pci_renesas wmi(+) 
video(+) fjes(+) hid
 

[Kernel-packages] [Bug 1956519] Re: kernel panic after upgrading to kernel 5.13.0-23

2022-01-08 Thread Vadik Mironov
Having played with it a bit more, it certainly does not look like a
solution to 1956401 is applicable here. Unless there are any concerns, I
am removing the duplicate flag and would be appreciative if anyone from
the kernel team would take a look.

Perhaps this is something brought into 5.13 with the backported patches
to amd-sfh-hid driver?

** This bug is no longer a duplicate of bug 1956401
   amdgpu hangs for 90 seconds at a time in 5.13.0-23, but 5.13.0-22 works

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1956519

Title:
  kernel panic after upgrading to kernel 5.13.0-23

Status in linux package in Ubuntu:
  Confirmed

Bug description:
  After upgrading my son's Asus PN50 with Ubuntu 21.10 to the latest
  kernel 5.13.0-23, I am no longer able to boot it normally. Kernel
  fails with the panic halfway through the boot process (which got
  overall suspiciously slow):

  [1.359465] BUG: kernel NULL pointer dereference, address: 000c
  [1.359498] #PF: supervisor write access in kernel mode
  [1.359519] #PF: error_code(0x0002) - not-present page
  [1.359540] PGD 0 P4D 0
  [1.359553] Oops: 0002 [#1] SMP NOPTI
  [1.359569] CPU: 0 PID: 175 Comm: systemd-udevd Not tainted 
5.13.0-23-generic #23-Ubuntu
  [1.359602] Hardware name: ASUSTeK COMPUTER INC. MINIPC PN50/PN50, BIOS 
0623 05/13/2021
  [1.359632] RIP: 0010:amd_sfh_hid_client_init+0x47/0x350 [amd_sfh]
  [1.359661] Code: 00 53 48 83 ec 20 48 8b 5f 08 48 8b 07 48 8d b3 22 01 00 
00 4c 8d b0 c8 00 00 00 e8 23 07 00 00 45 31 c0 31 c9 ba 00 00 20 00 <89> 43 0c 
48 8d 83 68 01 00 00 48 8d bb 80 01 00 00 48 c7 c6 20 6d
  [1.359729] RSP: 0018:bf71c099f9d8 EFLAGS: 00010246
  [1.359750] RAX:  RBX:  RCX: 

  [1.359777] RDX: 0020 RSI: c03cd249 RDI: 
a680004c
  [1.359804] RBP: bf71c099fa20 R08:  R09: 
0006
  [1.359831] R10: bf71c0d0 R11: 0007 R12: 
000fffe0
  [1.359857] R13: 992bc3387cd8 R14: 992bc11560c8 R15: 
992bc3387cd8
  [1.359884] FS:  7ff0ec1a48c0() GS:992ebf60() 
knlGS:
  [1.359915] CS:  0010 DS:  ES:  CR0: 80050033
  [1.359937] CR2: 000c CR3: 000102fd CR4: 
00350ef0
  [1.359964] Call Trace:
  [1.359976]  ? __pci_set_master+0x5f/0xe0
  [1.359997]  amd_mp2_pci_probe+0xad/0x160 [amd_sfh]
  [1.360021]  local_pci_probe+0x48/0x80
  [1.360038]  pci_device_probe+0x105/0x1c0
  [1.360056]  really_probe+0x24b/0x4c0
  [1.360073]  driver_probe_device+0xf0/0x160
  [1.360091]  device_driver_attach+0xab/0xb0
  [1.360110]  __driver_attach+0xb2/0x140
  [1.360126]  ? device_driver_attach+0xb0/0xb0
  [1.360145]  bus_for_each_dev+0x7e/0xc0
  [1.360161]  driver_attach+0x1e/0x20
  [1.360177]  bus_add_driver+0x135/0x1f0
  [1.360194]  driver_register+0x95/0xf0
  [1.360210]  ? 0xc03d2000
  [1.360225]  __pci_register_driver+0x57/0x60
  [1.360242]  amd_mp2_pci_driver_init+0x23/0x1000 [amd_sfh]
  [1.360266]  do_one_initcall+0x48/0x1d0
  [1.360284]  ? kmem_cache_alloc_trace+0xfb/0x240
  [1.360306]  do_init_module+0x62/0x290
  [1.360323]  load_module+0xa8f/0xb10
  [1.360340]  __do_sys_finit_module+0xc2/0x120
  [1.360359]  __x64_sys_finit_module+0x18/0x20
  [1.360377]  do_syscall_64+0x61/0xb0
  [1.361638]  ? ksys_mmap_pgoff+0x135/0x260
  [1.362883]  ? exit_to_user_mode_prepare+0x37/0xb0
  [1.364121]  ? syscall_exit_to_user_mode+0x27/0x50
  [1.365343]  ? __x64_sys_mmap+0x33/0x40
  [1.366550]  ? do_syscall_64+0x6e/0xb0
  [1.367749]  ? do_syscall_64+0x6e/0xb0
  [1.368923]  ? do_syscall_64+0x6e/0xb0
  [1.370079]  ? syscall_exit_to_user_mode+0x27/0x50
  [1.371227]  ? do_syscall_64+0x6e/0xb0
  [1.372359]  ? exc_page_fault+0x8f/0x170
  [1.373478]  ? asm_exc_page_fault+0x8/0x30
  [1.374584]  entry_SYSCALL_64_after_hwframe+0x44/0xae
  [1.375684] RIP: 0033:0x7ff0ec73a94d
  [1.376767] Code: 5b 41 5c c3 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 48 89 
f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 
f0 ff ff 73 01 c3 48 8b 0d b3 64 0f 00 f7 d8 64 89 01 48
  [1.377926] RSP: 002b:7ffd00724ba8 EFLAGS: 0246 ORIG_RAX: 
0139
  [1.379076] RAX: ffda RBX: 55e130084390 RCX: 
7ff0ec73a94d
  [1.380225] RDX:  RSI: 7ff0ec8ca3fe RDI: 
0005
  [1.381363] RBP: 0002 R08:  R09: 

  [1.382488] R10: 0005 R11: 0246 R12: 
7ff0ec8ca3fe
  [1.383598] R13: 55e130083370 R14: 55e130084480 R15: 
55e130086cb0
  [1.384698] Modules linked in: ahci(+

[Kernel-packages] [Bug 1956519] Re: kernel panic after upgrading to kernel 5.13.0-23

2022-01-10 Thread Vadik Mironov
Matthew, thanks a lot for your detailed analysis. I stumbled across
Evgeny's patch yesterday as a most notable change related to null ptr
handling, but totally missed the second patch from Basavaraj too. How
peculiar. Anyway, please do let me know once you have a kernel build and
I will give it a ride.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1956519

Title:
  kernel panic after upgrading to kernel 5.13.0-23

Status in linux package in Ubuntu:
  Fix Released
Status in linux source package in Impish:
  In Progress

Bug description:
  After upgrading my son's Asus PN50 with Ubuntu 21.10 to the latest
  kernel 5.13.0-23, I am no longer able to boot it normally. Kernel
  fails with the panic halfway through the boot process (which got
  overall suspiciously slow):

  [1.359465] BUG: kernel NULL pointer dereference, address: 000c
  [1.359498] #PF: supervisor write access in kernel mode
  [1.359519] #PF: error_code(0x0002) - not-present page
  [1.359540] PGD 0 P4D 0
  [1.359553] Oops: 0002 [#1] SMP NOPTI
  [1.359569] CPU: 0 PID: 175 Comm: systemd-udevd Not tainted 
5.13.0-23-generic #23-Ubuntu
  [1.359602] Hardware name: ASUSTeK COMPUTER INC. MINIPC PN50/PN50, BIOS 
0623 05/13/2021
  [1.359632] RIP: 0010:amd_sfh_hid_client_init+0x47/0x350 [amd_sfh]
  [1.359661] Code: 00 53 48 83 ec 20 48 8b 5f 08 48 8b 07 48 8d b3 22 01 00 
00 4c 8d b0 c8 00 00 00 e8 23 07 00 00 45 31 c0 31 c9 ba 00 00 20 00 <89> 43 0c 
48 8d 83 68 01 00 00 48 8d bb 80 01 00 00 48 c7 c6 20 6d
  [1.359729] RSP: 0018:bf71c099f9d8 EFLAGS: 00010246
  [1.359750] RAX:  RBX:  RCX: 

  [1.359777] RDX: 0020 RSI: c03cd249 RDI: 
a680004c
  [1.359804] RBP: bf71c099fa20 R08:  R09: 
0006
  [1.359831] R10: bf71c0d0 R11: 0007 R12: 
000fffe0
  [1.359857] R13: 992bc3387cd8 R14: 992bc11560c8 R15: 
992bc3387cd8
  [1.359884] FS:  7ff0ec1a48c0() GS:992ebf60() 
knlGS:
  [1.359915] CS:  0010 DS:  ES:  CR0: 80050033
  [1.359937] CR2: 000c CR3: 000102fd CR4: 
00350ef0
  [1.359964] Call Trace:
  [1.359976]  ? __pci_set_master+0x5f/0xe0
  [1.359997]  amd_mp2_pci_probe+0xad/0x160 [amd_sfh]
  [1.360021]  local_pci_probe+0x48/0x80
  [1.360038]  pci_device_probe+0x105/0x1c0
  [1.360056]  really_probe+0x24b/0x4c0
  [1.360073]  driver_probe_device+0xf0/0x160
  [1.360091]  device_driver_attach+0xab/0xb0
  [1.360110]  __driver_attach+0xb2/0x140
  [1.360126]  ? device_driver_attach+0xb0/0xb0
  [1.360145]  bus_for_each_dev+0x7e/0xc0
  [1.360161]  driver_attach+0x1e/0x20
  [1.360177]  bus_add_driver+0x135/0x1f0
  [1.360194]  driver_register+0x95/0xf0
  [1.360210]  ? 0xc03d2000
  [1.360225]  __pci_register_driver+0x57/0x60
  [1.360242]  amd_mp2_pci_driver_init+0x23/0x1000 [amd_sfh]
  [1.360266]  do_one_initcall+0x48/0x1d0
  [1.360284]  ? kmem_cache_alloc_trace+0xfb/0x240
  [1.360306]  do_init_module+0x62/0x290
  [1.360323]  load_module+0xa8f/0xb10
  [1.360340]  __do_sys_finit_module+0xc2/0x120
  [1.360359]  __x64_sys_finit_module+0x18/0x20
  [1.360377]  do_syscall_64+0x61/0xb0
  [1.361638]  ? ksys_mmap_pgoff+0x135/0x260
  [1.362883]  ? exit_to_user_mode_prepare+0x37/0xb0
  [1.364121]  ? syscall_exit_to_user_mode+0x27/0x50
  [1.365343]  ? __x64_sys_mmap+0x33/0x40
  [1.366550]  ? do_syscall_64+0x6e/0xb0
  [1.367749]  ? do_syscall_64+0x6e/0xb0
  [1.368923]  ? do_syscall_64+0x6e/0xb0
  [1.370079]  ? syscall_exit_to_user_mode+0x27/0x50
  [1.371227]  ? do_syscall_64+0x6e/0xb0
  [1.372359]  ? exc_page_fault+0x8f/0x170
  [1.373478]  ? asm_exc_page_fault+0x8/0x30
  [1.374584]  entry_SYSCALL_64_after_hwframe+0x44/0xae
  [1.375684] RIP: 0033:0x7ff0ec73a94d
  [1.376767] Code: 5b 41 5c c3 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 48 89 
f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 
f0 ff ff 73 01 c3 48 8b 0d b3 64 0f 00 f7 d8 64 89 01 48
  [1.377926] RSP: 002b:7ffd00724ba8 EFLAGS: 0246 ORIG_RAX: 
0139
  [1.379076] RAX: ffda RBX: 55e130084390 RCX: 
7ff0ec73a94d
  [1.380225] RDX:  RSI: 7ff0ec8ca3fe RDI: 
0005
  [1.381363] RBP: 0002 R08:  R09: 

  [1.382488] R10: 0005 R11: 0246 R12: 
7ff0ec8ca3fe
  [1.383598] R13: 55e130083370 R14: 55e130084480 R15: 
55e130086cb0
  [1.384698] Modules linked in: ahci(+) libahci i2c_piix4(+) r8169(+) 
amd_sfh(+) i2c_hid_acpi realtek i2c_hid xhci_pci(+) xhci_pci_renesas wmi(+) 

[Kernel-packages] [Bug 1956519] Re: kernel panic after upgrading to kernel 5.13.0-23

2022-01-12 Thread Vadik Mironov
Matthew, thanks a lot. I can confirm the issue is gone. There is a bunch
of preexisting errors related to the BIOS as far as I can see, but these
were present in .22 too. Please go right ahead with the patch submission
and hopefully it'll make it into .26 kernel.

vadikmironov@MINIPC-PN50:~$ uname -rv
5.13.0-23-generic #23+TEST1956519v20220112b1-Ubuntu SMP Wed Jan 12 00:24:19 UTC 
20
vadikmironov@MINIPC-PN50:~$ sudo dmesg | grep -i bug
[0.159485] ACPI BIOS Error (bug): Failure creating named object [\SMIB], 
AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.160771] ACPI BIOS Error (bug): Could not resolve symbol 
[\_SB.PCI0.M291.WLAN], AE_NOT_FOUND (20210331/dswload2-162)
[0.162718] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.VER1], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162742] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.CCI0], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162748] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.CCI1], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162753] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.CCI2], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162758] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.CCI3], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162779] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.CTL0], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162785] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.CTL1], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162790] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.CTL2], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162795] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.CTL3], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162800] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.CTL4], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162805] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.CTL5], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162811] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.CTL6], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162817] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.CTL7], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162840] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.MGI0], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162846] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.MGI1], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162852] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.MGI2], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162857] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.MGI3], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162863] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.MGI4], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162869] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.MGI5], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162874] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.MGI6], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162880] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.MGI7], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162885] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.MGI8], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162891] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.MGI9], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162897] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.MGIA], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162902] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.MGIB], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162908] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.MGIC], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162913] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.MGID], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162919] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.MGIE], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162925] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.MGIF], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162950] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.MGO0], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162956] ACPI BIOS Error (bug): Failure creating named object 
[\_SB.PCI0.SBRG.EC0.MGO1], AE_ALREADY_EXISTS (20210331/dsfield-637)
[0.162961] ACPI BIOS Error (bug): Failure creating named object 

[Kernel-packages] [Bug 1956519] Re: amd_sfh: Null pointer dereference on early device init causes early panic and fails to boot

2022-01-13 Thread Vadik Mironov
Thanks a lot Matthew. Alright, no problems at all, I'll stick to .22
kernel for now and will wait for updates.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1956519

Title:
  amd_sfh: Null pointer dereference on early device init causes early
  panic and fails to boot

Status in linux package in Ubuntu:
  Fix Released
Status in linux source package in Impish:
  In Progress

Bug description:
  BugLink: https://bugs.launchpad.net/bugs/1956519

  [Impact]

  A regression was introduced into 5.13.0-23-generic for devices using
  AMD Ryzen chipsets that incorporate AMD Sensor Fusion Hub (SFH) HID
  devices, which are mostly Ryzen based laptops, but desktops do have
  the SOC embedded as well.

  On early boot, when the driver initialises the device, it hits a null
  pointer dereference with the following stack trace:

  BUG: kernel NULL pointer dereference, address: 000c
  #PF: supervisor write access in kernel mode
  #PF: error_code(0x0002) - not-present page
  PGD 0 P4D 0
  Oops: 0002 [#1] SMP NOPTI
  CPU: 0 PID: 175 Comm: systemd-udevd Not tainted 5.13.0-23-generic #23-Ubuntu
  RIP: 0010:amd_sfh_hid_client_init+0x47/0x350 [amd_sfh]
  Call Trace:
? __pci_set_master+0x5f/0xe0
amd_mp2_pci_probe+0xad/0x160 [amd_sfh]
local_pci_probe+0x48/0x80
pci_device_probe+0x105/0x1c0
really_probe+0x24b/0x4c0
driver_probe_device+0xf0/0x160
device_driver_attach+0xab/0xb0
__driver_attach+0xb2/0x140
? device_driver_attach+0xb0/0xb0
bus_for_each_dev+0x7e/0xc0
driver_attach+0x1e/0x20
bus_add_driver+0x135/0x1f0
driver_register+0x95/0xf0
? 0xc03d2000
__pci_register_driver+0x57/0x60
amd_mp2_pci_driver_init+0x23/0x1000 [amd_sfh]
do_one_initcall+0x48/0x1d0
? kmem_cache_alloc_trace+0xfb/0x240
do_init_module+0x62/0x290
load_module+0xa8f/0xb10
__do_sys_finit_module+0xc2/0x120
__x64_sys_finit_module+0x18/0x20
do_syscall_64+0x61/0xb0
? ksys_mmap_pgoff+0x135/0x260
? exit_to_user_mode_prepare+0x37/0xb0
? syscall_exit_to_user_mode+0x27/0x50
? __x64_sys_mmap+0x33/0x40
? do_syscall_64+0x6e/0xb0
? do_syscall_64+0x6e/0xb0
? do_syscall_64+0x6e/0xb0
? syscall_exit_to_user_mode+0x27/0x50
? do_syscall_64+0x6e/0xb0
? exc_page_fault+0x8f/0x170
? asm_exc_page_fault+0x8/0x30
entry_SYSCALL_64_after_hwframe+0x44/0xae

  This causes a panic and the system is unable to continue booting, and
  the user must select an older kernel to boot.

  [Fix]

  The issue was introduced in 5.13.0-23-generic by the commit:

  commit d46ef750ed58cbeeba2d9a55c99231c30a172764
  commit-impish 56559d7910e704470ad72da58469b5588e8cbf85
  Author: Evgeny Novikov 
  Date: Tue Jun 1 19:38:01 2021 +0300
  Subject:HID: amd_sfh: Fix potential NULL pointer dereference
  Link: 
https://github.com/torvalds/linux/commit/d46ef750ed58cbeeba2d9a55c99231c30a172764

  The issue is pretty straightforward, amd_sfh_client.c attempts to
  dereference cl_data, but it is NULL:

  $ eu-addr2line -ifae 
./usr/lib/debug/lib/modules/5.13.0-23-generic/kernel/drivers/hid/amd-sfh-hid/amd_sfh.ko
 amd_sfh_hid_client_init+0x47
  0x0767
  amd_sfh_hid_client_init
  
/build/linux-k2e9CH/linux-5.13.0/drivers/hid/amd-sfh-hid/amd_sfh_client.c:147:27

  134 int amd_sfh_hid_client_init(struct amd_mp2_dev *privdata)
  135 {
  ...
  146
  147 cl_data->num_hid_devices = amd_mp2_get_sensor_num(privdata, 
&cl_data->sensor_idx[0]);
  148
  ...

  The patch moves the call to amd_sfh_hid_client_init() before
  privdata->cl_data is actually allocated by devm_kzalloc, hence cl_data
  being NULL.

  + rc = amd_sfh_hid_client_init(privdata);
  + if (rc)
  + return rc;
  +
  privdata->cl_data = devm_kzalloc(&pdev->dev, sizeof(struct 
amdtp_cl_data), GFP_KERNEL);
  if (!privdata->cl_data)
  return -ENOMEM;
  ...
  - return amd_sfh_hid_client_init(privdata);
  + return 0;

  The issue was fixed upstream in 5.15-rc4 by the commit:

  commit 88a04049c08cd62e698bc1b1af2d09574b9e0aee
  Author: Basavaraj Natikar 
  Date: Thu Sep 23 17:59:27 2021 +0530
  Subject: HID: amd_sfh: Fix potential NULL pointer dereference
  Link: 
https://github.com/torvalds/linux/commit/88a04049c08cd62e698bc1b1af2d09574b9e0aee

  The fix places the call to amd_sfh_hid_client_init() after
  privdata->cl_data is allocated, and it changes the order of
  amd_sfh_hid_client_init() to happen before devm_add_action_or_reset()
  fixing the actual null pointer dereference which caused these commits
  to exist.

  This patch also landed in 5.14.10 -stable, but it seems it was omitted
  from being backported to impish, likely due to it sharing the exact
  same subject line as the regression commit, so it was likely dropped
  as a duplicate?

  [Testcase]

  You need an AMD Ryzen based system that has a AMD Sensor Fusion Hub
  HID device built in to test this.

  Si