Skip to content

[Bug][BYT] unload /reload audio module failure. #1059

@Jiangxinx

Description

@Jiangxinx

Describe the bug
Can not Removing snd_soc_sst_bytcr_rt5651 while doing load/reload test on byt-rt5651 platform.

To Reproduce
1.sudo ./sof_bootone.sh

Actual result

platform=[byt],codec_module=[snd_soc_rt5651],ignore_error=[no]
Skipping sof_pci_dev, not loaded
Removing sof_acpi_dev
./sof_remove.sh: line 2:  1726 Killed                  rmmod $module
Removing snd_sof_intel_byt
rmmod: ERROR: Module snd_sof_intel_byt is in use by: sof_acpi_dev
Skipping snd_sof_intel_hsw, not loaded
Removing snd_sof_intel_bdw
rmmod: ERROR: Module snd_sof_intel_bdw is in use by: sof_acpi_dev
Skipping snd_sof_intel_hda_common, not loaded
Skipping snd_sof_intel_hda, not loaded
Removing snd_sof_xtensa_dsp
rmmod: ERROR: Module snd_sof_xtensa_dsp is in use by: sof_acpi_dev
Removing snd_soc_acpi_intel_match
rmmod: ERROR: Module snd_soc_acpi_intel_match is in use by: sof_acpi_dev
Skipping snd_soc_sst_bytcr_rt5640, not loaded
Removing snd_soc_sst_bytcr_rt5651

dmesg

[   73.175250] BUG: kernel NULL pointer dereference, address: 0000000000000040
[   73.175258] #PF: supervisor read access in kernel mode
[   73.175261] #PF: error_code(0x0000) - not-present page
[   73.175263] PGD 0 P4D 0
[   73.175268] Oops: 0000 [#1] SMP PTI
[   73.175273] CPU: 3 PID: 1726 Comm: rmmod Not tainted 5.2.0-rc3-daily-20190625 #3
[   73.175276] Hardware name: ADI Minnowboard Turbot D0 PLATFORM/MinnowBoard Turbot, BIOS MNW2MAX1.X64.0097.R01.1709211052 09/21/2017
[   73.175283] RIP: 0010:rt5651_set_jack+0x181/0x2d0 [snd_soc_rt5651]
[   73.175288] Code: 13 f0 31 c0 5b 5d 41 5c c3 8b bb b8 00 00 00 e8 85 4d 17 f0 48 8d 7b 20 e8 fc de 13 f0 48 8d 7b 40 e8 03 df 13 f0 48 8b 43 10 <f6> 40 40 02 74 44 48 83 7b 18 00 75 3d 48 8b 45 18 ba 00 80 00 00
[   73.175291] RSP: 0018:ffffb9c501437cc8 EFLAGS: 00010282
[   73.175294] RAX: 0000000000000000 RBX: ffff9e9436486828 RCX: 0000000000000000
[   73.175297] RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff9e9436486868
[   73.175300] RBP: ffff9e943683d828 R08: ffff9e947728d240 R09: ffff9e947728d380
[   73.175302] R10: 0000000000000000 R11: ffffffffb1847968 R12: 0000000000000000
[   73.175305] R13: ffffffffc05b10c0 R14: 0000000000000001 R15: ffffffffb15bdf17
[   73.175308] FS:  00007fe4cea31540(0000) GS:ffff9e9474b80000(0000) knlGS:0000000000000000
[   73.175311] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   73.175314] CR2: 0000000000000040 CR3: 000000003e0fe000 CR4: 00000000001006e0
[   73.175316] Call Trace:
[   73.175330]  soc_cleanup_component+0xd/0x80 [snd_soc_core]
[   73.175340]  soc_remove_link_components.isra.50+0x4e/0x70 [snd_soc_core]
[   73.175349]  snd_soc_unbind_card.part.56+0x75/0xf0 [snd_soc_core]
[   73.175358]  snd_soc_unregister_card+0x74/0x80 [snd_soc_core]
[   73.175365]  release_nodes+0x121/0x220
[   73.175372]  device_release_driver_internal+0xe3/0x1b0
[   73.175376]  bus_remove_device+0xd6/0x140
[   73.175381]  device_del+0x152/0x370
[   73.175386]  platform_device_del.part.14+0xe/0x60
[   73.175390]  platform_device_unregister+0x17/0x30
[   73.175397]  snd_sof_device_remove+0x50/0x90 [snd_sof]
[   73.175403]  sof_acpi_remove+0x23/0x30 [sof_acpi_dev]
[   73.175407]  platform_drv_remove+0x1b/0x40
[   73.175412]  device_release_driver_internal+0xd3/0x1b0
[   73.175416]  driver_detach+0x37/0x70
[   73.175420]  bus_remove_driver+0x4c/0xc0
[   73.175426]  __x64_sys_delete_module+0x155/0x240
[   73.175432]  do_syscall_64+0x43/0x120
[   73.175437]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[   73.175441] RIP: 0033:0x7fe4ce54f1b7
[   73.175445] Code: 73 01 c3 48 8b 0d d1 8c 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 b0 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d a1 8c 2c 00 f7 d8 64 89 01 48
[   73.175448] RSP: 002b:00007fff4b755738 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0
[   73.175452] RAX: ffffffffffffffda RBX: 00007fff4b755798 RCX: 00007fe4ce54f1b7
[   73.175454] RDX: 000000000000000a RSI: 0000000000000800 RDI: 000055871125d808
[   73.175457] RBP: 000055871125d7a0 R08: 00007fff4b7546b1 R09: 0000000000000000
[   73.175460] R10: 00007fe4ce5cbcc0 R11: 0000000000000206 R12: 00007fff4b755960
[   73.175462] R13: 00007fff4b7567e3 R14: 000055871125c260 R15: 000055871125d7a0
[   73.175465] Modules linked in: snd_soc_sst_bytcr_rt5651 sof_acpi_dev(-) snd_sof_intel_byt snd_soc_acpi_intel_match snd_sof_intel_bdw snd_sof_intel_ipc snd_sof snd_seq_midi snd_sof_xtensa_dsp snd_soc_rt5651 snd_seq_midi_event snd_soc_rl6231 snd_soc_acpi snd_rawmidi intel_soc_dts_thermal snd_soc_core snd_seq intel_soc_dts_iosf snd_pcm snd_seq_device intel_powerclamp snd_timer snd mei_txe soundcore mei efivarfs mmc_block i915 drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops igb xhci_pci i2c_algo_bit drm xhci_hcd sdhci_acpi sdhci
[   73.175495] CR2: 0000000000000040
[   73.175561] ---[ end trace be2bdbe1b6fd1ff8 ]---
[   73.175577] RIP: 0010:rt5651_set_jack+0x181/0x2d0 [snd_soc_rt5651]
[   73.175590] Code: 13 f0 31 c0 5b 5d 41 5c c3 8b bb b8 00 00 00 e8 85 4d 17 f0 48 8d 7b 20 e8 fc de 13 f0 48 8d 7b 40 e8 03 df 13 f0 48 8b 43 10 <f6> 40 40 02 74 44 48 83 7b 18 00 75 3d 48 8b 45 18 ba 00 80 00 00
[   73.175602] RSP: 0018:ffffb9c501437cc8 EFLAGS: 00010282
[   73.175617] RAX: 0000000000000000 RBX: ffff9e9436486828 RCX: 0000000000000000
[   73.175629] RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff9e9436486868
[   73.175642] RBP: ffff9e943683d828 R08: ffff9e947728d240 R09: ffff9e947728d380
[   73.175654] R10: 0000000000000000 R11: ffffffffb1847968 R12: 0000000000000000
[   73.175667] R13: ffffffffc05b10c0 R14: 0000000000000001 R15: ffffffffb15bdf17
[   73.175682] FS:  00007fe4cea31540(0000) GS:ffff9e9474b80000(0000) knlGS:0000000000000000
[   73.175695] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   73.175707] CR2: 0000000000000040 CR3: 000000003e0fe000 CR4: 00000000001006e0

bisect result
Caused by topic/sof-dev (#1018).

Environment
Firmware: 25bbc9f5 https://github.com/thesofproject/sof/commits/master
Kernel: 0087d4a https://github.com/thesofproject/linux/commits/topic/sof-dev
Topology: sof-byt-rt5651.tplg

error log
dmesg.log

Metadata

Metadata

Assignees

Labels

BYTApplies to Baytrail platformP1Blocker bugs or important featuresbugSomething isn't workingdriver unload/reloadObserved when unloading/reloading kernel driver modules

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions