unbinding igb driver causes general protection fault

Bug #1865280 reported by Péter Molnár
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux-signed (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I have a pci passthrough setup. I want to passthrough an Intel I210 Gigabit controller (igb driver) to a VM.

I got general protection fault after issuing the following command:
echo 0000:06:00.0 > /sys/bus/pci/devices/0000:06:00.0/driver/unbind

It works with 4.15.0-76-generic kernel and it does not work with 4.15.0-88-generic kernel.

# lsb_release -rd
Description: Ubuntu 18.04.1 LTS
Release: 18.04

# uname -r
4.15.0-88-generic

# lspci
00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)
00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05)
00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 05)
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)
00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d5)
00:1c.1 PCI bridge: Intel Corporation 82801 PCI Bridge (rev d5)
00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d5)
00:1c.3 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 (rev d5)
00:1c.4 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 (rev d5)
00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 05)
00:1f.0 ISA bridge: Intel Corporation C226 Series Chipset Family Server Advanced SKU LPC Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 05)
00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05)
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Oland PRO [Radeon R7 240/340]
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde/Pitcairn HDMI Audio [Radeon HD 7700/7800 Series]
03:00.0 PCI bridge: ASMedia Technology Inc. ASM1083/1085 PCIe to PCI Bridge (rev 04)
04:02.0 FireWire (IEEE 1394): VIA Technologies, Inc. VT6306/7/8 [Fire II(M)] IEEE 1394 OHCI Controller (rev c0)
05:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03)
06:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03)
07:00.0 Network controller: Qualcomm Atheros AR93xx Wireless Network Adapter (rev 01)

kernel log:
[ 41.772488] general protection fault: 0000 [#1] SMP PTI
[ 41.778675] Modules linked in: xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp ebtable_filter ebtables ip6table_filter ip6_tables devlink iptable_filter 8021q garp mrp bridge stp llc btrfs zstd_compress intel_rapl btusb btrtl btbcm btintel bluetooth x86_pkg_temp_thermal intel_powerclamp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc aesni_intel ecdh_generic joydev input_leds aes_x86_64 snd_hda_intel crypto_simd glue_helper cryptd wmi_bmof intel_cstate intel_rapl_perf eeepc_wmi snd_hda_codec asus_wmi sparse_keymap snd_seq_midi snd_seq_midi_event snd_hda_core snd_rawmidi snd_hwdep snd_pcm snd_seq snd_seq_device snd_timer mei_me snd mei soundcore lpc_ich
[ 41.853566] shpchp mac_hid sch_fq_codel coretemp nct6775 hwmon_vid kvm_intel kvm vfio_pci vfio_virqfd irqbypass vfio_iommu_type1 vfio sunrpc ip_tables x_tables autofs4 raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor
async_tx xor raid6_pq libcrc32c raid0 multipath linear pci_stub raid1 hid_logitech_hidpp hid_logitech_dj hid_generic usbhid hid chash i915 igb ttm mxm_wmi drm_kms_helper dca syscopyarea firewire_ohci i2c_algo_bit sysfillrect ahci ptp sysimgblt libahci fb_sys_fops pps_core firewire_core drm crc_itu_t video wmi
[ 41.904435] CPU: 3 PID: 2790 Comm: poseidon.sh Not tainted 4.15.0-88-generic #88-Ubuntu
[ 41.913432] Hardware name: ASUS All Series/P9D WS, BIOS 2004 06/05/2014
[ 41.920702] RIP: 0010:remove_files.isra.1+0x24/0x70
[ 41.926232] RSP: 0018:ffffb8b4c3d7bc00 EFLAGS: 00010282
[ 41.932475] RAX: e88b0be7d5088cbc RBX: ffff9f5f45cbaa00 RCX: 0000000000000000
[ 41.940282] RDX: ffff9f5f40fd3488 RSI: ffff9f5f45cbaa00 RDI: ffff9f5f3faa0cc0
[ 41.948080] RBP: ffffb8b4c3d7bc18 R08: 0000000000000000 R09: ffff9f5f3faa0128
[ 41.955857] R10: ffffb8b4c3d7bc10 R11: 0000000000000000 R12: ffff9f5f3faa0cc0
[ 41.963640] R13: ffff9f5f40fd3488 R14: 0000000000000000 R15: 0000000000000060
[ 41.971400] FS: 00007f39620a0740(0000) GS:ffff9f5f6fb80000(0000) knlGS:0000000000000000
[ 41.980154] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 41.986507] CR2: 000056197bc86678 CR3: 0000000806b68005 CR4: 00000000001606e0
[ 41.994253] Call Trace:
[ 41.997311] sysfs_remove_group+0x44/0x90
[ 42.001930] sysfs_remove_groups+0x2e/0x50
[ 42.006627] device_remove_attrs+0x47/0x80
[ 42.011313] device_del+0x161/0x3b0
[ 42.015389] cdev_device_del+0x1a/0x40
[ 42.019737] posix_clock_unregister+0x26/0x50
[ 42.024707] ptp_clock_unregister+0x72/0x80 [ptp]
[ 42.030012] igb_ptp_stop+0x23/0x50 [igb]
[ 42.034941] igb_remove+0x4b/0x170 [igb]
[ 42.039767] pci_device_remove+0x3e/0xb0
[ 42.044292] device_release_driver_internal+0x13a/0x220
[ 42.050102] device_release_driver+0x12/0x20
[ 42.054943] unbind_store+0x87/0x150
[ 42.059089] drv_attr_store+0x27/0x40
[ 42.063337] sysfs_kf_write+0x3c/0x50
[ 42.067569] kernfs_fop_write+0x125/0x1a0
[ 42.072463] __vfs_write+0x1b/0x40
[ 42.076720] vfs_write+0xb1/0x1a0
[ 42.080890] SyS_write+0x5c/0xe0
[ 42.084710] do_syscall_64+0x73/0x130
[ 42.088912] entry_SYSCALL_64_after_hwframe+0x3d/0xa2
[ 42.094487] RIP: 0033:0x7f396177d154
[ 42.098606] RSP: 002b:00007ffdff8d9058 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[ 42.106680] RAX: ffffffffffffffda RBX: 000000000000000d RCX: 00007f396177d154
[ 42.114314] RDX: 000000000000000d RSI: 0000563c2fd7ed90 RDI: 0000000000000001
[ 42.122240] RBP: 0000563c2fd7ed90 R08: 000000000000000a R09: 000000000000000c
[ 42.130111] R10: 000000000000000a R11: 0000000000000246 R12: 00007f3961a59760
[ 42.138010] R13: 000000000000000d R14: 00007f3961a552a0 R15: 00007f3961a54760
[ 42.145872] Code: 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 48 85 f6 48 89 e5 41 55 41 54 49 89 d5 53 49 89 fc 74 24 48 8b 06 48 89 f3 48 85 c0 74 19 <48> 8b 30 31 d2 48 83 c3 08 4c 89 e7 e8 bb d4 ff ff 48 8b 03 48
[ 42.166186] RIP: remove_files.isra.1+0x24/0x70 RSP: ffffb8b4c3d7bc00
[ 42.173303] ---[ end trace d135b8103eed5dd7 ]---

Possibly similar issues:
https://bugzilla.kernel.org/show_bug.cgi?id=206133
https://forum.proxmox.com/threads/pve-kernel-5-3-18-1-breaks-pci-passthrough.65104/

Péter Molnár (empece)
tags: added: regression-update
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux-signed (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.