[Bug 1843487] Re: UIO: mutex used in interrupt handler causes crash
** Changed in: linux (Ubuntu) Status: In Progress => Invalid -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1843487 Title: UIO: mutex used in interrupt handler causes crash To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1843487/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1843487] Re: UIO: mutex used in interrupt handler causes crash
This bug was fixed in the package linux - 4.15.0-72.81 --- linux (4.15.0-72.81) bionic; urgency=medium * bionic/linux: 4.15.0-72.81 -proposed tracker (LP: #1854027) * [Regression] Bionic kernel 4.15.0-71.80 can not boot on ThunderX (LP: #1853326) - Revert "arm64: Use firmware to detect CPUs that are not affected by Spectre-v2" - Revert "arm64: Get rid of __smccc_workaround_1_hvc_*" * [Regression] Bionic kernel 4.15.0-71.80 can not boot on ThunderX2 and Kunpeng920 (LP: #1852723) - SAUCE: arm64: capabilities: Move setup_boot_cpu_capabilities() call to correct place linux (4.15.0-71.80) bionic; urgency=medium * bionic/linux: 4.15.0-71.80 -proposed tracker (LP: #1852289) * Bionic update: upstream stable patchset 2019-10-29 (LP: #1850541) - panic: ensure preemption is disabled during panic() - f2fs: use EINVAL for superblock with invalid magic - [Config] updateconfigs for USB_RIO500 - USB: rio500: Remove Rio 500 kernel driver - USB: yurex: Don't retry on unexpected errors - USB: yurex: fix NULL-derefs on disconnect - USB: usb-skeleton: fix runtime PM after driver unbind - USB: usb-skeleton: fix NULL-deref on disconnect - xhci: Fix false warning message about wrong bounce buffer write length - xhci: Prevent device initiated U1/U2 link pm if exit latency is too long - xhci: Check all endpoints for LPM timeout - usb: xhci: wait for CNR controller not ready bit in xhci resume - USB: adutux: fix use-after-free on disconnect - USB: adutux: fix NULL-derefs on disconnect - USB: adutux: fix use-after-free on release - USB: iowarrior: fix use-after-free on disconnect - USB: iowarrior: fix use-after-free on release - USB: iowarrior: fix use-after-free after driver unbind - USB: usblp: fix runtime PM after driver unbind - USB: chaoskey: fix use-after-free on release - USB: ldusb: fix NULL-derefs on driver unbind - serial: uartlite: fix exit path null pointer - USB: serial: keyspan: fix NULL-derefs on open() and write() - USB: serial: ftdi_sio: add device IDs for Sienna and Echelon PL-20 - USB: serial: option: add Telit FN980 compositions - USB: serial: option: add support for Cinterion CLS8 devices - USB: serial: fix runtime PM after driver unbind - USB: usblcd: fix I/O after disconnect - USB: microtek: fix info-leak at probe - USB: dummy-hcd: fix power budget for SuperSpeed mode - usb: renesas_usbhs: gadget: Do not discard queues in usb_ep_set_{halt,wedge}() - usb: renesas_usbhs: gadget: Fix usb_ep_set_{halt,wedge}() behavior - USB: legousbtower: fix slab info leak at probe - USB: legousbtower: fix deadlock on disconnect - USB: legousbtower: fix potential NULL-deref on disconnect - USB: legousbtower: fix open after failed reset request - USB: legousbtower: fix use-after-free on release - staging: vt6655: Fix memory leak in vt6655_probe - iio: adc: ad799x: fix probe error handling - iio: adc: axp288: Override TS pin bias current for some models - iio: light: opt3001: fix mutex unlock race - efivar/ssdt: Don't iterate over EFI vars if no SSDT override was specified - perf llvm: Don't access out-of-scope array - perf inject jit: Fix JIT_CODE_MOVE filename - CIFS: Gracefully handle QueryInfo errors during open - CIFS: Force revalidate inode when dentry is stale - CIFS: Force reval dentry if LOOKUP_REVAL flag is set - kernel/sysctl.c: do not override max_threads provided by userspace - firmware: google: increment VPD key_len properly - gpiolib: don't clear FLAG_IS_OUT when emulating open-drain/open-source - Staging: fbtft: fix memory leak in fbtft_framebuffer_alloc - iio: hx711: add delay until DOUT is ready - iio: adc: hx711: fix bug in sampling of data - btrfs: fix incorrect updating of log root tree - NFS: Fix O_DIRECT accounting of number of bytes read/written - MIPS: Disable Loongson MMI instructions for kernel build - Fix the locking in dcache_readdir() and friends - media: stkwebcam: fix runtime PM after driver unbind - tracing/hwlat: Report total time spent in all NMIs during the sample - tracing/hwlat: Don't ignore outer-loop duration when calculating max_latency - ftrace: Get a reference counter for the trace_array on filter files - tracing: Get trace_array reference for available_tracers files - x86/asm: Fix MWAITX C-state hint value - iio: adc: stm32-adc: fix a race when using several adcs with dma and irq - cifs: use cifsInodeInfo->open_file_lock while iterating to avoid a panic - btrfs: fix uninitialized ret in ref-verify - arm64/sve: Fix wrong free for task->thread.sve_state - [Config] updateconfigs for USB_RIO500 * Bionic update: upstream stable patchset 2019-11-13 (LP: #1852492) - zram: fix race between backing_dev_show and backing_dev_store - dm snapshot: use mutex
[Bug 1843487] Re: UIO: mutex used in interrupt handler causes crash
Verified fix in proposed 4.15.0-71-generic. ** Tags removed: verification-needed-bionic ** Tags added: verification-done-bionic -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1843487 Title: UIO: mutex used in interrupt handler causes crash To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1843487/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1843487] Re: UIO: mutex used in interrupt handler causes crash
This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed- bionic' to 'verification-done-bionic'. If the problem still exists, change the tag 'verification-needed-bionic' to 'verification-failed- bionic'. If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you! ** Tags added: verification-needed-bionic -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1843487 Title: UIO: mutex used in interrupt handler causes crash To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1843487/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1843487] Re: UIO: mutex used in interrupt handler causes crash
** Changed in: linux (Ubuntu Bionic) Status: In Progress => Fix Committed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1843487 Title: UIO: mutex used in interrupt handler causes crash To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1843487/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1843487] Re: UIO: mutex used in interrupt handler causes crash
** Changed in: linux (Ubuntu Bionic) Importance: Undecided => Medium -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1843487 Title: UIO: mutex used in interrupt handler causes crash To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1843487/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1843487] Re: UIO: mutex used in interrupt handler causes crash
@Tom Sounds like a winner to me! I've submitted the patch to our process pipeline: https://lists.ubuntu.com/archives/kernel-team/2019-October/105155.html A post will appear here once it lands in a production Bionic kernel (most likely in our next three-week cycle, around 18-Nov). Thanks again for doing the leg-work on this! ** Also affects: linux (Ubuntu Bionic) Importance: Undecided Status: New ** Changed in: linux (Ubuntu Bionic) Assignee: (unassigned) => Kamal Mostafa (kamalmostafa) ** Changed in: linux (Ubuntu Bionic) Status: New => In Progress -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1843487 Title: UIO: mutex used in interrupt handler causes crash To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1843487/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1843487] Re: UIO: mutex used in interrupt handler causes crash
@Kamal yes this seems to fix it. I was able to run my device stress test for over 15 minutes. With the bug I was lucky if I could make it 15 seconds. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1843487 Title: UIO: mutex used in interrupt handler causes crash To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1843487/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1843487] Re: UIO: mutex used in interrupt handler causes crash
@Tom- Ah yes, you'll need the headers packages too, in order to build your own modules. OK, I've now added the two "linux-headers-*" packages to https://kernel.ubuntu.com/~kamal/lp1843487/ ... I believe you'll have to install the pair together. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1843487 Title: UIO: mutex used in interrupt handler causes crash To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1843487/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1843487] Re: UIO: mutex used in interrupt handler causes crash
@Kamal thanks for the quick response. I tried the files you sent over but it looks like I need some additional packages in order to rebuild my kernel module for that kernel. I tried to tell modprobe to force load my module built against 4.15.0-66 and it would not load it. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1843487 Title: UIO: mutex used in interrupt handler causes crash To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1843487/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1843487] Re: UIO: mutex used in interrupt handler causes crash
@Tom- Thanks for reporting this and isolating the cause and the fix. Here's a test kernel which includes a backport of the fix commit. Could you please verify that it resolves the problem?: https://kernel.ubuntu.com/~kamal/lp1843487/ -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1843487 Title: UIO: mutex used in interrupt handler causes crash To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1843487/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1843487] Re: UIO: mutex used in interrupt handler causes crash
** Changed in: linux (Ubuntu) Status: Confirmed => In Progress ** Changed in: linux (Ubuntu) Assignee: (unassigned) => Kamal Mostafa (kamalmostafa) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1843487 Title: UIO: mutex used in interrupt handler causes crash To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1843487/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1843487] Re: UIO: mutex used in interrupt handler causes crash
** Description changed: Running: Bionic Beaver Ubuntu 4.15.0-62.69-generic 4.15.18 In commit 725bbc87 on 2/13/2019 in uio.c a mutex_lock was added to uio_interrupt. This results in a "scheduling while atomic" error if someone else owns the mutex at the time it is invoked. - [ 1941.409212] BUG: scheduling while atomic: fcasm-test/3937/0x0001 - [ 1941.409216] Modules linked in: cdc_ether usbnet r8152 mii rfcomm ccm bnep arc4 nls_iso8859_1 snd_hda_codec_hdmi hid_multitouch dell_laptop intel_wmi_thunderbolt dell_wmi wmi_bmof dell_smbios dcdbas dell_wmi_descriptor snd_soc_skl snd_hda_codec_realtek snd_soc_skl_ipc snd_hda_codec_generic snd_hda_ext_core snd_soc_sst_dsp snd_soc_sst_ipc snd_soc_acpi snd_soc_core snd_compress ac97_bus snd_pcm_dmaengine intel_rapl ath10k_pci x86_pkg_temp_thermal intel_powerclamp ath10k_core coretemp kvm_intel ath kvm mac80211 irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc cfg80211 aesni_intel rtsx_pci_ms aes_x86_64 memstick crypto_simd glue_helper cryptd intel_cstate intel_rapl_perf snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq joydev - [ 1941.409247] input_leds serio_raw snd_seq_device snd_timer idma64 snd virt_dma soundcore i915 mei_me mei shpchp uvcvideo btusb drm_kms_helper btrtl videobuf2_vmalloc btbcm intel_lpss_pci videobuf2_memops btintel intel_lpss drm videobuf2_v4l2 bluetooth videobuf2_core intel_pch_thermal i2c_algo_bit videodev fb_sys_fops syscopyarea processor_thermal_device sysfillrect media ecdh_generic sysimgblt intel_soc_dts_iosf wmi intel_hid int3400_thermal int3403_thermal int340x_thermal_zone acpi_thermal_rel sparse_keymap mac_hid acpi_pad video sch_fq_codel nfsd uio_nwdv(OE) auth_rpcgss nfs_acl uio lockd grace parport_pc ppdev sunrpc lp parport ip_tables x_tables autofs4 nvme rtsx_pci_sdmmc psmouse nvme_core thunderbolt rtsx_pci i2c_hid hid pinctrl_sunrisepoint - [ 1941.409281] CPU: 3 PID: 3937 Comm: fcasm-test Tainted: G OE 4.15.0-62-generic #69-Ubuntu - [ 1941.409282] Hardware name: Dell Inc. XPS 13 9370/0F6P3V, BIOS 1.10.0 04/18/2019 - [ 1941.409282] Call Trace: - [ 1941.409284] - [ 1941.409290] dump_stack+0x63/0x8b - [ 1941.409293] __schedule_bug+0x55/0x70 - [ 1941.409295] __schedule+0x658/0x880 - [ 1941.409297] ? default_wake_function+0x12/0x20 - [ 1941.409298] ? pollwake+0x73/0x90 - [ 1941.409300] schedule+0x2c/0x80 - [ 1941.409302] schedule_preempt_disabled+0xe/0x10 - [ 1941.409303] __mutex_lock.isra.5+0x478/0x4e0 - [ 1941.409304] __mutex_lock_slowpath+0x13/0x20 - [ 1941.409305] ? __mutex_lock_slowpath+0x13/0x20 - [ 1941.409306] mutex_lock+0x2f/0x40 - [ 1941.409309] uio_interrupt+0x23/0x70 [uio] - [ 1941.409311] __handle_irq_event_percpu+0x44/0x1a0 - [ 1941.409313] handle_irq_event_percpu+0x32/0x80 - [ 1941.409315] handle_irq_event+0x3b/0x60 - [ 1941.409316] handle_fasteoi_irq+0x7c/0x130 - [ 1941.409318] handle_irq+0x20/0x30 - [ 1941.409319] do_IRQ+0x50/0xe0 - [ 1941.409321] common_interrupt+0x8c/0x8c - [ 1941.409322] - [ 1941.409323] RIP: 0010:mutex_lock+0x22/0x40 - [ 1941.409324] RSP: 0018:b68681b9b950 EFLAGS: 0246 ORIG_RAX: ffdc - [ 1941.409325] RAX: RBX: 8ae612f8af10 RCX: - [ 1941.409326] RDX: 8ae51b319740 RSI: b68681b9ba70 RDI: 8ae612f8af10 - [ 1941.409327] RBP: b68681b9b958 R08: 8ae4ffa35200 R09: c04c7120 - [ 1941.409327] R10: 0001 R11: 0389cc0215b7 R12: 8ae612f8af10 - [ 1941.409328] R13: 8ae512de6bb0 R14: 8ae4ffa35200 R15: b68681b9ba70 - [ 1941.409330] ? uio_interrupt+0x70/0x70 [uio] - [ 1941.409331] uio_poll+0x32/0xb0 [uio] - [ 1941.409333] do_select+0x384/0x7e0 - [ 1941.409335] ? compat_poll_select_copy_remaining+0x130/0x130 - [ 1941.409338] ? __update_load_avg_se.isra.37+0x1c0/0x1d0 - [ 1941.409339] ? __update_load_avg_se.isra.37+0x1c0/0x1d0 - [ 1941.409341] ? find_next_bit+0xb/0x10 - [ 1941.409342] ? update_load_avg+0x3b0/0x6e0 - [ 1941.409343] ? update_curr+0x7a/0x1d0 - [ 1941.409344] ? reweight_entity+0x155/0x1a0 - [ 1941.409345] ? check_preempt_wakeup+0x10e/0x240 - [ 1941.409347] ? check_preempt_curr+0x2d/0x90 - [ 1941.409348] ? ttwu_do_wakeup+0x1e/0x140 - [ 1941.409349] core_sys_select+0x1d9/0x320 - [ 1941.409350] ? core_sys_select+0x1d9/0x320 - [ 1941.409353] ? ktime_get_ts64+0x51/0xf0 - [ 1941.409354] SyS_select+0xb7/0x110 - [ 1941.409357] do_syscall_64+0x73/0x130 - [ 1941.409358] entry_SYSCALL_64_after_hwframe+0x3d/0xa2 - [ 1941.409359] RIP: 0033:0x7f8a46a4803f - [ 1941.409360] RSP: 002b:7f8a45d91db0 EFLAGS: 0293 ORIG_RAX: 0017 - [ 1941.409361] RAX: ffda RBX: 0400 RCX: 7f8a46a4803f - [ 1941.409362] RDX: RSI: 7f8a45d91e30 RDI: 0400 - [ 1941.409362] RBP: 7f8a45d91e30 R08: 7f8a45d91e20 R09: - [ 1941.409363] R10: R1
[Bug 1843487] Re: UIO: mutex used in interrupt handler causes crash
The following commit in the kernel mainline fixes this issue: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3d27c4de8d4fb2d4099ff324671792aa2578c6f9 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1843487 Title: UIO: mutex used in interrupt handler causes crash To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1843487/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1843487] Re: UIO: mutex used in interrupt handler causes crash
apport information ** Tags added: apport-collected ** Description changed: Running: Bionic Beaver Ubuntu 4.15.0-62.69-generic 4.15.18 In commit 725bbc87 on 2/13/2019 in uio.c a mutex_lock was added to uio_interrupt. This results in a "scheduling while atomic" error if someone else owns the mutex at the time it is invoked. [ 1941.409212] BUG: scheduling while atomic: fcasm-test/3937/0x0001 [ 1941.409216] Modules linked in: cdc_ether usbnet r8152 mii rfcomm ccm bnep arc4 nls_iso8859_1 snd_hda_codec_hdmi hid_multitouch dell_laptop intel_wmi_thunderbolt dell_wmi wmi_bmof dell_smbios dcdbas dell_wmi_descriptor snd_soc_skl snd_hda_codec_realtek snd_soc_skl_ipc snd_hda_codec_generic snd_hda_ext_core snd_soc_sst_dsp snd_soc_sst_ipc snd_soc_acpi snd_soc_core snd_compress ac97_bus snd_pcm_dmaengine intel_rapl ath10k_pci x86_pkg_temp_thermal intel_powerclamp ath10k_core coretemp kvm_intel ath kvm mac80211 irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc cfg80211 aesni_intel rtsx_pci_ms aes_x86_64 memstick crypto_simd glue_helper cryptd intel_cstate intel_rapl_perf snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq joydev [ 1941.409247] input_leds serio_raw snd_seq_device snd_timer idma64 snd virt_dma soundcore i915 mei_me mei shpchp uvcvideo btusb drm_kms_helper btrtl videobuf2_vmalloc btbcm intel_lpss_pci videobuf2_memops btintel intel_lpss drm videobuf2_v4l2 bluetooth videobuf2_core intel_pch_thermal i2c_algo_bit videodev fb_sys_fops syscopyarea processor_thermal_device sysfillrect media ecdh_generic sysimgblt intel_soc_dts_iosf wmi intel_hid int3400_thermal int3403_thermal int340x_thermal_zone acpi_thermal_rel sparse_keymap mac_hid acpi_pad video sch_fq_codel nfsd uio_nwdv(OE) auth_rpcgss nfs_acl uio lockd grace parport_pc ppdev sunrpc lp parport ip_tables x_tables autofs4 nvme rtsx_pci_sdmmc psmouse nvme_core thunderbolt rtsx_pci i2c_hid hid pinctrl_sunrisepoint [ 1941.409281] CPU: 3 PID: 3937 Comm: fcasm-test Tainted: G OE 4.15.0-62-generic #69-Ubuntu [ 1941.409282] Hardware name: Dell Inc. XPS 13 9370/0F6P3V, BIOS 1.10.0 04/18/2019 [ 1941.409282] Call Trace: [ 1941.409284] [ 1941.409290] dump_stack+0x63/0x8b [ 1941.409293] __schedule_bug+0x55/0x70 [ 1941.409295] __schedule+0x658/0x880 [ 1941.409297] ? default_wake_function+0x12/0x20 [ 1941.409298] ? pollwake+0x73/0x90 [ 1941.409300] schedule+0x2c/0x80 [ 1941.409302] schedule_preempt_disabled+0xe/0x10 [ 1941.409303] __mutex_lock.isra.5+0x478/0x4e0 [ 1941.409304] __mutex_lock_slowpath+0x13/0x20 [ 1941.409305] ? __mutex_lock_slowpath+0x13/0x20 [ 1941.409306] mutex_lock+0x2f/0x40 [ 1941.409309] uio_interrupt+0x23/0x70 [uio] [ 1941.409311] __handle_irq_event_percpu+0x44/0x1a0 [ 1941.409313] handle_irq_event_percpu+0x32/0x80 [ 1941.409315] handle_irq_event+0x3b/0x60 [ 1941.409316] handle_fasteoi_irq+0x7c/0x130 [ 1941.409318] handle_irq+0x20/0x30 [ 1941.409319] do_IRQ+0x50/0xe0 [ 1941.409321] common_interrupt+0x8c/0x8c [ 1941.409322] [ 1941.409323] RIP: 0010:mutex_lock+0x22/0x40 [ 1941.409324] RSP: 0018:b68681b9b950 EFLAGS: 0246 ORIG_RAX: ffdc [ 1941.409325] RAX: RBX: 8ae612f8af10 RCX: [ 1941.409326] RDX: 8ae51b319740 RSI: b68681b9ba70 RDI: 8ae612f8af10 [ 1941.409327] RBP: b68681b9b958 R08: 8ae4ffa35200 R09: c04c7120 [ 1941.409327] R10: 0001 R11: 0389cc0215b7 R12: 8ae612f8af10 [ 1941.409328] R13: 8ae512de6bb0 R14: 8ae4ffa35200 R15: b68681b9ba70 [ 1941.409330] ? uio_interrupt+0x70/0x70 [uio] [ 1941.409331] uio_poll+0x32/0xb0 [uio] [ 1941.409333] do_select+0x384/0x7e0 [ 1941.409335] ? compat_poll_select_copy_remaining+0x130/0x130 [ 1941.409338] ? __update_load_avg_se.isra.37+0x1c0/0x1d0 [ 1941.409339] ? __update_load_avg_se.isra.37+0x1c0/0x1d0 [ 1941.409341] ? find_next_bit+0xb/0x10 [ 1941.409342] ? update_load_avg+0x3b0/0x6e0 [ 1941.409343] ? update_curr+0x7a/0x1d0 [ 1941.409344] ? reweight_entity+0x155/0x1a0 [ 1941.409345] ? check_preempt_wakeup+0x10e/0x240 [ 1941.409347] ? check_preempt_curr+0x2d/0x90 [ 1941.409348] ? ttwu_do_wakeup+0x1e/0x140 [ 1941.409349] core_sys_select+0x1d9/0x320 [ 1941.409350] ? core_sys_select+0x1d9/0x320 [ 1941.409353] ? ktime_get_ts64+0x51/0xf0 [ 1941.409354] SyS_select+0xb7/0x110 [ 1941.409357] do_syscall_64+0x73/0x130 [ 1941.409358] entry_SYSCALL_64_after_hwframe+0x3d/0xa2 [ 1941.409359] RIP: 0033:0x7f8a46a4803f [ 1941.409360] RSP: 002b:7f8a45d91db0 EFLAGS: 0293 ORIG_RAX: 0017 [ 1941.409361] RAX: ffda RBX: 0400 RCX: 7f8a46a4803f [ 1941.409362] RDX: RSI: 7f8a45d91e30 RDI: 0400 [ 1941.409362] RBP: 7f8a45d91e30 R08: 7f8a45d91e20 R09: 0
[Bug 1843487] Re: UIO: mutex used in interrupt handler causes crash
** Tags added: bionic -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1843487 Title: UIO: mutex used in interrupt handler causes crash To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1843487/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1843487] Re: UIO: mutex used in interrupt handler causes crash
** Description changed: + Running: + Bionic Beaver Ubuntu 4.15.0-62.69-generic 4.15.18 In commit 725bbc87 on 2/13/2019 in uio.c a mutex_lock was added to uio_interrupt. This results in a "scheduling while atomic" error if someone else owns the mutex at the time it is invoked. [ 1941.409212] BUG: scheduling while atomic: fcasm-test/3937/0x0001 [ 1941.409216] Modules linked in: cdc_ether usbnet r8152 mii rfcomm ccm bnep arc4 nls_iso8859_1 snd_hda_codec_hdmi hid_multitouch dell_laptop intel_wmi_thunderbolt dell_wmi wmi_bmof dell_smbios dcdbas dell_wmi_descriptor snd_soc_skl snd_hda_codec_realtek snd_soc_skl_ipc snd_hda_codec_generic snd_hda_ext_core snd_soc_sst_dsp snd_soc_sst_ipc snd_soc_acpi snd_soc_core snd_compress ac97_bus snd_pcm_dmaengine intel_rapl ath10k_pci x86_pkg_temp_thermal intel_powerclamp ath10k_core coretemp kvm_intel ath kvm mac80211 irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc cfg80211 aesni_intel rtsx_pci_ms aes_x86_64 memstick crypto_simd glue_helper cryptd intel_cstate intel_rapl_perf snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq joydev [ 1941.409247] input_leds serio_raw snd_seq_device snd_timer idma64 snd virt_dma soundcore i915 mei_me mei shpchp uvcvideo btusb drm_kms_helper btrtl videobuf2_vmalloc btbcm intel_lpss_pci videobuf2_memops btintel intel_lpss drm videobuf2_v4l2 bluetooth videobuf2_core intel_pch_thermal i2c_algo_bit videodev fb_sys_fops syscopyarea processor_thermal_device sysfillrect media ecdh_generic sysimgblt intel_soc_dts_iosf wmi intel_hid int3400_thermal int3403_thermal int340x_thermal_zone acpi_thermal_rel sparse_keymap mac_hid acpi_pad video sch_fq_codel nfsd uio_nwdv(OE) auth_rpcgss nfs_acl uio lockd grace parport_pc ppdev sunrpc lp parport ip_tables x_tables autofs4 nvme rtsx_pci_sdmmc psmouse nvme_core thunderbolt rtsx_pci i2c_hid hid pinctrl_sunrisepoint [ 1941.409281] CPU: 3 PID: 3937 Comm: fcasm-test Tainted: G OE 4.15.0-62-generic #69-Ubuntu [ 1941.409282] Hardware name: Dell Inc. XPS 13 9370/0F6P3V, BIOS 1.10.0 04/18/2019 [ 1941.409282] Call Trace: [ 1941.409284] [ 1941.409290] dump_stack+0x63/0x8b [ 1941.409293] __schedule_bug+0x55/0x70 [ 1941.409295] __schedule+0x658/0x880 [ 1941.409297] ? default_wake_function+0x12/0x20 [ 1941.409298] ? pollwake+0x73/0x90 [ 1941.409300] schedule+0x2c/0x80 [ 1941.409302] schedule_preempt_disabled+0xe/0x10 [ 1941.409303] __mutex_lock.isra.5+0x478/0x4e0 [ 1941.409304] __mutex_lock_slowpath+0x13/0x20 [ 1941.409305] ? __mutex_lock_slowpath+0x13/0x20 [ 1941.409306] mutex_lock+0x2f/0x40 [ 1941.409309] uio_interrupt+0x23/0x70 [uio] [ 1941.409311] __handle_irq_event_percpu+0x44/0x1a0 [ 1941.409313] handle_irq_event_percpu+0x32/0x80 [ 1941.409315] handle_irq_event+0x3b/0x60 [ 1941.409316] handle_fasteoi_irq+0x7c/0x130 [ 1941.409318] handle_irq+0x20/0x30 [ 1941.409319] do_IRQ+0x50/0xe0 [ 1941.409321] common_interrupt+0x8c/0x8c [ 1941.409322] [ 1941.409323] RIP: 0010:mutex_lock+0x22/0x40 [ 1941.409324] RSP: 0018:b68681b9b950 EFLAGS: 0246 ORIG_RAX: ffdc [ 1941.409325] RAX: RBX: 8ae612f8af10 RCX: [ 1941.409326] RDX: 8ae51b319740 RSI: b68681b9ba70 RDI: 8ae612f8af10 [ 1941.409327] RBP: b68681b9b958 R08: 8ae4ffa35200 R09: c04c7120 [ 1941.409327] R10: 0001 R11: 0389cc0215b7 R12: 8ae612f8af10 [ 1941.409328] R13: 8ae512de6bb0 R14: 8ae4ffa35200 R15: b68681b9ba70 [ 1941.409330] ? uio_interrupt+0x70/0x70 [uio] [ 1941.409331] uio_poll+0x32/0xb0 [uio] [ 1941.409333] do_select+0x384/0x7e0 [ 1941.409335] ? compat_poll_select_copy_remaining+0x130/0x130 [ 1941.409338] ? __update_load_avg_se.isra.37+0x1c0/0x1d0 [ 1941.409339] ? __update_load_avg_se.isra.37+0x1c0/0x1d0 [ 1941.409341] ? find_next_bit+0xb/0x10 [ 1941.409342] ? update_load_avg+0x3b0/0x6e0 [ 1941.409343] ? update_curr+0x7a/0x1d0 [ 1941.409344] ? reweight_entity+0x155/0x1a0 [ 1941.409345] ? check_preempt_wakeup+0x10e/0x240 [ 1941.409347] ? check_preempt_curr+0x2d/0x90 [ 1941.409348] ? ttwu_do_wakeup+0x1e/0x140 [ 1941.409349] core_sys_select+0x1d9/0x320 [ 1941.409350] ? core_sys_select+0x1d9/0x320 [ 1941.409353] ? ktime_get_ts64+0x51/0xf0 [ 1941.409354] SyS_select+0xb7/0x110 [ 1941.409357] do_syscall_64+0x73/0x130 [ 1941.409358] entry_SYSCALL_64_after_hwframe+0x3d/0xa2 [ 1941.409359] RIP: 0033:0x7f8a46a4803f [ 1941.409360] RSP: 002b:7f8a45d91db0 EFLAGS: 0293 ORIG_RAX: 0017 [ 1941.409361] RAX: ffda RBX: 0400 RCX: 7f8a46a4803f [ 1941.409362] RDX: RSI: 7f8a45d91e30 RDI: 0400 [ 1941.409362] RBP: 7f8a45d91e30 R08: 7f8a45d91e20 R09: [ 1941.409363] R10: R1