On Tue, 22 Aug 2023 08:31:34 +0900 Takashi Yano wrote: > I have tried another kernel: > linux-image-6.1.0-0.deb11.9-686-pae-unsigned 6.1.27-1~bpo11+1 : NG > > The built date are: > linux-image-6.1.0-0.deb11.7-686-pae 2023-05-22 11:37 > linux-image-6.1.0-0.deb11.9-686-pae-unsigned 2023-07-18 17:29 > > It seems that the recent (in a few months) change in the kernel causes > this issue.
I have narrowed down the code change which causes the issue by building kernel locally again and again. The issue happens after the chage: linux (6.1.25-1) unstable; urgency=medium - ALSA: ymfpci: Create card with device-managed snd_devm_card_new() diff --git a/linux-source-6.1/sound/pci/ymfpci/ymfpci.c b/linux-source-6.1/sound/pci/ymfpci/ymfpci.c index 1e198e4..82d4e0f 100644 --- a/linux-source-6.1/sound/pci/ymfpci/ymfpci.c +++ b/linux-source-6.1/sound/pci/ymfpci/ymfpci.c @@ -170,7 +170,7 @@ static int snd_card_ymfpci_probe(struct pci_dev *pci, return -ENOENT; } - err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, + err = snd_devm_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, sizeof(*chip), &card); if (err < 0) return err; I also noticed that the following error occurred in the boot process with this change. [ 24.101852] snd_ymfpci 0000:00:0e.0: firmware: failed to load yamaha/ds1_dsp.fw (-2) [ 24.101931] firmware_class: See https://wiki.debian.org/Firmware for information about missing firmware [ 24.102001] snd_ymfpci 0000:00:0e.0: firmware: failed to load yamaha/ds1_dsp.fw (-2) [ 24.102031] snd_ymfpci 0000:00:0e.0: Direct firmware load for yamaha/ds1_dsp.fw failed with error -2 [ 24.102049] snd_ymfpci 0000:00:0e.0: firmware request failed: -2 [ 24.102077] snd_ymfpci: probe of 0000:00:0e.0 failed with error -2 [ 24.102435] BUG: unable to handle page fault for address: f0da8084 [ 24.102465] #PF: supervisor write access in kernel mode [ 24.102486] #PF: error_code(0x0002) - not-present page [ 24.102507] *pdpt = 0000000006bd0001 *pde = 000000000237a067 *pte = 0000000000000000 [ 24.102544] Oops: 0002 [#1] PREEMPT SMP PTI [ 24.102568] CPU: 0 PID: 247 Comm: (udev-worker) Not tainted 6.1.27 #3 [ 24.102594] Hardware name: MICRO-STAR INTERNATIONAL CO., LTD MS-6163/MS-6163 (i440BX), BIOS 4.51 PG 08/22/00 [ 24.102623] EIP: snd_ymfpci_free+0x1b/0x130 [snd_ymfpci] [ 24.102684] Code: b8 01 00 00 00 5b 5e 5f 5d c3 8d 74 26 00 90 3e 8d 74 26 00 55 89 e5 56 53 8b 98 88 01 00 00 8b 43 10 8d 90 84 00 00 00 31 c0 <89> 02 8b 73 10 89 86 b0 00 00 00 8b 4b 10 89 81 80 00 00 00 b9 ff [ 24.102730] EAX: 00000000 EBX: c4d0a610 ECX: 0005f320 EDX: f0da8084 [ 24.102754] ESI: c4d0a018 EDI: cfcd780c EBP: c792fc44 ESP: c792fc3c [ 24.102778] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 EFLAGS: 00210246 [ 24.102803] CR0: 80050033 CR2: f0da8084 CR3: 06bc8000 CR4: 000006f0 [ 24.102828] Call Trace: [ 24.102853] release_card_device+0x47/0x90 [snd] [ 24.102911] device_release+0x30/0x90 [ 24.102953] kobject_put+0x99/0x1d0 [ 24.102987] put_device+0x11/0x20 [ 24.103009] __snd_card_release+0x71/0x80 [snd] [ 24.103043] release_nodes+0x43/0xb0 [ 24.103068] devres_release_all+0x79/0xb0 [ 24.103094] device_unbind_cleanup+0x10/0x60 [ 24.103125] really_probe+0x1f6/0x340 [ 24.103150] __driver_probe_device+0x75/0x100 [ 24.103175] driver_probe_device+0x1f/0x90 [ 24.103199] __driver_attach+0xcf/0x1b0 [ 24.103223] ? __device_attach_driver+0x100/0x100 [ 24.103248] bus_for_each_dev+0x5b/0xa0 [ 24.103272] driver_attach+0x19/0x20 [ 24.103293] ? __device_attach_driver+0x100/0x100 [ 24.103317] bus_add_driver+0x17f/0x1e0 [ 24.103340] driver_register+0x79/0xd0 [ 24.103364] ? 0xf0d3a000 [ 24.103383] __pci_register_driver+0x42/0x50 [ 24.103421] ymfpci_driver_init+0x1c/0x1000 [snd_ymfpci] [ 24.103458] do_one_initcall+0x41/0x1e0 [ 24.103482] ? kvfree+0x25/0x30 [ 24.103518] ? __kmem_cache_alloc_node+0x24d/0x350 [ 24.103546] ? kmalloc_trace+0x22/0x90 [ 24.103581] ? do_init_module+0x21/0x1e0 [ 24.103606] do_init_module+0x43/0x1e0 [ 24.103628] load_module+0x1a97/0x1ca0 [ 24.103661] __ia32_sys_finit_module+0xa7/0x110 [ 24.103692] __do_fast_syscall_32+0x68/0xb0 [ 24.103720] ? __do_fast_syscall_32+0x72/0xb0 [ 24.103742] ? __do_fast_syscall_32+0x72/0xb0 [ 24.103764] ? __do_fast_syscall_32+0x72/0xb0 [ 24.103787] ? irqentry_exit_to_user_mode+0x8/0x20 [ 24.103817] do_fast_syscall_32+0x29/0x60 [ 24.103839] do_SYSENTER_32+0x15/0x20 [ 24.103861] entry_SYSENTER_32+0x98/0xf1 [ 24.103892] EIP: 0xb7f89549 [ 24.103911] Code: 03 74 c0 01 10 05 03 74 b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d 76 00 58 b8 77 00 00 00 cd 80 90 8d 76 [ 24.103956] EAX: ffffffda EBX: 0000001a ECX: b7f6be09 EDX: 00000000 [ 24.103983] ESI: 00f31910 EDI: 00f341f0 EBP: 00000000 ESP: bff1561c [ 24.104007] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b EFLAGS: 00200292 [ 24.104036] Modules linked in: snd_ymfpci(+) snd_ac97_codec ac97_bus saa7134 snd_mpu401_uart snd_opl3_lib snd_hwdep tveeprom videobuf2_dma_sg gameport ppdev snd_rawmidi videobuf2_memops videobuf2_v4l2 snd_seq_device videobuf2_common snd_pcm snd_timer videodev snd pcspkr soundcore mc parport_pc parport evdev serio_raw sg loop fuse dm_mod efi_pstore dax configfs ip_tables x_tables autofs4 ext4 crc16 mbcache jbd2 crc32c_generic sil164 nouveau hid_generic mxm_wmi sd_mod video usbhid t10_pi wmi hid i2c_algo_bit drm_display_helper crc64_rocksoft crc64 cec crc_t10dif rc_core sr_mod crct10dif_generic crct10dif_common drm_ttm_helper cdrom ttm ata_generic drm_kms_helper ata_piix ohci_pci uhci_hcd ohci_hcd ehci_pci libata ehci_hcd drm usbcore scsi_mod psmouse e1000 i2c_piix4 scsi_common usb_common floppy button fan [ 24.105590] CR2: 00000000f0da8084 [ 24.105590] ---[ end trace 0000000000000000 ]--- [ 24.105590] EIP: snd_ymfpci_free+0x1b/0x130 [snd_ymfpci] [ 24.105590] Code: b8 01 00 00 00 5b 5e 5f 5d c3 8d 74 26 00 90 3e 8d 74 26 00 55 89 e5 56 53 8b 98 88 01 00 00 8b 43 10 8d 90 84 00 00 00 31 c0 <89> 02 8b 73 10 89 86 b0 00 00 00 8b 4b 10 89 81 80 00 00 00 b9 ff [ 24.105590] EAX: 00000000 EBX: c4d0a610 ECX: 0005f320 EDX: f0da8084 [ 24.105590] ESI: c4d0a018 EDI: cfcd780c EBP: c792fc44 ESP: c792fc3c [ 24.105590] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 EFLAGS: 00210246 [ 24.105590] CR0: 80050033 CR2: f0da8084 CR3: 06bc8000 CR4: 000006f0 [ 24.105590] note: (udev-worker)[247] exited with irqs disabled 1) For what is this code change? 2) What is supposed to happen if this change is reverted? 3) Is snd_ymfpci_free() compatible with snd_devm_card_new()? -- Takashi Yano <takashi.y...@nifty.ne.jp>