iio: buffer: only set IRQF_ONESHOT when thread handler is provided
PATCH 1/1 iio: buffer: only set IRQF_ONESHOT when thread handler is provided
iio_triggered_buffer_setup_ext() unconditionally passes IRQF_ONESHOT to iio_alloc_pollfunc(), even when the caller provides no thread function. This causes a warning in __setup_irq() when the trigger is later attached:
WARNING: kernel/irq/manage.c:1502 at __setup_irq+0x4ee/0x700
IRQF_ONESHOT keeps the IRQ masked until the threaded handler completes, but with no threaded handler this is semantically wrong. Only set the flag when a thread function is actually provided.
---
This patch is a safety fix for how the Industrial I/O (IIO) subsystem handles interrupts when setting up a triggered buffer.
It changes the flags passed to iio_alloc_pollfunc to ensure that the IRQF_ONESHOT flag is only applied when a threaded interrupt handler actually exists.
Full disclosure, I got the warning on my laptop, and got Claude to debug it. The explanation it gave sounds reasonable to me, but I'm not personally familiar with the actual code.
--- drivers/iio/buffer/industrialio-triggered-buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/buffer/industrialio-triggered-buffer.c +1 -1
@@ -64,7 +64,7 @@ int iio_triggered_buffer_setup_ext(struct iio_dev *indio_dev, indio_dev->pollfunc = iio_alloc_pollfunc(h, thread, - IRQF_ONESHOT, + thread ? IRQF_ONESHOT : 0, indio_dev, "%s_consumer%d", indio_dev->name,
---
base-commit: 1d5dcaa3bd65f2e8c9baa14a393d3a2dc5db7524
change-id: 20260513-patch-iio-buffer-395d8ca94768
Best regards,
Signature · 1 line
Дамјан Георгиевски <[email protected]>
Quoted 10 lines · Дамјан Гео ргиевски
iio_triggered_buffer_setup_ext()unconditionally passesIRQF_ONESHOTtoiio_alloc_pollfunc(), even when the caller provides no thread function. This causes a warning in__setup_irq()when the trigger is later attached:WARNING: kernel/irq/manage.c:1502 at __setup_irq+0x4ee/0x700
IRQF_ONESHOTkeeps the IRQ masked until the threaded handler completes, but with no threaded handler this is semantically wrong. Only set the flag when a thread function is actually provided.
Yes, please read the mailing list archive and find the previous attempt to fix this and the associated discussions.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Jonathan Cameron
maintainerQuoted 6 lines · On Fri, 15 May 2026 13:46:30 +0300 Andy Shevchenko…
Quoted 5 lines · Дамјан Гео ргиевски
iio_triggered_buffer_setup_ext()unconditionally passesIRQF_ONESHOTtoiio_alloc_pollfunc(), even when the caller provides no thread function. This causes a warning in__setup_irq()when the trigger is later attached:
Quoted 9 lines
Quoted 5 lines
WARNING: kernel/irq/manage.c:1502 at __setup_irq+0x4ee/0x700
IRQF_ONESHOTkeeps the IRQ masked until the threaded handler completes, but with no threaded handler this is semantically wrong. Only set the flag when a thread function is actually provided.Yes, please read the mailing list archive and find the previous attempt to fix this and the associated discussions.
Just to check - what is the driver in use? The fixes so far all belong in the drivers, not papering over it in the core (note this is maybe the 3rd time this same patch has been posted and rejected!)
Jonathan
Quoted 16 lines · Jonathan Cameron
Quoted 12 lines · On Fri, 15 May 2026 13:46:30 +0300 Andy Shevchenko…
Quoted 10 lines · Дамјан Гео ргиевски
iio_triggered_buffer_setup_ext()unconditionally passesIRQF_ONESHOTtoiio_alloc_pollfunc(), even when the caller provides no thread function. This causes a warning in__setup_irq()when the trigger is later attached:WARNING: kernel/irq/manage.c:1502 at __setup_irq+0x4ee/0x700
IRQF_ONESHOTkeeps the IRQ masked until the threaded handler completes, but with no threaded handler this is semantically wrong. Only set the flag when a thread function is actually provided.
Quoted 8 lines
Quoted 3 lines
Yes, please read the mailing list archive and find the previous attempt to fix this and the associated discussions.
Just to check - what is the driver in use? The fixes so far all belong in the drivers, not papering over it in the core (note this is maybe the 3rd time this same patch has been posted and rejected!)
good to know,
that's what I get for using AI :D
this started happening after
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=043251b2dd1c2b0cd23f67830748493fd3d3ed0f
was merged and that made "intel_ish_hid" successfully enable the ambient light sensor on the Thinkpad X9-14.
Not sure which exactly driver ended up triggering the warning, is it possible it is " hid_sensor_prox"?
full warning is
ar 30 02:21:11 kernel: ------------[ cut here ]------------
Mar 30 02:21:11 kernel: WARNING: kernel/irq/manage.c:1502 at __setup_irq+0x4ee/0x700, CPU#3: iio-sensor-prox/878 Mar 30 02:21:11 kernel: Modules linked in: uinput cmac algif_hash
algif_skcipher af_alg bnep vfat fat snd_soc_sof_sdw snd_sof_probes snd_soc_intel_hda_dsp_common snd_soc_cs42l43 spi_cs42l43 snd_soc_cs42l43_sdw pinctrl_cs42l43 snd_soc_cs35l56_sdw snd_soc_cs35l56 snd_soc_cs35l56_shared cs42l43_sdw snd_soc_cs_amp_lib regmap_sdw snd_soc_wm_adsp snd_hda_codec_intelhdmi cs_dsp cs42l43 snd_hda_codec_hdmi snd_soc_dmic hid_sensor_prox hid_sensor_als hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common industrialio hid_sensor_custom hid_sensor_hub intel_ishtp_hid snd_hda_intel snd_sof_pci_intel_lnl snd_sof_pci_intel_mtl snd_sof_intel_hda_generic soundwire_intel snd_sof_intel_hda_sdw_bpt snd_sof_intel_hda_common snd_soc_hdac_hda snd_sof_intel_hda_mlink snd_sof_intel_hda soundwire_cadence snd_sof_pci snd_sof_xtensa_dsp snd_sof snd_sof_utils snd_hda_ext_core intel_uncore_frequency intel_uncore_frequency_common x86_pkg_temp_thermal snd_hda_codec snd_hda_core xe intel_powerclamp snd_intel_dspcfg snd_intel_sdw_acpi
Mar 30 02:21:11 kernel: snd_soc_acpi_intel_match
snd_soc_acpi_intel_sdca_quirks soundwire_generic_allocation snd_soc_sdw_utils snd_soc_acpi coretemp intel_ipu7_isys(C) snd_hwdep videobuf2_dma_sg drm_gpusvm_helper soundwire_bus videobuf2_memops drm_gpuvm kvm_intel snd_soc_sdca videobuf2_v4l2 joydev gpu_sched videobuf2_common lenovo_wmi_other mousedev snd_ctl_led mei_gsc_proxy intel_rapl_msr wacom drm_buddy processor_thermal_device_pci snd_soc_core hid_multitouch lenovo_wmi_helpers kvm drm_exec processor_thermal_device lenovo_wmi_capdata drm_suballoc_helper processor_thermal_wt_hint snd_compress think_lmi iwlmld drm_ttm_helper ac97_bus irqbypass platform_temperature_control ttm snd_pcm_dmaengine firmware_attributes_class wmi_bmof snd_pcm rapl imx471 i2c_algo_bit thinkpad_acpi processor_thermal_soc_slider ucsi_acpi processor_thermal_rfim mac80211 v4l2_fwnode processor_thermal_rapl snd_timer drm_display_helper v4l2_async typec_ucsi platform_profile btintel_pcie intel_cstate intel_rapl_common intel_ipu7(C) pcspkr intel_uncore typec
Mar 30 02:21:11 kernel: videodev spi_nor processor_thermal_wt_req ptp
snd intel_quicki2c intel_ish_ipc intel_skl_int3472_tps68470 intel_pmc_core cec btintel mei_me soundcore pps_core processor_thermal_power_floor roles tps68470_regulator clk_tps68470 pmt_telemetry libarc4 mtd video crc8 bluetooth mei iwlwifi intel_ishtp intel_vpu intel_thc thunderbolt processor_thermal_mbox mc ipu_bridge i2c_hid_acpi pmt_discovery i2c_hid pmt_class intel_pmc_ssram_telemetry int3400_thermal intel_hid intel_skl_int3472_discrete int3403_thermal soc_button_array int340x_thermal_zone acpi_pad sparse_keymap acpi_thermal_rel pinctrl_intel_platform acpi_tad intel_skl_int3472_common wmi intel_vsec cfg80211 mac_hid rfkill i2c_dev crypto_user pkcs8_key_parser nfnetlink dm_crypt encrypted_keys trusted asn1_encoder tee dm_mod nvme nvme_core nvme_keyring nvme_auth ghash_clmulni_intel hkdf aesni_intel spi_intel_pci spi_intel intel_lpss_pci intel_lpss idma64 serio_raw
Mar 30 02:21:11 kernel: CPU: 3 UID: 0 PID: 878 Comm: iio-sensor-prox Tainted: G C 7.0.0-rc6-00004-g7268ec6fe437 #1 PREEMPT(full) fa629251ef4a8846133b410c388e36cf95acdaa0 Mar 30 02:21:11 kernel: Tainted: [C]=CRAP Mar 30 02:21:11 kernel: Hardware name: LENOVO 21QA0048RM/21QA0048RM, BIOS N4DET38W (1.21 ) 12/24/2025 Mar 30 02:21:11 kernel: RIP: 0010:__setup_irq+0x4ee/0x700 Mar 30 02:21:11 kernel: Code: 89 43 7c e8 44 f7 ff ff e9 f9 fe ff ff b8 01 00 00 00 48 c7 c1 ff ff ff ff f3 48 0f bc c9 48 d3 e0 49 89 45 48 e9 f2 fd ff ff <0f> 0b f6 c6 80 0f 85 8a 00 00 00 81 e2 00 00 01 00 0f 85 80 fb ff Mar 30 02:21:11 kernel: RSP: 0018:ffffd481c3303be0 EFLAGS: 00010246 Mar 30 02:21:11 kernel: RAX: 0000000000002000 RBX: ffff8e5e909e9200 RCX: 0000000000000000 Mar 30 02:21:11 kernel: RDX: 0000000000000400 RSI: ffff8e5e909e9200 RDI: ffffffffc1f74bc0 Mar 30 02:21:11 kernel: RBP: 00000000000000c0 R08: 0000000000000080 R09: ffff8e5eabf09480 Mar 30 02:21:11 kernel: R10: 0000000000000000 R11: 0000000000000001 R12: 00000000000000c0 Mar 30 02:21:11 kernel: R13: ffff8e5eabf09480 R14: 0000000000000000 R15: 0000000000000400 Mar 30 02:21:11 kernel: FS: 00007f93f76ba880(0000) GS:ffff8e661f357000(0000) knlGS:0000000000000000 Mar 30 02:21:11 kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 Mar 30 02:21:11 kernel: CR2: 00000000019758a0 CR3: 000000011ee24005 CR4: 0000000000f72ef0 Mar 30 02:21:11 kernel: PKRU: 55555554 Mar 30 02:21:11 kernel: Call Trace: Mar 30 02:21:11 kernel: <TASK> Mar 30 02:21:11 kernel: ? __kmalloc_cache_noprof+0x137/0x4a0 Mar 30 02:21:11 kernel: ? request_threaded_irq+0x93/0x190 Mar 30 02:21:11 kernel: ? __pfx_iio_pollfunc_store_time+0x10/0x10 [industrialio 8913024fda2a34504d19f2663497ed55125b1226] Mar 30 02:21:11 kernel: request_threaded_irq+0xd3/0x190 Mar 30 02:21:11 kernel: iio_trigger_attach_poll_func+0xbe/0x1c0 [industrialio 8913024fda2a34504d19f2663497ed55125b1226] Mar 30 02:21:11 kernel: __iio_update_buffers+0xa70/0xb60 [industrialio 8913024fda2a34504d19f2663497ed55125b1226] Mar 30 02:21:11 kernel: enable_store+0x81/0xe0 [industrialio 8913024fda2a34504d19f2663497ed55125b1226] Mar 30 02:21:11 kernel: kernfs_fop_write_iter+0x14d/0x200 Mar 30 02:21:11 kernel: vfs_write+0x25d/0x480 Mar 30 02:21:11 kernel: ksys_write+0x73/0xf0 Mar 30 02:21:11 kernel: do_syscall_64+0x11c/0x15f0 Mar 30 02:21:11 kernel: ? __x64_sys_close+0x3d/0x80 Mar 30 02:21:11 kernel: ? do_syscall_64+0x11c/0x15f0 Mar 30 02:21:11 kernel: ? __x64_sys_close+0x3d/0x80 Mar 30 02:21:11 kernel: ? do_syscall_64+0x11c/0x15f0 Mar 30 02:21:11 kernel: ? do_syscall_64+0x11c/0x15f0 Mar 30 02:21:11 kernel: ? do_syscall_64+0x11c/0x15f0 Mar 30 02:21:11 kernel: ? irqentry_exit+0x2c3/0x5e0 Mar 30 02:21:11 kernel: entry_SYSCALL_64_after_hwframe+0x76/0x7e Mar 30 02:21:11 kernel: RIP: 0033:0x7f93f7b36f32 Mar 30 02:21:11 kernel: Code: 08 0f 85 c1 43 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 f3 0f 1e fa 55 bf 01 00 Mar 30 02:21:11 kernel: RSP: 002b:00007ffdd277ac98 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 Mar 30 02:21:11 kernel: RAX: ffffffffffffffda RBX: 000056336b998ad0 RCX: 00007f93f7b36f32 Mar 30 02:21:11 kernel: RDX: 0000000000000001 RSI: 00007ffdd277ae60 RDI: 0000000000000008 Mar 30 02:21:11 kernel: RBP: 00007ffdd277acc0 R08: 0000000000000000 R09: 0000000000000000 Mar 30 02:21:11 kernel: R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 Mar 30 02:21:11 kernel: R13: 0000000000000001 R14: 00007ffdd277ae60 R15: 0000000000000002 Mar 30 02:21:11 kernel: </TASK> Mar 30 02:21:11 kernel: ---[ end trace 0000000000000000 ]---
ps
removed linux-kernel mailing list from Cc: since it's no longer relevant for this discussion
Signature · 1 line
damjan
Jonathan Cameron
maintainerQuoted 30 lines · On Fri, 15 May 2026 16:47:50 +0200 Damjan Georgievski <[email protected]> wrote:
Quoted 16 lines · Jonathan Cameron
Quoted 12 lines · On Fri, 15 May 2026 13:46:30 +0300 Andy Shevchenko…
Quoted 10 lines · Дамјан Гео ргиевски
iio_triggered_buffer_setup_ext()unconditionally passesIRQF_ONESHOTtoiio_alloc_pollfunc(), even when the caller provides no thread function. This causes a warning in__setup_irq()when the trigger is later attached:WARNING: kernel/irq/manage.c:1502 at __setup_irq+0x4ee/0x700
IRQF_ONESHOTkeeps the IRQ masked until the threaded handler completes, but with no threaded handler this is semantically wrong. Only set the flag when a thread function is actually provided.Quoted 8 lines
Quoted 3 lines
Yes, please read the mailing list archive and find the previous attempt to fix this and the associated discussions.
Just to check - what is the driver in use? The fixes so far all belong in the drivers, not papering over it in the core (note this is maybe the 3rd time this same patch has been posted and rejected!)
good to know,
that's what I get for using AI :D
Quoted 7 lines
this started happening after
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=043251b2dd1c2b0cd23f67830748493fd3d3ed0f
was merged and that made "intel_ish_hid" successfully enable the ambient light sensor on the Thinkpad X9-14.Not sure which exactly driver ended up triggering the warning, is it possible it is "
hid_sensor_prox"?
I believe hid should already be fixed.
c47ac75f5f24020cc0c8b835457a7637ad450939 iio: hid-sensors: Use software trigger
Maybe something is missing however. Can you check if you have that commit? I think due to it coming in late last cycle and me travelling it went in during the last merge window.
Jonathan
Quoted 134 lines
full warning is
ar 30 02:21:11 kernel: ------------[ cut here ]------------
Mar 30 02:21:11 kernel: WARNING: kernel/irq/manage.c:1502 at __setup_irq+0x4ee/0x700, CPU#3: iio-sensor-prox/878 Mar 30 02:21:11 kernel: Modules linked in: uinput cmac algif_hash
algif_skcipheraf_algbnep vfat fatsnd_soc_sof_sdwsnd_sof_probessnd_soc_intel_hda_dsp_commonsnd_soc_cs42l43spi_cs42l43snd_soc_cs42l43_sdwpinctrl_cs42l43snd_soc_cs35l56_sdwsnd_soc_cs35l56snd_soc_cs35l56_sharedcs42l43_sdwsnd_soc_cs_amp_libregmap_sdwsnd_soc_wm_adspsnd_hda_codec_intelhdmics_dspcs42l43snd_hda_codec_hdmisnd_soc_dmichid_sensor_proxhid_sensor_alshid_sensor_triggerindustrialio_triggered_bufferkfifo_bufhid_sensor_iio_commonindustrialiohid_sensor_customhid_sensor_hubintel_ishtp_hidsnd_hda_intelsnd_sof_pci_intel_lnlsnd_sof_pci_intel_mtlsnd_sof_intel_hda_genericsoundwire_intelsnd_sof_intel_hda_sdw_bptsnd_sof_intel_hda_commonsnd_soc_hdac_hdasnd_sof_intel_hda_mlinksnd_sof_intel_hdasoundwire_cadencesnd_sof_pcisnd_sof_xtensa_dspsnd_sofsnd_sof_utilssnd_hda_ext_coreintel_uncore_frequencyintel_uncore_frequency_commonx86_pkg_temp_thermalsnd_hda_codecsnd_hda_corexeintel_powerclampsnd_intel_dspcfgsnd_intel_sdw_acpiMar 30 02:21:11 kernel: snd_soc_acpi_intel_match
snd_soc_acpi_intel_sdca_quirkssoundwire_generic_allocationsnd_soc_sdw_utilssnd_soc_acpicoretempintel_ipu7_isys(C)snd_hwdepvideobuf2_dma_sgdrm_gpusvm_helpersoundwire_busvideobuf2_memopsdrm_gpuvmkvm_intelsnd_soc_sdcavideobuf2_v4l2joydevgpu_schedvideobuf2_commonlenovo_wmi_othermousedevsnd_ctl_ledmei_gsc_proxyintel_rapl_msrwacomdrm_buddyprocessor_thermal_device_pcisnd_soc_corehid_multitouchlenovo_wmi_helperskvmdrm_execprocessor_thermal_devicelenovo_wmi_capdatadrm_suballoc_helperprocessor_thermal_wt_hintsnd_compressthink_lmiiwlmlddrm_ttm_helperac97_busirqbypassplatform_temperature_controlttmsnd_pcm_dmaenginefirmware_attributes_classwmi_bmofsnd_pcmrapl imx471i2c_algo_bitthinkpad_acpiprocessor_thermal_soc_sliderucsi_acpiprocessor_thermal_rfimmac80211v4l2_fwnodeprocessor_thermal_raplsnd_timerdrm_display_helperv4l2_asynctypec_ucsiplatform_profilebtintel_pcieintel_cstateintel_rapl_commonintel_ipu7(C)pcspkrintel_uncoretypecMar 30 02:21:11 kernel: videodev spi_nor processor_thermal_wt_req ptpsnd
intel_quicki2cintel_ish_ipcintel_skl_int3472_tps68470intel_pmc_corecec btintelmei_mesoundcorepps_coreprocessor_thermal_power_floorrolestps68470_regulatorclk_tps68470pmt_telemetrylibarc4 mtd video crc8 bluetooth mei iwlwifiintel_ishtpintel_vpuintel_thcthunderboltprocessor_thermal_mboxmcipu_bridgei2c_hid_acpipmt_discoveryi2c_hidpmt_classintel_pmc_ssram_telemetryint3400_thermalintel_hidintel_skl_int3472_discreteint3403_thermalsoc_button_arrayint340x_thermal_zoneacpi_padsparse_keymapacpi_thermal_relpinctrl_intel_platformacpi_tadintel_skl_int3472_commonwmiintel_vseccfg80211mac_hidrfkilli2c_devcrypto_userpkcs8_key_parsernfnetlinkdm_cryptencrypted_keystrustedasn1_encoderteedm_modnvmenvme_corenvme_keyringnvme_authghash_clmulni_intelhkdfaesni_intelspi_intel_pcispi_intelintel_lpss_pciintel_lpssidma64serio_rawMar 30 02:21:11 kernel: CPU: 3 UID: 0 PID: 878 Comm: iio-sensor-prox Tainted: G C 7.0.0-rc6-00004-g7268ec6fe437 #1 PREEMPT(full) fa629251ef4a8846133b410c388e36cf95acdaa0 Mar 30 02:21:11 kernel: Tainted: [C]=CRAP Mar 30 02:21:11 kernel: Hardware name: LENOVO 21QA0048RM/21QA0048RM, BIOS N4DET38W (1.21 ) 12/24/2025 Mar 30 02:21:11 kernel: RIP: 0010:__setup_irq+0x4ee/0x700 Mar 30 02:21:11 kernel: Code: 89 43 7c e8 44 f7 ff ff e9 f9 fe ff ff b8 01 00 00 00 48 c7 c1 ff ff ff ff f3 48 0f bc c9 48 d3 e0 49 89 45 48 e9 f2 fd ff ff <0f> 0b f6 c6 80 0f 85 8a 00 00 00 81 e2 00 00 01 00 0f 85 80 fb ff Mar 30 02:21:11 kernel: RSP: 0018:ffffd481c3303be0 EFLAGS: 00010246 Mar 30 02:21:11 kernel: RAX: 0000000000002000 RBX: ffff8e5e909e9200 RCX: 0000000000000000 Mar 30 02:21:11 kernel: RDX: 0000000000000400 RSI: ffff8e5e909e9200 RDI: ffffffffc1f74bc0 Mar 30 02:21:11 kernel: RBP: 00000000000000c0 R08: 0000000000000080 R09: ffff8e5eabf09480 Mar 30 02:21:11 kernel: R10: 0000000000000000 R11: 0000000000000001 R12: 00000000000000c0 Mar 30 02:21:11 kernel: R13: ffff8e5eabf09480 R14: 0000000000000000 R15: 0000000000000400 Mar 30 02:21:11 kernel: FS: 00007f93f76ba880(0000) GS:ffff8e661f357000(0000) knlGS:0000000000000000 Mar 30 02:21:11 kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 Mar 30 02:21:11 kernel: CR2: 00000000019758a0 CR3: 000000011ee24005 CR4: 0000000000f72ef0 Mar 30 02:21:11 kernel: PKRU: 55555554 Mar 30 02:21:11 kernel: Call Trace: Mar 30 02:21:11 kernel: <TASK> Mar 30 02:21:11 kernel: ? __kmalloc_cache_noprof+0x137/0x4a0 Mar 30 02:21:11 kernel: ? request_threaded_irq+0x93/0x190 Mar 30 02:21:11 kernel: ? __pfx_iio_pollfunc_store_time+0x10/0x10 [industrialio 8913024fda2a34504d19f2663497ed55125b1226] Mar 30 02:21:11 kernel: request_threaded_irq+0xd3/0x190 Mar 30 02:21:11 kernel: iio_trigger_attach_poll_func+0xbe/0x1c0 [industrialio 8913024fda2a34504d19f2663497ed55125b1226] Mar 30 02:21:11 kernel: __iio_update_buffers+0xa70/0xb60 [industrialio 8913024fda2a34504d19f2663497ed55125b1226] Mar 30 02:21:11 kernel: enable_store+0x81/0xe0 [industrialio 8913024fda2a34504d19f2663497ed55125b1226] Mar 30 02:21:11 kernel: kernfs_fop_write_iter+0x14d/0x200 Mar 30 02:21:11 kernel: vfs_write+0x25d/0x480 Mar 30 02:21:11 kernel: ksys_write+0x73/0xf0 Mar 30 02:21:11 kernel: do_syscall_64+0x11c/0x15f0 Mar 30 02:21:11 kernel: ? __x64_sys_close+0x3d/0x80 Mar 30 02:21:11 kernel: ? do_syscall_64+0x11c/0x15f0 Mar 30 02:21:11 kernel: ? __x64_sys_close+0x3d/0x80 Mar 30 02:21:11 kernel: ? do_syscall_64+0x11c/0x15f0 Mar 30 02:21:11 kernel: ? do_syscall_64+0x11c/0x15f0 Mar 30 02:21:11 kernel: ? do_syscall_64+0x11c/0x15f0 Mar 30 02:21:11 kernel: ? irqentry_exit+0x2c3/0x5e0 Mar 30 02:21:11 kernel: entry_SYSCALL_64_after_hwframe+0x76/0x7e Mar 30 02:21:11 kernel: RIP: 0033:0x7f93f7b36f32 Mar 30 02:21:11 kernel: Code: 08 0f 85 c1 43 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 f3 0f 1e fa 55 bf 01 00 Mar 30 02:21:11 kernel: RSP: 002b:00007ffdd277ac98 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 Mar 30 02:21:11 kernel: RAX: ffffffffffffffda RBX: 000056336b998ad0 RCX: 00007f93f7b36f32 Mar 30 02:21:11 kernel: RDX: 0000000000000001 RSI: 00007ffdd277ae60 RDI: 0000000000000008 Mar 30 02:21:11 kernel: RBP: 00007ffdd277acc0 R08: 0000000000000000 R09: 0000000000000000 Mar 30 02:21:11 kernel: R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 Mar 30 02:21:11 kernel: R13: 0000000000000001 R14: 00007ffdd277ae60 R15: 0000000000000002 Mar 30 02:21:11 kernel: </TASK> Mar 30 02:21:11 kernel: ---[ end trace 0000000000000000 ]---ps
removed linux-kernel mailing list from Cc: since it's no longer relevant for this discussion
Quoted 42 lines · Jonathan Cameron
Quoted 30 lines · On Fri, 15 May 2026 16:47:50 +0200 Damjan Georgievski <[email protected]> wrote:
Quoted 16 lines · Jonathan Cameron
Quoted 12 lines · On Fri, 15 May 2026 13:46:30 +0300 Andy Shevchenko…
Quoted 10 lines · Дамјан Гео ргиевски
iio_triggered_buffer_setup_ext()unconditionally passesIRQF_ONESHOTtoiio_alloc_pollfunc(), even when the caller provides no thread function. This causes a warning in__setup_irq()when the trigger is later attached:WARNING: kernel/irq/manage.c:1502 at __setup_irq+0x4ee/0x700
IRQF_ONESHOTkeeps the IRQ masked until the threaded handler completes, but with no threaded handler this is semantically wrong. Only set the flag when a thread function is actually provided.Quoted 8 lines
Quoted 3 lines
Yes, please read the mailing list archive and find the previous attempt to fix this and the associated discussions.
Just to check - what is the driver in use? The fixes so far all belong in the drivers, not papering over it in the core (note this is maybe the 3rd time this same patch has been posted and rejected!)
good to know,
that's what I get for using AI :DQuoted 7 lines
this started happening after
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=043251b2dd1c2b0cd23f67830748493fd3d3ed0f
was merged and that made "intel_ish_hid" successfully enable the ambient light sensor on the Thinkpad X9-14.Not sure which exactly driver ended up triggering the warning, is it possible it is "
hid_sensor_prox"?
Quoted 7 lines
I believe hid should already be fixed.
c47ac75f5f24020cc0c8b835457a7637ad450939iio: hid-sensors: Use software triggerMaybe something is missing however. Can you check if you have that commit? I think due to it coming in late last cycle and me travelling it went in during the last merge window.
I'll test again on top of v7.1-rc3 (which I self-compile for other reasons) and on 7.0.7.arch1-1
I did keep this patch since some of the 7.0-rc1 when it first broke.
Signature · 1 line
damjan
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Not sure which exactly driver ended up triggering the warning, is it possible it is "
hid_sensor_prox"?I believe hid should already be fixed.
c47ac75f5f24020cc0c8b835457a7637ad450939iio: hid-sensors: Use software trigger
Quoted 7 lines
Quoted 3 lines
Maybe something is missing however. Can you check if you have that commit? I think due to it coming in late last cycle and me travelling it went in during the last merge window.
I'll test again on top of v7.1-rc3 (which I self-compile for other reasons) and on 7.0.7.arch1-1
I did keep this patch since some of the 7.0-rc1 when it first broke.
Thanks Jonathan,
I can confirm that the issue is indeed fixed in both 7.0.7.arch1-1 and v7.1-rc3
I was sitting on this patch too long, didn't occur to me to retest without it. (also wrongly used git log to see if there are any changes to the wrong file)
Thanks again and sorry about the noise.
Signature · 1 line
damjan