Bug 199383 - Removing the iGPU in the AMD Ryzen 3 2200G (via echo 1 > /sys/devices/.../remove) results in a general protection fault (and segmentation fault)
Summary: Removing the iGPU in the AMD Ryzen 3 2200G (via echo 1 > /sys/devices/.../rem...
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Console/Framebuffers (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: James Simmons
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-13 05:13 UTC by Pegasus Epsilon
Modified: 2018-04-13 05:13 UTC (History)
0 users

See Also:
Kernel Version: 4.15.15-ck
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Pegasus Epsilon 2018-04-13 05:13:35 UTC
Betting this is in the wrong "Component" group, but the descriptions aren't exactly ...descriptive... so, you get what you get.

Reminder: AMD Ryzen 3 2200G

Disabling the iGPU in the UEFI causes the kernel to panic on boot. Which is another bug entirely, but it justifies my fiddling. So I have it enabled, but I never use it. I found out you can unload devices by poking the /sys tree, so I thought I'd poke it and see what happened. Let's all watch together!

pegasus@lithium:~$ sudo -s
[lithium ~]# echo 1 > "/sys/devices/pci<long path redacted>/remove

...Hang? No. Wait for iiiiiiiit...

Segmentation fault
pegasus@lithium:~$ _

Wait, this is the shell that spawned sudo...Well that doesn't seem right at all. Welp, time to file a bug report. So, have some relevant dmesg output.

[35291.713389] [drm] amdgpu: finishing device.
[35300.707240] general protection fault: 0000 [#1] PREEMPT SMP NOPTI
[35300.707244] Modules linked in: nls_utf8 ntfs cfg80211 rfkill snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec_hdmi ext4 edac_mce_amd crc16 mbcache jbd2 fscrypto kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc amdkfd amd_iommu_v2 aesni_intel aes_x86_64 snd_hda_intel crypto_simd amdgpu glue_helper pcspkr cryptd chash ppdev i2c_algo_bit snd_hda_codec ttm r8712u(C) wmi_bmof input_leds led_class snd_hda_core r8169 drm_kms_helper snd_hwdep evdev mousedev mii drm snd_pcm snd_timer snd agpgart soundcore syscopyarea parport_pc parport mac_hid sysfillrect sysimgblt fb_sys_fops wmi pinctrl_amd rtc_cmos shpchp acpi_cpufreq sp5100_tco i2c_piix4 btrfs xor zstd_decompress zstd_compress xxhash raid6_pq sr_mod cdrom sd_mod uas usb_storage hid_generic usbhid hid serio_raw atkbd libps2
[35300.707286]  ahci libahci xhci_pci crc32c_intel libata xhci_hcd usbcore scsi_mod usb_common i8042 serio
[35300.707294] CPU: 1 PID: 9694 Comm: bash Tainted: G         C       4.15.15-1-ck #1
[35300.707295] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./A320M-DGS, BIOS P4.40 01/03/2018
[35300.707337] RIP: 0010:destroy+0x1f/0xb0 [amdgpu]
[35300.707338] RSP: 0018:ffff9a3d0c6d3c30 EFLAGS: 00010282
[35300.707340] RAX: 82a1aaa99d8821ae RBX: ffff95d1b52f5b40 RCX: 000000010020000c
[35300.707342] RDX: 000000010020000d RSI: 0000000000005412 RDI: ffff95d1b4aec320
[35300.707343] RBP: ffff95d1b396bd90 R08: 0000000000000001 R09: ffffffffc082e91b
[35300.707344] R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000004
[35300.707345] R13: ffff95d1ac1d2f48 R14: 0000000000000000 R15: ffff95d10e95e020
[35300.707347] FS:  00007fd772e12b80(0000) GS:ffff95d1bec40000(0000) knlGS:0000000000000000
[35300.707349] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[35300.707350] CR2: 00007f15db501010 CR3: 000000000170c000 CR4: 00000000003406e0
[35300.707351] DR0: 000000000041bc67 DR1: 0000000000000000 DR2: 0000000000000000
[35300.707353] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600
[35300.707354] Call Trace:
[35300.707395]  dal_i2caux_destruct+0x6f/0xb0 [amdgpu]
[35300.707432]  destroy+0x15/0x30 [amdgpu]
[35300.707468]  dal_i2caux_destroy+0x22/0x30 [amdgpu]
[35300.707503]  destruct+0x8e/0x140 [amdgpu]
[35300.707537]  dc_destroy+0x11/0x30 [amdgpu]
[35300.707575]  dm_hw_fini+0x1e/0x30 [amdgpu]
[35300.707600]  amdgpu_fini+0x9f/0x310 [amdgpu]
[35300.707626]  amdgpu_device_fini+0x64/0x1e0 [amdgpu]
[35300.707651]  amdgpu_driver_unload_kms+0x4a/0x90 [amdgpu]
[35300.707662]  drm_dev_unregister+0x3f/0xe0 [drm]
[35300.707688]  amdgpu_pci_remove+0x19/0x40 [amdgpu]
[35300.707692]  pci_device_remove+0x3b/0xb0
[35300.707696]  device_release_driver_internal+0x15a/0x220
[35300.707699]  pci_stop_bus_device+0x7d/0xa0
[35300.707702]  pci_stop_and_remove_bus_device_locked+0x16/0x30
[35300.707704]  remove_store+0x75/0x90
[35300.707708]  kernfs_fop_write+0x10f/0x190
[35300.707711]  __vfs_write+0x36/0x180
[35300.707715]  ? preempt_count_add+0x49/0xa0
[35300.707716]  ? preempt_count_add+0x68/0xa0
[35300.707719]  ? _raw_spin_lock+0x13/0x40
[35300.707722]  ? set_close_on_exec+0x30/0x70
[35300.707724]  vfs_write+0xa9/0x190
[35300.707726]  SyS_write+0x52/0xc0
[35300.707730]  do_syscall_64+0x74/0x190
[35300.707732]  entry_SYSCALL_64_after_hwframe+0x3d/0xa2
[35300.707734] RIP: 0033:0x7fd7724fc444
[35300.707735] RSP: 002b:00007ffed7fd39a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[35300.707737] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007fd7724fc444
[35300.707738] RDX: 0000000000000002 RSI: 000055c0e1982de0 RDI: 0000000000000001
[35300.707739] RBP: 000055c0e1982de0 R08: 000000000000000a R09: 00007fd77254bd10
[35300.707741] R10: 000000000000000a R11: 0000000000000246 R12: 0000000000000002
[35300.707742] R13: 0000000000000001 R14: 00007fd7727c75c0 R15: 0000000000000002
[35300.707744] Code: e8 87 e0 04 00 58 5b c3 0f 1f 40 00 0f 1f 44 00 00 55 53 48 89 fd 48 8b 1f 48 8b 43 10 48 8b 78 18 48 8b 43 30 8b 70 04 48 8b 07 <48> 8b 40 30 e8 78 ce 1c e0 48 8b 53 30 41 b9 00 00 00 02 41 b8 
[35300.707802] RIP: destroy+0x1f/0xb0 [amdgpu] RSP: ffff9a3d0c6d3c30
[35300.707808] ---[ end trace aed9b664c77fe9f9 ]---

Note You need to log in before you can comment on or make changes to this bug.