Hello Bartosz, Hope you are doing well. I am Chaitanya from the linux graphics team in Intel. This mail is regarding a regression we are seeing in our CI runs[1] on linux-next repository. Since the version next-20250225 [2], we are seeing the following regression ````````````````````````````````````````````````````````````````````````````````` <4>[ 8.483421] gpio gpiochip1: gpiochip_add_data_with_key: get_direction failed: -22 <4>[ 8.483427] ------------[ cut here ]------------ <4>[ 8.483428] WARNING: CPU: 20 PID: 444 at drivers/gpio/gpiolib.c:349 gpiochip_get_direction+0x63/0x90 <4>[ 8.483430] Modules linked in: intel_ish_ipc(+) e1000e(+) spi_intel(+) i2c_smbus idma64(+) mei intel_ishtp realtek(+) processor_thermal_device_pci(+) processor_thermal_device processor_thermal_wt_hint video processor_thermal_rfim int3403_thermal intel_pmc_core(+) processor_thermal_rapl intel_rapl_common intel_vpu processor_thermal_wt_req ucsi_acpi(+) processor_thermal_power_floor drm_shmem_helper pmt_telemetry processor_thermal_mbox pmt_class typec_ucsi int3400_thermal drm_kms_helper acpi_tad intel_hid int340x_thermal_zone thunderbolt(+) acpi_thermal_rel intel_vsec typec pinctrl_meteorpoint(+) sparse_keymap wmi pinctrl_meteorlake acpi_pad dm_multipath msr nvme_fabrics fuse efi_pstore nfnetlink ip_tables x_tables autofs4 <4>[ 8.483465] CPU: 20 UID: 0 PID: 444 Comm: (udev-worker) Tainted: G W 6.14.0-rc4-next-20250225-next-20250225-g0226d0ce98a4+ #1 <4>[ 8.483467] Tainted: [W]=WARN <4>[ 8.483467] Hardware name: Intel Corporation Arrow Lake Client Platform/MTL-S UDIMM 2DPC EVCRB, BIOS MTLSFWI1.R00.4400.D85.2410100007 10/10/2024 <4>[ 8.483468] RIP: 0010:gpiochip_get_direction+0x63/0x90 <4>[ 8.483470] Code: f8 02 5d 0f 4d c2 31 d2 31 f6 31 ff c3 cc cc cc cc 48 8b 47 08 be ff ff ff ff 48 8d b8 c0 06 00 00 e8 31 2d 95 00 85 c0 75 b9 <0f> 0b 48 8b 43 38 48 85 c0 75 b7 0f 0b b8 a1 ff ff ff 5b 41 5c 5d <4>[ 8.483472] RSP: 0018:ffffc9000206f590 EFLAGS: 00010246 <4>[ 8.483473] RAX: 0000000000000000 RBX: ffff8881087964d0 RCX: 0000000000000000 <4>[ 8.483474] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 <4>[ 8.483476] RBP: ffffc9000206f5a0 R08: 0000000000000000 R09: 0000000000000000 <4>[ 8.483477] R10: 0000000000000000 R11: 0000000000000000 R12: 00000000000001a4 <4>[ 8.483478] R13: ffffffff87f39780 R14: ffff8881087964d0 R15: 00000000000001a4 <4>[ 8.483479] FS: 00007f4df7e6f8c0(0000) GS:ffff8888dbf09000(0000) knlGS:0000000000000000 <4>[ 8.483480] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4>[ 8.483481] CR2: 00007f4df8003966 CR3: 0000000118522005 CR4: 0000000000f70ef0 <4>[ 8.483482] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 <4>[ 8.483483] DR3: 0000000000000000 DR6: 00000000ffff07f0 DR7: 0000000000000400 <4>[ 8.483484] PKRU: 55555554 <4>[ 8.483485] Call Trace: <4>[ 8.483486] <TASK> <4>[ 8.483487] ? show_regs+0x6c/0x80 <4>[ 8.483490] ? __warn+0x93/0x1c0 <4>[ 8.483492] ? gpiochip_get_direction+0x63/0x90 ````````````````````````````````````````````````````````````````````````````````` Detailed log can be found in [3]. After bisecting the tree, the following patch [4] seems to be the first "bad" commit ````````````````````````````````````````````````````````````````````````````````````````````````````````` commit e623c4303ed112a1fc20aec8427ba8407e2842e6 Author: Bartosz Golaszewski mailto:bartosz.golaszewski@xxxxxxxxxx Date: Mon Feb 10 11:52:02 2025 +0100 gpiolib: sanitize the return value of gpio_chip::get_direction() ````````````````````````````````````````````````````````````````````````````````````````````````````````` We also verified that if we revert the patch the issue is not seen. Could you please check why the patch causes this regression and provide a fix if necessary? Thank you. Regards Chaitanya [1] https://intel-gfx-ci.01.org/tree/linux-next/combined-alt.html? [2] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20250225 [3] https://intel-gfx-ci.01.org/tree/linux-next/next-20250225/bat-arls-6/boot0.txt [4] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20250225&id=e623c4303ed112a1fc20aec8427ba8407e2842e6