id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
7af9e30a0c8bb05b7254fdca857c1a1126b652eb
Analyze and fix the following issue in the Linux kernel code: ASoC: pxa: drop unused Kconfig symbol
Problem Details: Drop a bogus dangling Kconfig symbol for select SND_SOC_AC97_BUS_NEW. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216748 Fixes: 1c8bc7b3de5e ("ASoC: pxa: switch to new ac97 bus support") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Link: https://patch.msgid.link/20251228071041.2246718-1-r...
```diff diff --git a/sound/soc/pxa/Kconfig b/sound/soc/pxa/Kconfig index e54abcd39f79..4bd14ae330d5 100644 --- a/sound/soc/pxa/Kconfig +++ b/sound/soc/pxa/Kconfig @@ -18,7 +18,6 @@ config SND_PXA2XX_SOC_AC97 select AC97_BUS_NEW select SND_PXA2XX_LIB select SND_PXA2XX_LIB_AC97 - select SND_SOC_AC97_BUS_NEW conf...
a4e573db06a4e8c519ec4c42f8e1249a0853367a
Analyze and fix the following issue in the Linux kernel code: lib/crypto: riscv/aes: Migrate optimized code into library
Problem Details: Move the aes_encrypt_zvkned() and aes_decrypt_zvkned() assembly functions into lib/crypto/, wire them up to the AES library API, and remove the "aes-riscv64-zvkned" crypto_cipher algorithm. To make this possible, change the prototypes of these functions to take (rndkeys, key_len) instead of a pointer ...
```diff diff --git a/arch/riscv/crypto/Kconfig b/arch/riscv/crypto/Kconfig index 14c5acb935e9..22d4eaab15f3 100644 --- a/arch/riscv/crypto/Kconfig +++ b/arch/riscv/crypto/Kconfig @@ -6,11 +6,9 @@ config CRYPTO_AES_RISCV64 tristate "Ciphers: AES, modes: ECB, CBC, CTS, CTR, XTS" depends on 64BIT && TOOLCHAIN_HAS_VECT...
7cf2082e74ce7f4f4b5e14cbe67a194d75e257ef
Analyze and fix the following issue in the Linux kernel code: lib/crypto: powerpc/aes: Migrate POWER8 optimized code into library
Problem Details: Move the POWER8 AES assembly code into lib/crypto/, wire the key expansion and single-block en/decryption functions up to the AES library API, and remove the superseded "p8_aes" crypto_cipher algorithm. The result is that both the AES library and crypto_cipher APIs are now optimized for POWER8, wherea...
```diff diff --git a/arch/powerpc/crypto/Makefile b/arch/powerpc/crypto/Makefile index e22310da86b5..3ac0886282a2 100644 --- a/arch/powerpc/crypto/Makefile +++ b/arch/powerpc/crypto/Makefile @@ -11,7 +11,7 @@ obj-$(CONFIG_CRYPTO_DEV_VMX_ENCRYPT) += vmx-crypto.o aes-ppc-spe-y := aes-spe-glue.o aes-gcm-p10-crypto-y :...
0892c91b81cc889c95dc03b095b9f4a6fdf93106
Analyze and fix the following issue in the Linux kernel code: lib/crypto: powerpc/aes: Migrate SPE optimized code into library
Problem Details: Move the PowerPC SPE AES assembly code into lib/crypto/, wire the key expansion and single-block en/decryption functions up to the AES library API, and remove the superseded "aes-ppc-spe" crypto_cipher algorithm. The result is that both the AES library and crypto_cipher APIs are now optimized with SPE...
```diff diff --git a/arch/powerpc/crypto/Kconfig b/arch/powerpc/crypto/Kconfig index 662aed46f9c7..2d056f1fc90f 100644 --- a/arch/powerpc/crypto/Kconfig +++ b/arch/powerpc/crypto/Kconfig @@ -5,9 +5,9 @@ menu "Accelerated Cryptographic Algorithms for CPU (powerpc)" config CRYPTO_AES_PPC_SPE tristate "Ciphers: AES, mo...
2b1ef7aeeb184ee78523f3d24e221296574c6f2d
Analyze and fix the following issue in the Linux kernel code: lib/crypto: arm64/aes: Migrate optimized code into library
Problem Details: Move the ARM64 optimized AES key expansion and single-block AES en/decryption code into lib/crypto/, wire it up to the AES library API, and remove the superseded crypto_cipher algorithms. The result is that both the AES library and crypto_cipher APIs are now optimized for ARM64, whereas previously onl...
```diff diff --git a/arch/arm64/crypto/Kconfig b/arch/arm64/crypto/Kconfig index 4453dff8f0c1..81ed892b3b72 100644 --- a/arch/arm64/crypto/Kconfig +++ b/arch/arm64/crypto/Kconfig @@ -37,34 +37,11 @@ config CRYPTO_SM3_ARM64_CE Architecture: arm64 using: - ARMv8.2 Crypto Extensions -config CRYPTO_AES_ARM64 - tr...
fa2297750c2cc61788d1843f358dbfecaa42944f
Analyze and fix the following issue in the Linux kernel code: lib/crypto: arm/aes: Migrate optimized code into library
Problem Details: Move the ARM optimized single-block AES en/decryption code into lib/crypto/, wire it up to the AES library API, and remove the superseded "aes-arm" crypto_cipher algorithm. The result is that both the AES library and crypto_cipher APIs are now optimized for ARM, whereas previously only crypto_cipher w...
```diff diff --git a/arch/arm/configs/milbeaut_m10v_defconfig b/arch/arm/configs/milbeaut_m10v_defconfig index a2995eb390c6..77b69d672d40 100644 --- a/arch/arm/configs/milbeaut_m10v_defconfig +++ b/arch/arm/configs/milbeaut_m10v_defconfig @@ -98,7 +98,6 @@ CONFIG_CRYPTO_SELFTESTS=y CONFIG_CRYPTO_AES=y CONFIG_CRYPTO_S...
5be8dcc1d0dd5b4bd431d1d052e79f01dd2e33c4
Analyze and fix the following issue in the Linux kernel code: crypto: arm64/aes - Select CRYPTO_LIB_SHA256 from correct places
Problem Details: The call to sha256() occurs in code that is built when either CRYPTO_AES_ARM64_CE_BLK or CRYPTO_AES_ARM64_NEON_BLK. The option CRYPTO_AES_ARM64 is unrelated, notwithstanding its documentation. I'll be removing CRYPTO_AES_ARM64 soon anyway, but before doing that, fix where CRYPTO_LIB_SHA256 is selecte...
```diff diff --git a/arch/arm64/crypto/Kconfig b/arch/arm64/crypto/Kconfig index da1c9ea8ea83..4453dff8f0c1 100644 --- a/arch/arm64/crypto/Kconfig +++ b/arch/arm64/crypto/Kconfig @@ -40,7 +40,6 @@ config CRYPTO_SM3_ARM64_CE config CRYPTO_AES_ARM64 tristate "Ciphers: AES, modes: ECB, CBC, CTR, CTS, XCTR, XTS" selec...
a22fd0e3c495dd2d706c49c26663476e24d96e7d
Analyze and fix the following issue in the Linux kernel code: lib/crypto: aes: Introduce improved AES library
Problem Details: The kernel's AES library currently has the following issues: - It doesn't take advantage of the architecture-optimized AES code, including the implementations using AES instructions. - It's much slower than even the other software AES implementations: 2-4 times slower than "aes-generic", "aes-arm...
```diff diff --git a/include/crypto/aes.h b/include/crypto/aes.h index 9339da7c20a8..e8b83d4849fe 100644 --- a/include/crypto/aes.h +++ b/include/crypto/aes.h @@ -18,6 +18,60 @@ #define AES_MAX_KEYLENGTH (15 * 16) #define AES_MAX_KEYLENGTH_U32 (AES_MAX_KEYLENGTH / sizeof(u32)) +union aes_enckey_arch { + u32 rndkeys...
f815fc0c66e777c727689666cfb46b8d461c2f99
Analyze and fix the following issue in the Linux kernel code: perf unwind-libdw: Fix invalid reference counts
Problem Details: The addition of addr_location__exit() causes use-after put on the maps and map references in the unwind info. Add the gets and then add the map_symbol__exit() calls. Fixes: 0dd5041c9a0eaf8c ("perf addr_location: Add init/exit/copy functions") Reviewed-by: James Clark <james.clark@linaro.org> Signed-of...
```diff diff --git a/tools/perf/util/unwind-libdw.c b/tools/perf/util/unwind-libdw.c index ae70fb56a057..3ff427a49e4c 100644 --- a/tools/perf/util/unwind-libdw.c +++ b/tools/perf/util/unwind-libdw.c @@ -136,8 +136,8 @@ static int entry(u64 ip, struct unwind_info *ui) } e->ip = ip; - e->ms.maps = al.maps; - e->m...
0d92c555320ad34e67523063e32630cfad13af5f
Analyze and fix the following issue in the Linux kernel code: lib/crypto: nh: Restore dependency of arch code on !KMSAN
Problem Details: Since the architecture-specific implementations of NH initialize memory in assembly code, they aren't compatible with KMSAN as-is. Fixes: 382de740759a ("lib/crypto: nh: Add NH library") Link: https://lore.kernel.org/r/20260105053652.1708299-1-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@k...
```diff diff --git a/lib/crypto/Kconfig b/lib/crypto/Kconfig index 33cf46bbadc8..781a42c5c572 100644 --- a/lib/crypto/Kconfig +++ b/lib/crypto/Kconfig @@ -116,7 +116,7 @@ config CRYPTO_LIB_NH config CRYPTO_LIB_NH_ARCH bool - depends on CRYPTO_LIB_NH && !UML + depends on CRYPTO_LIB_NH && !UML && !KMSAN default y ...
272bd8183376a9e20fe08bacbaa44003d7c8acaa
Analyze and fix the following issue in the Linux kernel code: cgroup/cpuset: Move the v1 empty cpus/mems check to cpuset1_validate_change()
Problem Details: As stated in commit 1c09b195d37f ("cpuset: fix a regression in validating config change"), it is not allowed to clear masks of a cpuset if there're tasks in it. This is specific to v1 since empty "cpuset.cpus" or "cpuset.mems" will cause the v2 cpuset to inherit the effective CPUs or memory nodes from ...
```diff diff --git a/kernel/cgroup/cpuset-internal.h b/kernel/cgroup/cpuset-internal.h index e8e2683cb067..fd7d19842ded 100644 --- a/kernel/cgroup/cpuset-internal.h +++ b/kernel/cgroup/cpuset-internal.h @@ -260,6 +260,15 @@ static inline int nr_cpusets(void) return static_key_count(&cpusets_enabled_key.key) + 1; } ...
2a3602030d800b6600ef55c31e21bc54611f7770
Analyze and fix the following issue in the Linux kernel code: cgroup/cpuset: Don't invalidate sibling partitions on cpuset.cpus conflict
Problem Details: Currently, when setting a cpuset's cpuset.cpus to a value that conflicts with the cpuset.cpus/cpuset.cpus.exclusive of a sibling partition, the sibling's partition state becomes invalid. This is overly harsh and is probably not necessary. The cpuset.cpus.exclusive control file, if set, will override t...
```diff diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-guide/cgroup-v2.rst index 510df2461aff..28613c0e1c90 100644 --- a/Documentation/admin-guide/cgroup-v2.rst +++ b/Documentation/admin-guide/cgroup-v2.rst @@ -2584,9 +2584,9 @@ Cpuset Interface Files of this file will always be a subset o...
a1a01793ae1f6f99fd7174988d49b43cd1cb36c3
Analyze and fix the following issue in the Linux kernel code: cgroup/cpuset: Consistently compute effective_xcpus in update_cpumasks_hier()
Problem Details: Since commit f62a5d39368e ("cgroup/cpuset: Remove remote_partition_check() & make update_cpumasks_hier() handle remote partition"), the compute_effective_exclusive_cpumask() helper was extended to strip exclusive CPUs from siblings when computing effective_xcpus (cpuset.cpus.exclusive.effective). This ...
```diff diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index da2b3b51630e..894131f47f78 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -2168,17 +2168,13 @@ get_css: spin_lock_irq(&callback_lock); cpumask_copy(cp->effective_cpus, tmp->new_cpus); cp->partition_root_state = new_...
ef92c4351ec75bcfb8a1cc3a88109b5339f296ef
Analyze and fix the following issue in the Linux kernel code: perf test subcmd help: Add exclude disjoint subcmd names
Problem Details: The test is based on an error/fix posted to linux-perf-users. Reported-by: Sri Jayaramappa <sjayaram@akamai.com> Reviewed-by: Sri Jayaramappa <sjayaram@akamai.com> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linu...
```diff diff --git a/tools/perf/tests/subcmd-help.c b/tools/perf/tests/subcmd-help.c index 2280b4c0e5e7..9da96a16fd20 100644 --- a/tools/perf/tests/subcmd-help.c +++ b/tools/perf/tests/subcmd-help.c @@ -95,10 +95,36 @@ static int test__exclude_cmdnames(struct test_suite *test __maybe_unused, return TEST_OK; } +sta...
383f8e26e2c483e25453f8c3d0839877708ac701
Analyze and fix the following issue in the Linux kernel code: perf build: Raise minimum shellcheck version to 0.7.2
Problem Details: Raise the minimum shellcheck version for perf builds to 0.7.2, so that systems with shellcheck versions below 0.7.2 will automatically skip the shell script checking, even if NO_SHELLCHECK is unset. Since commit 241f21be7d0fdf3c ("perf test perftool_testsuite: Use absolute paths"), shellcheck versions...
```diff diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index b3f481a626af..e6895626c187 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -251,11 +251,12 @@ else endif # shellcheck is using in tools/perf/tests/Build with option -a/--check-sourced ( -# introduced in v0.4.7) an...
e272628902c1c96731e2d9f62a7fc77767686eb0
Analyze and fix the following issue in the Linux kernel code: perf test stat tests: Fix for virtualized machines
Problem Details: On s390 'perf test's 'perf stat tests', subtest test_hybrid fails for z/VM systems. The root cause is this statement: $(perf stat -a -- sleep 0.1 2>&1 |\ grep -E "/cpu-cycles/[uH]*| cpu-cycles[:uH]* -c) The 'perf stat' output on a s390 z/VM system is # perf stat -a -- sleep 0...
```diff diff --git a/tools/perf/tests/shell/stat.sh b/tools/perf/tests/shell/stat.sh index 0b2f0f88ca16..792a0b79f6b8 100755 --- a/tools/perf/tests/shell/stat.sh +++ b/tools/perf/tests/shell/stat.sh @@ -233,7 +233,7 @@ test_hybrid() { fi # Run default Perf stat - cycles_events=$(perf stat -a -- sleep 0.1 2>&1 ...
2120f3a3738a65730c81bf10447b1ff776078915
Analyze and fix the following issue in the Linux kernel code: wifi: mwifiex: Fix a loop in mwifiex_update_ampdu_rxwinsize()
Problem Details: The "i" iterator variable is used to count two different things but unfortunately we can't store two different numbers in the same variable. Use "i" for the outside loop and "j" for the inside loop. Cc: stable@vger.kernel.org Fixes: d219b7eb3792 ("mwifiex: handle BT coex event to adjust Rx BA window s...
```diff diff --git a/drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c b/drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c index 354c5ce66045..f3397dc6c422 100644 --- a/drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c +++ b/drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c @@ -825,7 +825,7 @@ void mwifiex_...
db1d0b6ab11f612ea8a327663a578c8946efeee9
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: correctly check if CSA is active
Problem Details: We are not adding an interface if an existing one is doing CSA. But the check won't work for MLO station interfaces, since for those, vif->bss_conf is zeroed out. Fix this by checking if any link of the vif has an active CSA. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Kor...
```diff diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 7b0aa24c1f97..515384ca2f8f 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c @@ -350,6 +350,8 @@ static int ieee80211_check_concurrent_iface(struct ieee80211_sub_if_data *sdata, /* we hold the RTNL here so can safely walk the list */ ...
a3034bf0746d88a00cceda9541534a5721445a24
Analyze and fix the following issue in the Linux kernel code: wifi: cfg80211: Fix bitrate calculation overflow for HE rates
Problem Details: An integer overflow occurs in cfg80211_calculate_bitrate_he() when calculating bitrates for high throughput HE configurations. For example, with 160 MHz bandwidth, HE-MCS 13, HE-NSS 4, and HE-GI 0, the multiplication (result * rate->nss) overflows the 32-bit 'result' variable before division by 8, lead...
```diff diff --git a/net/wireless/util.c b/net/wireless/util.c index 27e8a2f52f04..4f581aed45b7 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -1561,12 +1561,14 @@ static u32 cfg80211_calculate_bitrate_he(struct rate_info *rate) tmp = result; tmp *= SCALE; do_div(tmp, mcs_divisors[rate->mcs]); - re...
4f431d88ea8093afc7ba55edf4652978c5a68f33
Analyze and fix the following issue in the Linux kernel code: wifi: rsi: Fix memory corruption due to not set vif driver data size
Problem Details: The struct ieee80211_vif contains trailing space for vif driver data, when struct ieee80211_vif is allocated, the total memory size that is allocated is sizeof(struct ieee80211_vif) + size of vif driver data. The size of vif driver data is set by each WiFi driver as needed. The RSI911x driver does not...
```diff diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c index f3a853edfc11..8c8e074a3a70 100644 --- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c +++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c @@ -2035,6 +2035,7 @@ int rsi_mac80211_attach(struct rsi_common *comm...
8f334e35220721f65180bc2e0fe9187436c2c475
Analyze and fix the following issue in the Linux kernel code: ACPI: PM: s2idle: Add missing checks to acpi_s2idle_begin_lps0()
Problem Details: Commit 32ece31db4df ("ACPI: PM: s2idle: Only retrieve constraints when needed"), that attempted to avoid useless evaluation of LPS0 _DSM Function 1 in lps0_device_attach(), forgot to add checks for lps0_device_handle and sleep_no_lps0 to acpi_s2idle_begin_lps0() where they should be done before calling...
```diff diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c index 6d4d06236f61..2a9edb53d5d4 100644 --- a/drivers/acpi/x86/s2idle.c +++ b/drivers/acpi/x86/s2idle.c @@ -515,7 +515,8 @@ static struct acpi_scan_handler lps0_handler = { static int acpi_s2idle_begin_lps0(void) { - if (pm_debug_messages_on...
7a8737e1132ff07ca225aa7a4008f87319b5b1ca
Analyze and fix the following issue in the Linux kernel code: io_uring: use release-acquire ordering for IORING_SETUP_R_DISABLED
Problem Details: io_uring_enter(), __io_msg_ring_data(), and io_msg_send_fd() read ctx->flags and ctx->submitter_task without holding the ctx's uring_lock. This means they may race with the assignment to ctx->submitter_task and the clearing of IORING_SETUP_R_DISABLED from ctx->flags in io_register_enable_rings(). Ensur...
```diff diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 1aebdba425e8..559932b851ca 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -3228,7 +3228,11 @@ SYSCALL_DEFINE6(io_uring_enter, unsigned int, fd, u32, to_submit, ctx = file->private_data; ret = -EBADFD; - if (unlikely(ctx->flags & I...
ca909f9ea8cb19032c9d9d7841a8e2395b6a9e8b
Analyze and fix the following issue in the Linux kernel code: KVM: x86: Drop ASSERT() on I/O APIC EOIs being only for LEVEL_to WARN_ON_ONCE
Problem Details: Remove kvm_ioapic_update_eoi_one()'s ASSERT() that the vector's entry is configured to be level-triggered, as KVM intercepts and forward EOIs to the I/O APIC even for edge-triggered IRQs (see kvm_ioapic_scan_entry()), and nothing guarantees the local APIC's TMR register is synchronized with the I/O API...
```diff diff --git a/arch/x86/kvm/ioapic.c b/arch/x86/kvm/ioapic.c index 2c2783296aed..e7315b9311d3 100644 --- a/arch/x86/kvm/ioapic.c +++ b/arch/x86/kvm/ioapic.c @@ -37,11 +37,6 @@ static int ioapic_service(struct kvm_ioapic *vioapic, int irq, bool line_status); -static void kvm_ioapic_update_eoi_one(struct kvm_...
37187992dd821e0283da3f7664ef3d6ab4220ef8
Analyze and fix the following issue in the Linux kernel code: KVM: x86: Drop guest/user-triggerable asserts on IRR/ISR vectors
Problem Details: Remove the ASSERT()s in apic_find_highest_i{r,s}r() that exist to detect illegal vectors (0-15 are reserved and never recognized by the local APIC), as the asserts, if they were ever to be enabled by #defining DEBUG, can be trivially triggered from both the guest and from userspace, and ultimately beca...
```diff diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 558adcb67171..785c0352fa0e 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -666,8 +666,6 @@ static inline int apic_search_irr(struct kvm_lapic *apic) static inline int apic_find_highest_irr(struct kvm_lapic *apic) { - int result;...
a4978324e4bd80427313e0baa16e53709e14d878
Analyze and fix the following issue in the Linux kernel code: KVM: x86: Drop ASSERT()s on APIC/vCPU being non-NULL
Problem Details: Remove ASSERT()s on vCPU and APIC structures being non-NULL in the local APIC code as the DEBUG=1 path of ASSERT() ends with BUG(), i.e. isn't meaningfully better for debugging than a NULL pointer dereference. For all intents and purposes, no functional change intended. Link: https://patch.msgid.link...
```diff diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 1597dd0b0cc6..558adcb67171 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -1048,7 +1048,6 @@ bool kvm_apic_match_dest(struct kvm_vcpu *vcpu, struct kvm_lapic *source, struct kvm_lapic *target = vcpu->arch.apic; u32 mda = kvm_api...
f93fc5d12d69012788f82151bee55fce937e1432
Analyze and fix the following issue in the Linux kernel code: net: octeon_ep_vf: fix free_irq dev_id mismatch in IRQ rollback
Problem Details: octep_vf_request_irqs() requests MSI-X queue IRQs with dev_id set to ioq_vector. If request_irq() fails part-way, the rollback loop calls free_irq() with dev_id set to 'oct', which does not match the original dev_id and may leave the irqaction registered. This can keep IRQ handlers alive while ioq_vec...
```diff diff --git a/drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_main.c b/drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_main.c index 420c3f4cf741..1d9760b4b8f4 100644 --- a/drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_main.c +++ b/drivers/net/ethernet/marvell/octeon_ep_vf/octep_vf_main.c @@ -218,7 +21...
803e18641fd444a614415711a5af53dcde21104b
Analyze and fix the following issue in the Linux kernel code: NFS: Don't immediately return directory delegations when disabled
Problem Details: The function nfs_inode_evict_delegation() immediately and synchronously returns a delegation when called. This means we can't call it from nfs4_have_delegation(), since that function could be called under a lock. Instead we should mark the delegation for return and let the state manager handle it for u...
```diff diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index c9fa4c1f68fc..8a3857a49d84 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -149,7 +149,7 @@ static int nfs4_do_check_delegation(struct inode *inode, fmode_t type, int nfs4_have_delegation(struct inode *inode, fmode_t type, int flags) {...
05f66cf5e7a5fc7c7227541f8a4a476037999916
Analyze and fix the following issue in the Linux kernel code: PCI: Provide pci_free_irq_vectors() stub
Problem Details: 473b9f331718 ("rust: pci: fix build failure when CONFIG_PCI_MSI is disabled") fixed a build error by providing Rust helpers when CONFIG_PCI_MSI is not set. However the Rust helpers rely on pci_free_irq_vectors(), which is only available when CONFIG_PCI=y. When CONFIG_PCI is not set, there is already a...
```diff diff --git a/include/linux/pci.h b/include/linux/pci.h index 864775651c6f..b5cc0c2b9906 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -2210,6 +2210,10 @@ pci_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs, { return -ENOSPC; } + +static inline void pci_free_irq_vectors(struct pc...
a02857e73494a0c4dbeba16d8e6567de4ba1ca97
Analyze and fix the following issue in the Linux kernel code: Documentation/trace: Fix links to other documents
Problem Details: Link to another document does not require 'file:'. Removing it fixes links in generated html docs. Signed-off-by: Petr Vorel <pvorel@suse.cz> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <20260111223643.174812-2-pvorel@suse.cz>
```diff diff --git a/Documentation/trace/fprobe.rst b/Documentation/trace/fprobe.rst index 06b0edad0179..95998b189ae3 100644 --- a/Documentation/trace/fprobe.rst +++ b/Documentation/trace/fprobe.rst @@ -79,7 +79,7 @@ The above is defined by including the header:: Same as ftrace, the registered callbacks will start b...
829656c3e263e4517a97ae02e5d60600339ed789
Analyze and fix the following issue in the Linux kernel code: Documentation: bug-hunting.rst: Remove wrong 'file:' syntax
Problem Details: Link to another document does not require 'file:', therefore it was shown in generated html. Preformatted text requires just ``...``. Signed-off-by: Petr Vorel <pvorel@suse.cz> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <20260111223643.174812-1-pvorel@suse.cz>
```diff diff --git a/Documentation/admin-guide/bug-hunting.rst b/Documentation/admin-guide/bug-hunting.rst index 7da0504388ec..3901b43c96df 100644 --- a/Documentation/admin-guide/bug-hunting.rst +++ b/Documentation/admin-guide/bug-hunting.rst @@ -52,14 +52,14 @@ line is usually required to identify and handle the bug. ...
09dc08b396c954820f119e1ab0c7d72333c18323
Analyze and fix the following issue in the Linux kernel code: regulator: dummy, make dummy_regulator_driver static
Problem Details: When converting to faux_device the dummy_regulator_driver was made non-static however it isn't exported or defined anywhere outside the file it is in. Make it static to avoid the following sparse warning: drivers/regulator/dummy.c:59:24: warning: symbol 'dummy_regulator_driver' was not declared. Shoul...
```diff diff --git a/drivers/regulator/dummy.c b/drivers/regulator/dummy.c index e5197ec7234d..c3e416fd3c3e 100644 --- a/drivers/regulator/dummy.c +++ b/drivers/regulator/dummy.c @@ -56,7 +56,7 @@ static int dummy_regulator_probe(struct faux_device *fdev) return 0; } -struct faux_device_ops dummy_regulator_driver ...
be82a89066d595da334f6e153ababcedc3f92ad6
Analyze and fix the following issue in the Linux kernel code: ublk: implement integrity user copy
Problem Details: Add a function ublk_copy_user_integrity() to copy integrity information between a request and a user iov_iter. This mirrors the existing ublk_copy_user_pages() but operates on request integrity data instead of regular data. Check UBLKSRV_IO_INTEGRITY_FLAG in iocb->ki_pos in ublk_user_copy() to choose b...
```diff diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c index d428a25121db..5c441f507c43 100644 --- a/drivers/block/ublk_drv.c +++ b/drivers/block/ublk_drv.c @@ -1040,6 +1040,33 @@ static size_t ublk_copy_user_pages(const struct request *req, return done; } +#ifdef CONFIG_BLK_DEV_INTEGRITY +static...
d4026a44626490dc4eca4dd2c4d0816338fa179b
Analyze and fix the following issue in the Linux kernel code: cxl/hdm: Fix potential infinite loop in __cxl_dpa_reserve()
Problem Details: In __cxl_dpa_reserve(), it will check if the new resource range is included in one of paritions of the cxl memory device. cxlds->nr_paritions is used to represent how many partitions information the cxl memory device has. In the loop, if driver cannot find a partition including the new resource range, ...
```diff diff --git a/drivers/cxl/core/hdm.c b/drivers/cxl/core/hdm.c index 1c5d2022c87a..a470099a69f1 100644 --- a/drivers/cxl/core/hdm.c +++ b/drivers/cxl/core/hdm.c @@ -403,7 +403,7 @@ static int __cxl_dpa_reserve(struct cxl_endpoint_decoder *cxled, * is not set. */ if (cxled->part < 0) - for (int i = 0; cxl...
a2062463e894039a6fdc2334b96afd91d44b64a8
Analyze and fix the following issue in the Linux kernel code: fs: ensure that internal tmpfs mount gets mount id zero
Problem Details: and the rootfs get mount id one as it always has. Before we actually mount the rootfs we create an internal tmpfs mount which has mount id zero but is never exposed anywhere. Continue that "tradition". Link: https://patch.msgid.link/20260112-work-immutable-rootfs-v2-1-88dd1c34a204@kernel.org Fixes: 7f...
```diff diff --git a/fs/namespace.c b/fs/namespace.c index c58674a20cad..8b082b1de7f3 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -221,7 +221,7 @@ static int mnt_alloc_id(struct mount *mnt) int res; xa_lock(&mnt_id_xa); - res = __xa_alloc(&mnt_id_xa, &mnt->mnt_id, mnt, XA_LIMIT(1, INT_MAX), GFP_KERNEL); +...
bbf8c67aa6ae8bd588f097510d887dad071f9f43
Analyze and fix the following issue in the Linux kernel code: tools: jobserver: Prevent deadlock caused by incorrect jobserver configuration and enhance error reporting
Problem Details: When using GNU Make's jobserver feature in kernel builds, a bug in MAKEFLAGS propagation caused "--jobserver-auth=r,w" to reference an unintended file descriptor. This led to infinite loops in jobserver-exec's os.read() calls due to empty token. My shell opened /etc/passwd for some reason without clos...
```diff diff --git a/tools/lib/python/jobserver.py b/tools/lib/python/jobserver.py index a24f30ef4fa8..616411087725 100755 --- a/tools/lib/python/jobserver.py +++ b/tools/lib/python/jobserver.py @@ -91,6 +91,10 @@ class JobserverExec: while True: try: slot = os.read(se...
a11224a016d6d1d46a4d9b6573244448a80d4d7f
Analyze and fix the following issue in the Linux kernel code: btrfs: fix memory leaks in create_space_info() error paths
Problem Details: In create_space_info(), the 'space_info' object is allocated at the beginning of the function. However, there are two error paths where the function returns an error code without freeing the allocated memory: 1. When create_space_info_sub_group() fails in zoned mode. 2. When btrfs_sysfs_add_space_info...
```diff diff --git a/fs/btrfs/space-info.c b/fs/btrfs/space-info.c index 6babbe333741..3f08e450f796 100644 --- a/fs/btrfs/space-info.c +++ b/fs/btrfs/space-info.c @@ -306,18 +306,22 @@ static int create_space_info(struct btrfs_fs_info *info, u64 flags) 0); if (ret) - return ret; + goto out_free; } ...
d73298f015341530da84b96d8310854af90dc425
Analyze and fix the following issue in the Linux kernel code: x86/paravirt: Remove PARAVIRT_DEBUG config option
Problem Details: The only effect of CONFIG_PARAVIRT_DEBUG set is that instead of doing a call using a NULL pointer a BUG() is being raised. While the BUG() will be a little bit easier to analyse, the call of NULL isn't really that difficult to find the reason for. Remove the config option to make paravirt coding a li...
```diff diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 80527299f859..1f30358dfecd 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -809,13 +809,6 @@ config PARAVIRT_XXL bool depends on X86_64 -config PARAVIRT_DEBUG - bool "paravirt-ops debugging" - depends on PARAVIRT && DEBUG_KERNEL - help - Ena...
469d71512d135907bf5ea0972dfab8c420f57848
Analyze and fix the following issue in the Linux kernel code: Revert "gfs2: Fix use of bio_chain"
Problem Details: This reverts commit 8a157e0a0aa5143b5d94201508c0ca1bb8cfb941. That commit incorrectly assumed that the bio_chain() arguments were swapped in gfs2. However, gfs2 intentionally constructs bio chains so that the first bio's bi_end_io callback is invoked when all bios in the chain have completed, unlike ...
```diff diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index 97ebe457c00a..d27a0b1080a9 100644 --- a/fs/gfs2/lops.c +++ b/fs/gfs2/lops.c @@ -484,7 +484,7 @@ static struct bio *gfs2_chain_bio(struct bio *prev, unsigned int nr_iovecs) new = bio_alloc(prev->bi_bdev, nr_iovecs, prev->bi_opf, GFP_NOIO); bio_clone_blkg_ass...
5cf76277cdec872aef9ff2e9008ae129bb303787
Analyze and fix the following issue in the Linux kernel code: gpu: nova-core: check for overflow to DMATRFBASE1
Problem Details: The NV_PFALCON_FALCON_DMATRFBASE/1 register pair supports DMA addresses up to 49 bits only, but the write to DMATRFBASE1 could exceed that. To mitigate, check first that the DMA address will fit. Reviewed-by: John Hubbard <jhubbard@nvidia.com> Reviewed-by: Joel Fernandes <joelagnelf@nvidia.com> Fixes:...
```diff diff --git a/drivers/gpu/nova-core/falcon.rs b/drivers/gpu/nova-core/falcon.rs index 82c661aef594..3ab33ea36d9c 100644 --- a/drivers/gpu/nova-core/falcon.rs +++ b/drivers/gpu/nova-core/falcon.rs @@ -8,7 +8,10 @@ use hal::FalconHal; use kernel::{ device, - dma::DmaAddress, + dma::{ + DmaAddr...
a92c68eb1e19de9ea8de6c7d3bcfff6c3fcb3c10
Analyze and fix the following issue in the Linux kernel code: drm/xe/mert: Fix kernel-doc for struct xe_mert
Problem Details: Add simple top level kernel-doc for the struct itself to allow the script recognize that and fix tag of the one member. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Lukasz Laguna <lukasz.laguna@intel.com> Reviewed-by: Lukasz Laguna <lukasz.laguna@intel.com> Link: https://patch.msgi...
```diff diff --git a/drivers/gpu/drm/xe/xe_mert.h b/drivers/gpu/drm/xe/xe_mert.h index 0de8243e46bd..0e27f9fa24bb 100644 --- a/drivers/gpu/drm/xe/xe_mert.h +++ b/drivers/gpu/drm/xe/xe_mert.h @@ -13,12 +13,15 @@ struct xe_device; struct xe_tile; +/** + * struct xe_mert - MERT related data + */ struct xe_mert { /*...
04ccbc5325ccd2b96ef5c3dde1a50495980404c8
Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt8173-elm: Remove regulators from thermal node
Problem Details: The only reason to have a regulator in the thermal node is to keep the CPU cores up while reading temperatures, but this is incorrect because the AUXADC Thermal IP doesn't need any regulators to work, at all. Since the thermal node was inherited only for adding vregs, remove it entirely. This change i...
```diff diff --git a/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi b/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi index dc064cdcedb5..a0573bc359fb 100644 --- a/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi @@ -1147,11 +1147,6 @@ status = "okay"; }; -&thermal { - ban...
6c0ecd0ae8f64b8d70ba3522ef6903753425e2c4
Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt8173-elm: Fix dsi0 ports warning
Problem Details: Since only a single port is present, remove the inner `ports` parent node and just declare the single port as `port`. Reviewed-by: Chen-Yu Tsai <wenst@chromium.org> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
```diff diff --git a/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi b/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi index 59813fff7833..dc064cdcedb5 100644 --- a/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi @@ -206,11 +206,9 @@ &dsi0 { status = "okay"; - ports { - p...
870ffe2999b5b558e2e6bfc7e7c6324130f08e47
Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt8173-elm: Fix bluetooth node name and reorder
Problem Details: Change the node name for Marvell SD8897 SDIO Bluetooth from `btmrvl@2` to `bluetooth@2` to fix a dtbs_check warning. While at it, also change the WiFi one from `mwifiex@1" to a generic "wifi@1" and reorder the nodes so that wifi@1 comes before bluetooth@2. Reviewed-by: Chen-Yu Tsai <wenst@chromium.or...
```diff diff --git a/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi b/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi index 9ec930058b92..59813fff7833 100644 --- a/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi @@ -432,20 +432,20 @@ #address-cells = <1>; #size-cells = <0>...
08076645d9ac216b5d78930f52d4fc4d6807cd22
Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt8183-pumpkin: Fix pinmux node names
Problem Details: Change all of the pinmux main nodes to have a "-pins" suffix to satisfy devicetree bindings checks. Reviewed-by: Chen-Yu Tsai <wenst@chromium.org> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
```diff diff --git a/arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts b/arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts index f60ef3e53a09..e47955602c83 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts +++ b/arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts @@ -241,7 +241,7 @@ }; &pio { - i2c_pins_0: i2c0 ...
b1fc81a986c9b8089db31e21a372cc8b6514e900
Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt8183-jacuzzi-pico6: Fix typo in pinmux node
Problem Details: Rename "piins-bt-wakeup" to "pins-bt-wakeup" to fix a dtbs_check warning happening due to this typo. Fixes: 055ef10ccdd4 ("arm64: dts: mt8183: Add jacuzzi pico/pico6 board") Reviewed-by: Chen-Yu Tsai <wenst@chromium.org> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.co...
```diff diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-pico6.dts b/arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-pico6.dts index cce326aec1aa..40af5656d6f1 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-pico6.dts +++ b/arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-pico6.dts @@ -9...
55828e41e7398b630b036eabf3329828706491a0
Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt7981b-openwrt-one: Remove useless cells from flash@0
Problem Details: In spi2's flash@0 there is only one `partitions` subnode: this alone makes specifying address and size cells useless, but then this subnode has no address and no size, which even makes the currently declared address/size cells wrong. Fixes: 869b3bb5ada2 ("arm64: dts: mediatek: mt7981b-openwrt-one: Ena...
```diff diff --git a/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts b/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts index 3de368c73bc8..48b80af90438 100644 --- a/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts +++ b/arch/arm64/boot/dts/mediatek/mt7981b-openwrt-one.dts @@ -213,8 +213,6 @@ compatible...
846348a699f9cf9fba4188870b929f88e7556cc1
Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt8183-evb: Fix dtbs_check warnings
Problem Details: Change the Murata NCM03WF104 node name from "thermal-sensor" to "thermistor" (as that's what it is, after all), and change all of the pinmux main nodes to have a "-pins" suffix to satisfy devicetree bindings checks. Reviewed-by: Chen-Yu Tsai <wenst@chromium.org> Signed-off-by: AngeloGioacchino Del Reg...
```diff diff --git a/arch/arm64/boot/dts/mediatek/mt8183-evb.dts b/arch/arm64/boot/dts/mediatek/mt8183-evb.dts index f04baea5d6cb..acfdd5fb041f 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183-evb.dts +++ b/arch/arm64/boot/dts/mediatek/mt8183-evb.dts @@ -38,7 +38,7 @@ }; }; - thermal-sensor { + thermistor { c...
c68a509320a635f5bfa6c43d0c91c964a8fa678f
Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt8173: Fix pinctrl node names and cleanup
Problem Details: Fix the pinctrl node names to adhere to the bindings, as the main pin node is supposed to be named like "uart0-pins" and the pinmux node named like "pins-bus". While at it, also cleanup all of the MTK_DRIVE_(x)mA by changing that to just the (x) number. Reviewed-by: Chen-Yu Tsai <wenst@chromium.org> ...
```diff diff --git a/arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi b/arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi index dfc5c2f0ddef..1004eb8ea52c 100644 --- a/arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8173-elm-hana.dtsi @@ -5,6 +5,14 @@ #include "mt8173-elm.dtsi...
08489c4f41333913c9be27a031b070f4452e9374
Analyze and fix the following issue in the Linux kernel code: xfs: enable non-blocking timestamp updates
Problem Details: The lazytime path using the generic helpers can never block in XFS because there is no ->dirty_inode method that could block. Allow non-blocking timestamp updates for this case by replacing generic_update_time with the open coded version without the S_NOWAIT check. Fixes: 66fa3cedf16a ("fs: Add async...
```diff diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c index 338f3113f674..1cdd8a360510 100644 --- a/fs/xfs/xfs_iops.c +++ b/fs/xfs/xfs_iops.c @@ -1195,16 +1195,22 @@ xfs_vn_update_time( trace_xfs_update_time(ip); - if (flags & IOCB_NOWAIT) - return -EAGAIN; - if (inode->i_sb->s_flags & SB_LAZYTIME) { - i...
e590752119029d87ce46d725e11245a52d22e1fe
Analyze and fix the following issue in the Linux kernel code: ASoC: wm8962: Don't report a microphone if it's shorted to ground on plug
Problem Details: This usually means that a TRS plug with no microphone pin has been plugged into a TRRS socket. Cases where a user is plugging in a microphone while pressing a button will be handled via incoming interrupt after the user releases the button, so the microphone will still be detected once it becomes usabl...
```diff diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index 1040740fc80f..bff864467416 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c @@ -67,6 +67,8 @@ struct wm8962_priv { struct mutex dsp2_ena_lock; u16 dsp2_ena; + int mic_status; + struct delayed_work mic_work; ...
66c26346ae30c883eef70acf9cf9054dfdb4fb2f
Analyze and fix the following issue in the Linux kernel code: ASoC: wm8962: Add WM8962_ADC_MONOMIX to "3D Coefficients" mask
Problem Details: This bit is handled by a separate control. Signed-off-by: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20260105-wm8962-l5-fixes-v1-1-f4f4eeacf089@puri.sm Signed-off-by: Mark Brown <broonie@kernel.org>
```diff diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index e9e317ce6898..1040740fc80f 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c @@ -1760,7 +1760,7 @@ SND_SOC_BYTES("EQR Coefficients", WM8962_EQ24, 18), SOC_SINGLE("3D Switch", WM8962_THREED1, 0, 1, 0), -SND_SOC_BYT...
4b58aac989c1e3fafb1c68a733811859df388250
Analyze and fix the following issue in the Linux kernel code: regmap: Fix race condition in hwspinlock irqsave routine
Problem Details: Previously, the address of the shared member '&map->spinlock_flags' was passed directly to 'hwspin_lock_timeout_irqsave'. This creates a race condition where multiple contexts contending for the lock could overwrite the shared flags variable, potentially corrupting the state for the current lock owner....
```diff diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index ce9be3989a21..ae2215d4e61c 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -408,9 +408,11 @@ static void regmap_lock_hwlock_irq(void *__map) static void regmap_lock_hwlock_irqsave(void *__map) { st...
dc8ea8714311e549ee93a2b0bdd5487d20bfadbf
Analyze and fix the following issue in the Linux kernel code: xen/virtio: Don't use grant-dma-ops when running as Dom0
Problem Details: Dom0 inherit devices from the machine and is usually in PV mode. If we are running in a virtual that has virtio devices, these devices would be considered as using grants with Dom0 as backend, while being the said Dom0 itself, while we want to use these devices like regular PCI devices. Fix this by pr...
```diff diff --git a/drivers/xen/grant-dma-ops.c b/drivers/xen/grant-dma-ops.c index 14077d23f2a1..c2603e700178 100644 --- a/drivers/xen/grant-dma-ops.c +++ b/drivers/xen/grant-dma-ops.c @@ -366,7 +366,8 @@ static int xen_grant_init_backend_domid(struct device *dev, if (np) { ret = xen_dt_grant_init_backend_domid(...
383d4f5cffcc8df930d95b06518a9d25a6d74aac
Analyze and fix the following issue in the Linux kernel code: spi: spi-sprd-adi: Fix double free in probe error path
Problem Details: The driver currently uses spi_alloc_host() to allocate the controller but registers it using devm_spi_register_controller(). If devm_register_restart_handler() fails, the code jumps to the put_ctlr label and calls spi_controller_put(). However, since the controller was registered via a devm function, ...
```diff diff --git a/drivers/spi/spi-sprd-adi.c b/drivers/spi/spi-sprd-adi.c index 262c11d977ea..f25b34a91756 100644 --- a/drivers/spi/spi-sprd-adi.c +++ b/drivers/spi/spi-sprd-adi.c @@ -528,7 +528,7 @@ static int sprd_adi_probe(struct platform_device *pdev) pdev->id = of_alias_get_id(np, "spi"); num_chipselect = o...
81d0223832f99c0833e46be114a8310888015f8b
Analyze and fix the following issue in the Linux kernel code: drm/i915/guc: make 'guc_hw_reg_state' static as it isn't exported
Problem Details: The guc_hw_reg_state array is not exported, so make it static. Fixes the following sparse warning: drivers/gpu/drm/i915/i915_gpu_error.c:692:3: warning: symbol 'guc_hw_reg_state' was not declared. Should it be static? Fixes: ba391a102ec11 ("drm/i915/guc: Include the GuC registers in the error state") ...
```diff diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c index 7582ef34bf3f..303d8d9b7775 100644 --- a/drivers/gpu/drm/i915/i915_gpu_error.c +++ b/drivers/gpu/drm/i915/i915_gpu_error.c @@ -686,7 +686,7 @@ static void err_print_guc_ctb(struct drm_i915_error_state_buf *m, } /...
fd4be5de4594a3f045a51b749a770b3d5a8e4368
Analyze and fix the following issue in the Linux kernel code: arm64: dts: renesas: Use hyphens in node names
Problem Details: DTS coding style prefers hyphens instead of underscores in the node names. Change should be safe, because node names are not considered an ABI. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://patch.msgid...
```diff diff --git a/arch/arm64/boot/dts/renesas/beacon-renesom-som.dtsi b/arch/arm64/boot/dts/renesas/beacon-renesom-som.dtsi index d40a7224f9c3..af6d15f90c65 100644 --- a/arch/arm64/boot/dts/renesas/beacon-renesom-som.dtsi +++ b/arch/arm64/boot/dts/renesas/beacon-renesom-som.dtsi @@ -158,7 +158,7 @@ reg = <0x51>; ...
543467d6fe97e27e22a26e367fda972dbefebbff
Analyze and fix the following issue in the Linux kernel code: writeback: fix 100% CPU usage when dirtytime_expire_interval is 0
Problem Details: When vm.dirtytime_expire_seconds is set to 0, wakeup_dirtytime_writeback() schedules delayed work with a delay of 0, causing immediate execution. The function then reschedules itself with 0 delay again, creating an infinite busy loop that causes 100% kworker CPU usage. Fix by: - Only scheduling delaye...
```diff diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 6800886c4d10..cd21c74cd0e5 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -2492,7 +2492,8 @@ static void wakeup_dirtytime_writeback(struct work_struct *w) wb_wakeup(wb); } rcu_read_unlock(); - schedule_delayed_work(&dirtytime_work, dir...
c644bce62b9c6b441143a03c910f986109c47001
Analyze and fix the following issue in the Linux kernel code: readdir: require opt-in for d_type flags
Problem Details: Commit c31f91c6af96 ("fuse: don't allow signals to interrupt getdents copying") introduced the use of high bits in d_type as flags. However, overlayfs was not adapted to handle this change. In ovl_cache_entry_new(), the code checks if d_type == DT_CHR to determine if an entry might be a whiteout. When...
```diff diff --git a/fs/readdir.c b/fs/readdir.c index 7764b8638978..73707b6816e9 100644 --- a/fs/readdir.c +++ b/fs/readdir.c @@ -316,6 +316,7 @@ SYSCALL_DEFINE3(getdents, unsigned int, fd, struct getdents_callback buf = { .ctx.actor = filldir, .ctx.count = count, + .ctx.dt_flags_mask = FILLDIR_FLAG_NOINTR, ...
51e49111c00bee76ca403adf7cd617b71a9a0da4
Analyze and fix the following issue in the Linux kernel code: fs: remove simple_nosetlease()
Problem Details: Setting ->setlease() to a NULL pointer now has the same effect as setting it to simple_nosetlease(). Remove all of the setlease file_operations that are set to simple_nosetlease, and the function itself. Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20260108-setlease-6...
```diff diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c index af7f72abbb76..e0d34e4e9076 100644 --- a/fs/9p/vfs_dir.c +++ b/fs/9p/vfs_dir.c @@ -242,7 +242,6 @@ const struct file_operations v9fs_dir_operations = { .iterate_shared = v9fs_dir_readdir, .open = v9fs_file_open, .release = v9fs_dir_release, - .setlease =...
2b10994be716b07d881ad0f966d6a4bb13b20750
Analyze and fix the following issue in the Linux kernel code: filelock: default to returning -EINVAL when ->setlease operation is NULL
Problem Details: Now that most filesystems where we expect to need lease support have their ->setlease() operations explicitly set, change kernel_setlease() to return -EINVAL when the setlease is a NULL pointer. Also update the Documentation/ with info about this change. Signed-off-by: Jeff Layton <jlayton@kernel.org...
```diff diff --git a/Documentation/filesystems/porting.rst b/Documentation/filesystems/porting.rst index 3397937ed838..c0f7103628ab 100644 --- a/Documentation/filesystems/porting.rst +++ b/Documentation/filesystems/porting.rst @@ -1334,3 +1334,12 @@ end_creating() and the parent will be unlocked precisely when necessar...
8a5511eeaa5c4e5c2be6209abe549302b70311b0
Analyze and fix the following issue in the Linux kernel code: vboxsf: don't allow delegations to be set on directories
Problem Details: With the advent of directory leases, it's necessary to set the ->setlease() handler in directory file_operations to properly deny them. Fixes: e6d28ebc17eb ("filelock: push the S_ISREG check down to ->setlease handlers") Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20...
```diff diff --git a/fs/vboxsf/dir.c b/fs/vboxsf/dir.c index 42bedc4ec7af..230d7589d15c 100644 --- a/fs/vboxsf/dir.c +++ b/fs/vboxsf/dir.c @@ -186,6 +186,7 @@ const struct file_operations vboxsf_dir_fops = { .release = vboxsf_dir_release, .read = generic_read_dir, .llseek = generic_file_llseek, + .setlease = simp...
ffb321045b0f1cd8bcea215269fbaa17c12da038
Analyze and fix the following issue in the Linux kernel code: ceph: don't allow delegations to be set on directories
Problem Details: With the advent of directory leases, it's necessary to set the ->setlease() handler in directory file_operations to properly deny them. Fixes: e6d28ebc17eb ("filelock: push the S_ISREG check down to ->setlease handlers") Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20...
```diff diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 86d7aa594ea9..804588524cd5 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -2214,6 +2214,7 @@ const struct file_operations ceph_dir_fops = { .fsync = ceph_fsync, .lock = ceph_lock, .flock = ceph_flock, + .setlease = simple_nosetlease, }; const struct ...
ce946c4fb98c95519ee39ab7d4b117ff15f09efa
Analyze and fix the following issue in the Linux kernel code: gfs2: don't allow delegations to be set on directories
Problem Details: With the advent of directory leases, it's necessary to set the ->setlease() handler in directory file_operations to properly deny them. In the "nolock" case however, there is no need to deny them. Fixes: e6d28ebc17eb ("filelock: push the S_ISREG check down to ->setlease handlers") Signed-off-by: Jeff...
```diff diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index b2d23c98c996..86376f0dbf3a 100644 --- a/fs/gfs2/file.c +++ b/fs/gfs2/file.c @@ -1608,6 +1608,7 @@ const struct file_operations gfs2_dir_fops = { .lock = gfs2_lock, .flock = gfs2_flock, .llseek = default_llseek, + .setlease = simple_nosetlease, .fop_f...
5d65a70bd0437d2a7762164eb5015f6975937986
Analyze and fix the following issue in the Linux kernel code: 9p: don't allow delegations to be set on directories
Problem Details: With the advent of directory leases, it's necessary to set the ->setlease() handler in directory file_operations to properly deny them. Fixes: e6d28ebc17eb ("filelock: push the S_ISREG check down to ->setlease handlers") Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20...
```diff diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c index e0d34e4e9076..af7f72abbb76 100644 --- a/fs/9p/vfs_dir.c +++ b/fs/9p/vfs_dir.c @@ -242,6 +242,7 @@ const struct file_operations v9fs_dir_operations = { .iterate_shared = v9fs_dir_readdir, .open = v9fs_file_open, .release = v9fs_dir_release, + .setlease =...
b9a9be4d3557b97303ac6c8b5e153b7ef569d886
Analyze and fix the following issue in the Linux kernel code: smb/client: properly disallow delegations on directories
Problem Details: The check for S_ISREG() in cifs_setlease() is incorrect since that operation doesn't get called for directories. The correct way to prevent delegations on directories is to set the ->setlease() method in directory file_operations to simple_nosetlease(). Fixes: e6d28ebc17eb ("filelock: push the S_ISREG...
```diff diff --git a/fs/smb/client/cifsfs.c b/fs/smb/client/cifsfs.c index d9664634144d..a3dc7cb1ab54 100644 --- a/fs/smb/client/cifsfs.c +++ b/fs/smb/client/cifsfs.c @@ -1149,9 +1149,6 @@ cifs_setlease(struct file *file, int arg, struct file_lease **lease, void **priv struct inode *inode = file_inode(file); struct...
10dcd5110678c6b241bbcf062f72ea14fb3597f3
Analyze and fix the following issue in the Linux kernel code: nfs: properly disallow delegation requests on directories
Problem Details: Checking for S_ISREG() in nfs4_setlease() is incorrect, since that op is never called for directories. The right way to deny lease requests on directories is to set the ->setlease() operation to simple_nosetlease() in the directory file_operations. Fixes: e6d28ebc17eb ("filelock: push the S_ISREG chec...
```diff diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 23a78a742b61..71df279febf7 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -66,6 +66,7 @@ const struct file_operations nfs_dir_operations = { .open = nfs_opendir, .release = nfs_closedir, .fsync = nfs_fsync_dir, + .setlease = simple_nosetlease, }; const...
cab012375122304a6343c1ed09404e5143b9dc01
Analyze and fix the following issue in the Linux kernel code: fuse: fix conversion of fuse_reverse_inval_entry() to start_removing()
Problem Details: The recent conversion of fuse_reverse_inval_entry() to use start_removing() was wrong. As Val Packett points out the original code did not call ->lookup while the new code does. This can lead to a deadlock. Rather than using full_name_hash() and d_lookup() as the old code did, we can use try_lookup_n...
```diff diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 4b6b3d2758ff..64b29db52cf4 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -1584,8 +1584,8 @@ int fuse_reverse_inval_entry(struct fuse_conn *fc, u64 parent_nodeid, { int err = -ENOTDIR; struct inode *parent; - struct dentry *dir; - struct dentry *entry; + ...
471e998c0e31206ff0eac7202b2659698cf9b46e
Analyze and fix the following issue in the Linux kernel code: gpiolib: remove redundant callback check
Problem Details: The presence of the .get_direction() callback is already checked in gpiochip_get_direction(). Remove the duplicated check which also returns the wrong error code to user-space. Fixes: e623c4303ed1 ("gpiolib: sanitize the return value of gpio_chip::get_direction()") Reported-by: Michael Walle <mwalle@k...
```diff diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index dcf427d3cf43..fe2d107b0a84 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -468,9 +468,6 @@ int gpiod_get_direction(struct gpio_desc *desc) test_bit(GPIOD_FLAG_IS_OUT, &flags)) return 0; - if (!guard.gc->get_direct...
c18790018799155e58d5a11c6697f9c398bf8b60
Analyze and fix the following issue in the Linux kernel code: gpio: davinci: implement .get_direction()
Problem Details: It's strongly recommended for GPIO drivers to always implement the .get_direction() callback - even for fixed-direction controllers. GPIO core will even emit a warning if the callback is missing, when users try to read the direction of a pin. Implement .get_direction() for gpio-davinci. Reported-by:...
```diff diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c index 538f27209ce7..97780f27ce5b 100644 --- a/drivers/gpio/gpio-davinci.c +++ b/drivers/gpio/gpio-davinci.c @@ -6,6 +6,7 @@ * Copyright (c) 2007, MontaVista Software, Inc. <source@mvista.com> */ +#include <linux/cleanup.h> #include <l...
403faa575738a7f92267b2ca2ee56cd1b9373078
Analyze and fix the following issue in the Linux kernel code: rv: Fix documentation reference in da_monitor.h
Problem Details: Update documentation reference to reflect the file rename. Monitor synthesis documentation was renamed in commit f40a7c060207 ("Documentation/rv: Prepare monitor synthesis document for LTL inclusion") from da_monitor_synthesis.rst to monitor_synthesis.rst. Signed-off-by: Shubham Sharma <slopixelz@gmai...
```diff diff --git a/include/rv/da_monitor.h b/include/rv/da_monitor.h index 7b28ef9f73bd..db11d41bb438 100644 --- a/include/rv/da_monitor.h +++ b/include/rv/da_monitor.h @@ -8,7 +8,7 @@ * The dot2k tool is available at tools/verification/dot2k/ * * For further information, see: - * Documentation/trace/rv/da_mo...
e60b579720993bd813dbfe77411ab63e721fe189
Analyze and fix the following issue in the Linux kernel code: scsi: core: Revert "Fix a regression triggered by scsi_host_busy()"
Problem Details: Revert commit a0b7780602b1 ("scsi: core: Fix a regression triggered by scsi_host_busy()") because all scsi_host_busy() calls now happen after the corresponding SCSI host has been added. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: John Garry <john.g.garry@oracle.com> Link: https://...
```diff diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c index 1b3fbd328277..e047747d4ecf 100644 --- a/drivers/scsi/hosts.c +++ b/drivers/scsi/hosts.c @@ -626,9 +626,8 @@ int scsi_host_busy(struct Scsi_Host *shost) { int cnt = 0; - if (shost->tag_set.ops) - blk_mq_tagset_busy_iter(&shost->tag_set, - s...
202d5dadd3a0fada6aa756c9fdeb2062aad89f79
Analyze and fix the following issue in the Linux kernel code: scsi: ufs: core: Only call scsi_host_busy() after the SCSI host has been added
Problem Details: scsi_host_busy() iterates over the host tag set. The host tag set is initialized by scsi_mq_setup_tags(). The latter function is called by scsi_add_host(). Hence only call scsi_host_busy() after the SCSI host has been added. This patch prepares for reverting commit a0b7780602b1 ("scsi: core: Fix a regr...
```diff diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 80c0b49f30b0..5f694f95fd86 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -283,7 +283,8 @@ static bool ufshcd_has_pending_tasks(struct ufs_hba *hba) static bool ufshcd_is_ufs_dev_busy(struct ufs_hba *hba) { -...
37d2e108de4d39172aa0c371ec991855d4cc0241
Analyze and fix the following issue in the Linux kernel code: drm/msm: remove some dead code
Problem Details: This is supposed to test for integer overflow but it is wrong and unnecessary. The size_add()/mul() macros return SIZE_MAX when there is an integer overflow. This code saves the SIZE_MAX to a u64 and then tests if the result is greater than SIZE_MAX which it never will be. Fortunately, when we try to...
```diff diff --git a/drivers/gpu/drm/msm/msm_gem_vma.c b/drivers/gpu/drm/msm/msm_gem_vma.c index 8f7c90167447..3a6c435d5105 100644 --- a/drivers/gpu/drm/msm/msm_gem_vma.c +++ b/drivers/gpu/drm/msm/msm_gem_vma.c @@ -950,15 +950,9 @@ vm_bind_job_create(struct drm_device *dev, struct drm_file *file, struct msm_gpu_s...
901a5f309daba412e2a30364d7ec1492fa11c32c
Analyze and fix the following issue in the Linux kernel code: scsi: xen: scsiback: Fix potential memory leak in scsiback_remove()
Problem Details: Memory allocated for struct vscsiblk_info in scsiback_probe() is not freed in scsiback_remove() leading to potential memory leaks on remove, as well as in the scsiback_probe() error paths. Fix that by freeing it in scsiback_remove(). Cc: stable@vger.kernel.org Fixes: d9d660f6e562 ("xen-scsiback: Add X...
```diff diff --git a/drivers/xen/xen-scsiback.c b/drivers/xen/xen-scsiback.c index 0c51edfd13dc..7d5117e5efe0 100644 --- a/drivers/xen/xen-scsiback.c +++ b/drivers/xen/xen-scsiback.c @@ -1262,6 +1262,7 @@ static void scsiback_remove(struct xenbus_device *dev) gnttab_page_cache_shrink(&info->free_pages, 0); dev_se...
44859905375ff4d739cca2113408336a90ed227d
Analyze and fix the following issue in the Linux kernel code: scsi: ufs: core: Convert to SCSI bus methods
Problem Details: The SCSI subsystem has implemented dedicated callbacks for probe, remove and shutdown. Make use of them. This fixes a runtime warning about the driver needing to be converted to the bus probe method. Reviewed-by: Peter Wang <peter.wang@mediatek.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@bay...
```diff diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index da1e89e95d07..78669c205568 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -10525,9 +10525,8 @@ int ufshcd_runtime_resume(struct device *dev) EXPORT_SYMBOL(ufshcd_runtime_resume); #endif /* CONFIG_PM */ -stati...
4bc2205be4609b7a224c78e12852a672cbf80d3d
Analyze and fix the following issue in the Linux kernel code: scsi: st: Convert to SCSI bus methods
Problem Details: The SCSI subsystem has implemented dedicated callbacks for probe, remove and shutdown. Make use of them. This fixes a runtime warning about the driver needing to be converted to the bus probe method. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Reviewed-by: Bart Van Assche <bvanassch...
```diff diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 45622cfce926..40d88bbb4388 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -202,14 +202,14 @@ static int sgl_map_user_pages(struct st_buffer *, const unsigned int, unsigned long, size_t, int); static int sgl_unmap_user_pages(struct st...
9ccda35df7d5cf46649d02696278c7cd4464a16d
Analyze and fix the following issue in the Linux kernel code: scsi: sr: Convert to SCSI bus methods
Problem Details: The SCSI subsystem has implemented dedicated callbacks for probe, remove and shutdown. Make use of them. This fixes a runtime warning about the driver needing to be converted to the bus probe method. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Reviewed-by: Bart Van Assche <bvanassch...
```diff diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index 2f6bb6355186..1fb85f548955 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c @@ -82,8 +82,8 @@ MODULE_ALIAS_SCSI_DEVICE(TYPE_WORM); CDC_CD_R|CDC_CD_RW|CDC_DVD|CDC_DVD_R|CDC_DVD_RAM|CDC_GENERIC_PACKET| \ CDC_MRW|CDC_MRW_W|CDC_RAM) -static int ...
a71d5deea6e95b6155ea22e5db6feb92634307b4
Analyze and fix the following issue in the Linux kernel code: scsi: ses: Convert to SCSI bus methods
Problem Details: The SCSI subsystem has implemented dedicated callbacks for probe, remove and shutdown. Make use of them. This fixes a runtime warning about the driver needing to be converted to the bus probe method. There is no need for an empty remove callback, no remove callback has the same semantics. So instead o...
```diff diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c index f8f5164f3de2..789b170da652 100644 --- a/drivers/scsi/ses.c +++ b/drivers/scsi/ses.c @@ -42,9 +42,8 @@ static bool ses_page2_supported(struct enclosure_device *edev) return (ses_dev->page2 != NULL); } -static int ses_probe(struct device *dev) +stati...
63b541f054e7147f5a19fcd964677c189bad7cff
Analyze and fix the following issue in the Linux kernel code: scsi: sd: Convert to SCSI bus methods
Problem Details: The SCSI subsystem has implemented dedicated callbacks for probe, remove and shutdown. Make use of them. This fixes a runtime warning about the driver needing to be converted to the bus probe method. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Reviewed-by: Bart Van Assche <bvanassch...
```diff diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 6ea6ee2830a4..dc7eac6211bc 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -108,7 +108,7 @@ static void sd_config_write_same(struct scsi_disk *sdkp, struct queue_limits *lim); static void sd_revalidate_disk(struct gendisk *); static void s...
fba333569c8a59928e9e6bb4e20cc6151daeaff8
Analyze and fix the following issue in the Linux kernel code: scsi: ch: Convert to SCSI bus methods
Problem Details: The SCSI subsystem has implemented dedicated callbacks for probe, remove and shutdown. Make use of them. This fixes a runtime warning about the driver needing to be converted to the bus probe method. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Reviewed-by: Bart Van Assche <bvanassch...
```diff diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c index f2b63e4b9b99..b6ca23a29ef5 100644 --- a/drivers/scsi/ch.c +++ b/drivers/scsi/ch.c @@ -894,9 +894,9 @@ static long ch_ioctl(struct file *file, /* ------------------------------------------------------------------------ */ -static int ch_probe(struct d...
39fe0eac6d755ef215026518985fcf8de9360e9e
Analyze and fix the following issue in the Linux kernel code: power: supply: wm97xx: Fix NULL pointer dereference in power_supply_changed()
Problem Details: In `probe()`, `request_irq()` is called before allocating/registering a `power_supply` handle. If an interrupt is fired between the call to `request_irq()` and `power_supply_register()`, the `power_supply` handle will be used uninitialized in `power_supply_changed()` in `wm97xx_bat_update()` (triggered...
```diff diff --git a/drivers/power/supply/wm97xx_battery.c b/drivers/power/supply/wm97xx_battery.c index b3b0c37a9dd2..f00722c88c6f 100644 --- a/drivers/power/supply/wm97xx_battery.c +++ b/drivers/power/supply/wm97xx_battery.c @@ -178,12 +178,6 @@ static int wm97xx_bat_probe(struct platform_device *dev) "fail...
688364a11647dc09ba1e4429313e0008066ec790
Analyze and fix the following issue in the Linux kernel code: power: supply: bq27xxx: fix wrong errno when bus ops are unsupported
Problem Details: bq27xxx_write(), bq27xxx_read_block(), and bq27xxx_write_block() return -EPERM when the bus callback pointer is NULL. A NULL callback indicates the operation is not supported by the bus/driver, not that permission is denied. Return -EOPNOTSUPP instead of -EPERM when di->bus.write/ read_bulk/write_bulk...
```diff diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c index 19445e39651c..45f0e39b8c2d 100644 --- a/drivers/power/supply/bq27xxx_battery.c +++ b/drivers/power/supply/bq27xxx_battery.c @@ -1172,7 +1172,7 @@ static inline int bq27xxx_write(struct bq27xxx_device_info *di, int...
36b05629226413836cfbb3fbe6689cd188bca156
Analyze and fix the following issue in the Linux kernel code: power: reset: nvmem-reboot-mode: respect cell size for nvmem_cell_write
Problem Details: Some platforms expose reboot mode cells that are smaller than an unsigned int, in which cases lead to write failures. Read the cell first to determine actual size and only write the number of bytes the cell can hold. Fixes: 7a78a7f7695b ("power: reset: nvmem-reboot-mode: use NVMEM as reboot mode write...
```diff diff --git a/drivers/power/reset/nvmem-reboot-mode.c b/drivers/power/reset/nvmem-reboot-mode.c index 41530b70cfc4..d260715fccf6 100644 --- a/drivers/power/reset/nvmem-reboot-mode.c +++ b/drivers/power/reset/nvmem-reboot-mode.c @@ -10,6 +10,7 @@ #include <linux/nvmem-consumer.h> #include <linux/platform_device...
8d59cf3887fbabacef53bfba473e33e8a8d9d07b
Analyze and fix the following issue in the Linux kernel code: power: supply: sbs-battery: Fix use-after-free in power_supply_changed()
Problem Details: Using the `devm_` variant for requesting IRQ _before_ the `devm_` variant for allocating/registering the `power_supply` handle, means that the `power_supply` handle will be deallocated/unregistered _before_ the interrupt handler (since `devm_` naturally deallocates in reverse allocation order). This me...
```diff diff --git a/drivers/power/supply/sbs-battery.c b/drivers/power/supply/sbs-battery.c index 943c82ee978f..43c48196c167 100644 --- a/drivers/power/supply/sbs-battery.c +++ b/drivers/power/supply/sbs-battery.c @@ -1174,24 +1174,6 @@ static int sbs_probe(struct i2c_client *client) i2c_set_clientdata(client, chi...
e2febe375e5ea5afed92f4cd9711bde8f24ee6d2
Analyze and fix the following issue in the Linux kernel code: power: supply: rt9455: Fix use-after-free in power_supply_changed()
Problem Details: Using the `devm_` variant for requesting IRQ _before_ the `devm_` variant for allocating/registering the `power_supply` handle, means that the `power_supply` handle will be deallocated/unregistered _before_ the interrupt handler (since `devm_` naturally deallocates in reverse allocation order). This me...
```diff diff --git a/drivers/power/supply/rt9455_charger.c b/drivers/power/supply/rt9455_charger.c index 1ffe7f02932f..5130d2395e88 100644 --- a/drivers/power/supply/rt9455_charger.c +++ b/drivers/power/supply/rt9455_charger.c @@ -1663,6 +1663,15 @@ static int rt9455_probe(struct i2c_client *client) rt9455_charger_co...
b7508129978ae1e2ed9b0410396abc05def9c4eb
Analyze and fix the following issue in the Linux kernel code: power: supply: pm8916_lbc: Fix use-after-free in power_supply_changed()
Problem Details: Using the `devm_` variant for requesting IRQ _before_ the `devm_` variant for allocating/registering the `power_supply` handle, means that the `power_supply` handle will be deallocated/unregistered _before_ the interrupt handler (since `devm_` naturally deallocates in reverse allocation order). This me...
```diff diff --git a/drivers/power/supply/pm8916_lbc.c b/drivers/power/supply/pm8916_lbc.c index c74b75b1b267..3ca717d84aad 100644 --- a/drivers/power/supply/pm8916_lbc.c +++ b/drivers/power/supply/pm8916_lbc.c @@ -274,15 +274,6 @@ static int pm8916_lbc_charger_probe(struct platform_device *pdev) return dev_err_prob...
62914959b35e9a1e29cc0f64cb8cfc5075a5366f
Analyze and fix the following issue in the Linux kernel code: power: supply: pm8916_bms_vm: Fix use-after-free in power_supply_changed()
Problem Details: Using the `devm_` variant for requesting IRQ _before_ the `devm_` variant for allocating/registering the `power_supply` handle, means that the `power_supply` handle will be deallocated/unregistered _before_ the interrupt handler (since `devm_` naturally deallocates in reverse allocation order). This me...
```diff diff --git a/drivers/power/supply/pm8916_bms_vm.c b/drivers/power/supply/pm8916_bms_vm.c index 5120be086e6f..de5d571c03e2 100644 --- a/drivers/power/supply/pm8916_bms_vm.c +++ b/drivers/power/supply/pm8916_bms_vm.c @@ -167,15 +167,6 @@ static int pm8916_bms_vm_battery_probe(struct platform_device *pdev) if (r...
838767f5074700552d3f006d867caed65edc7328
Analyze and fix the following issue in the Linux kernel code: power: supply: pf1550: Fix use-after-free in power_supply_changed()
Problem Details: Using the `devm_` variant for requesting IRQ _before_ the `devm_` variant for allocating/registering the `power_supply` handle, means that the `power_supply` handle will be deallocated/unregistered _before_ the interrupt handler (since `devm_` naturally deallocates in reverse allocation order). This me...
```diff diff --git a/drivers/power/supply/pf1550-charger.c b/drivers/power/supply/pf1550-charger.c index 98f1ee8eca3b..a457862ef461 100644 --- a/drivers/power/supply/pf1550-charger.c +++ b/drivers/power/supply/pf1550-charger.c @@ -584,22 +584,6 @@ static int pf1550_charger_probe(struct platform_device *pdev) return ...
b2ce982e2e0c888dc55c888ad0e20ea04daf2e6b
Analyze and fix the following issue in the Linux kernel code: power: supply: goldfish: Fix use-after-free in power_supply_changed()
Problem Details: Using the `devm_` variant for requesting IRQ _before_ the `devm_` variant for allocating/registering the `power_supply` handle, means that the `power_supply` handle will be deallocated/unregistered _before_ the interrupt handler (since `devm_` naturally deallocates in reverse allocation order). This me...
```diff diff --git a/drivers/power/supply/goldfish_battery.c b/drivers/power/supply/goldfish_battery.c index 479195e35d73..5aa24e4dc445 100644 --- a/drivers/power/supply/goldfish_battery.c +++ b/drivers/power/supply/goldfish_battery.c @@ -224,12 +224,6 @@ static int goldfish_battery_probe(struct platform_device *pdev) ...
642f33e34b969eedec334738fd5df95d2dc42742
Analyze and fix the following issue in the Linux kernel code: power: supply: cpcap-battery: Fix use-after-free in power_supply_changed()
Problem Details: Using the `devm_` variant for requesting IRQ _before_ the `devm_` variant for allocating/registering the `power_supply` handle, means that the `power_supply` handle will be deallocated/unregistered _before_ the interrupt handler (since `devm_` naturally deallocates in reverse allocation order). This me...
```diff diff --git a/drivers/power/supply/cpcap-battery.c b/drivers/power/supply/cpcap-battery.c index 8106d1edcbc2..507fdc1c866d 100644 --- a/drivers/power/supply/cpcap-battery.c +++ b/drivers/power/supply/cpcap-battery.c @@ -1122,10 +1122,6 @@ static int cpcap_battery_probe(struct platform_device *pdev) platform_...
5f0b1cb41906e86b64bf69f5ededb83b0d757c27
Analyze and fix the following issue in the Linux kernel code: power: supply: bq25980: Fix use-after-free in power_supply_changed()
Problem Details: Using the `devm_` variant for requesting IRQ _before_ the `devm_` variant for allocating/registering the `power_supply` handle, means that the `power_supply` handle will be deallocated/unregistered _before_ the interrupt handler (since `devm_` naturally deallocates in reverse allocation order). This me...
```diff diff --git a/drivers/power/supply/bq25980_charger.c b/drivers/power/supply/bq25980_charger.c index 4f91fd1a3dec..44af3a0c92e5 100644 --- a/drivers/power/supply/bq25980_charger.c +++ b/drivers/power/supply/bq25980_charger.c @@ -1240,6 +1240,12 @@ static int bq25980_probe(struct i2c_client *client) return ret;...
8005843369723d9c8975b7c4202d1b85d6125302
Analyze and fix the following issue in the Linux kernel code: power: supply: bq256xx: Fix use-after-free in power_supply_changed()
Problem Details: Using the `devm_` variant for requesting IRQ _before_ the `devm_` variant for allocating/registering the `power_supply` handle, means that the `power_supply` handle will be deallocated/unregistered _before_ the interrupt handler (since `devm_` naturally deallocates in reverse allocation order). This me...
```diff diff --git a/drivers/power/supply/bq256xx_charger.c b/drivers/power/supply/bq256xx_charger.c index 3eb173394005..563f512709b3 100644 --- a/drivers/power/supply/bq256xx_charger.c +++ b/drivers/power/supply/bq256xx_charger.c @@ -1740,6 +1740,12 @@ static int bq256xx_probe(struct i2c_client *client) usb_registe...
3291c51d4684d048dd2eb91b5b65fcfdaf72141f
Analyze and fix the following issue in the Linux kernel code: power: supply: act8945a: Fix use-after-free in power_supply_changed()
Problem Details: Using the `devm_` variant for requesting IRQ _before_ the `devm_` variant for allocating/registering the `power_supply` handle, means that the `power_supply` handle will be deallocated/unregistered _before_ the interrupt handler (since `devm_` naturally deallocates in reverse allocation order). This me...
```diff diff --git a/drivers/power/supply/act8945a_charger.c b/drivers/power/supply/act8945a_charger.c index 3901a02f326a..9dec4486b143 100644 --- a/drivers/power/supply/act8945a_charger.c +++ b/drivers/power/supply/act8945a_charger.c @@ -597,14 +597,6 @@ static int act8945a_charger_probe(struct platform_device *pdev) ...
c4af8a98bb52825a5331ae1d0604c0ea6956ba4b
Analyze and fix the following issue in the Linux kernel code: power: supply: ab8500: Fix use-after-free in power_supply_changed()
Problem Details: Using the `devm_` variant for requesting IRQ _before_ the `devm_` variant for allocating/registering the `power_supply` handle, means that the `power_supply` handle will be deallocated/unregistered _before_ the interrupt handler (since `devm_` naturally deallocates in reverse allocation order). This me...
```diff diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/supply/ab8500_charger.c index 5f4537766e5b..1813fbdfa1c1 100644 --- a/drivers/power/supply/ab8500_charger.c +++ b/drivers/power/supply/ab8500_charger.c @@ -3466,26 +3466,6 @@ static int ab8500_charger_probe(struct platform_device *pdev) retur...
8cc27f5c6dd17dd090f3a696683f04336c162ff5
Analyze and fix the following issue in the Linux kernel code: interconnect: debugfs: initialize src_node and dst_node to empty strings
Problem Details: The debugfs_create_str() API assumes that the string pointer is either NULL or points to valid kmalloc() memory. Leaving the pointer uninitialized can cause problems. Initialize src_node and dst_node to empty strings before creating the debugfs entries to guarantee that reads and writes are safe. Fix...
```diff diff --git a/drivers/interconnect/debugfs-client.c b/drivers/interconnect/debugfs-client.c index 778deeb4a7e8..24d7b5a57794 100644 --- a/drivers/interconnect/debugfs-client.c +++ b/drivers/interconnect/debugfs-client.c @@ -150,6 +150,11 @@ int icc_debugfs_client_init(struct dentry *icc_dir) return ret; } ...
3d939695e68218d420be2b5dbb2fa39ccb7e97ed
Analyze and fix the following issue in the Linux kernel code: blk-crypto: use mempool_alloc_bulk for encrypted bio page allocation
Problem Details: Calling mempool_alloc in a loop is not safe unless the maximum allocation size times the maximum number of threads using it is less than the minimum pool size. Use the new mempool_alloc_bulk helper to allocate all missing elements in one pass to remove this deadlock risk. This also means that non-poo...
```diff diff --git a/block/blk-crypto-fallback.c b/block/blk-crypto-fallback.c index 4a682230c278..6be971859542 100644 --- a/block/blk-crypto-fallback.c +++ b/block/blk-crypto-fallback.c @@ -22,7 +22,7 @@ #include "blk-cgroup.h" #include "blk-crypto-internal.h" -static unsigned int num_prealloc_bounce_pg = 32; +sta...
2f655dcb2d925b55deb8c1ec8f42b522c6bc5698
Analyze and fix the following issue in the Linux kernel code: blk-crypto: use on-stack skcipher requests for fallback en/decryption
Problem Details: Allocating a skcipher request dynamically can deadlock or cause unexpected I/O failures when called from writeback context. Avoid the allocation entirely by using on-stack skciphers, similar to what the non-blk-crypto fscrypt path already does. This drops the incomplete support for asynchronous algor...
```diff diff --git a/block/blk-crypto-fallback.c b/block/blk-crypto-fallback.c index 4ec7da342280..4a682230c278 100644 --- a/block/blk-crypto-fallback.c +++ b/block/blk-crypto-fallback.c @@ -75,7 +75,7 @@ static bool tfms_inited[BLK_ENCRYPTION_MODE_MAX]; static struct blk_crypto_fallback_keyslot { enum blk_crypto_...
b37fbce460ad60b0c4449c1c7566cf24f3016713
Analyze and fix the following issue in the Linux kernel code: blk-crypto: optimize bio splitting in blk_crypto_fallback_encrypt_bio
Problem Details: The current code in blk_crypto_fallback_encrypt_bio is inefficient and prone to deadlocks under memory pressure: It first walks the passed in plaintext bio to see how much of it can fit into a single encrypted bio using up to BIO_MAX_VEC PAGE_SIZE segments, and then allocates a plaintext clone that fit...
```diff diff --git a/block/blk-crypto-fallback.c b/block/blk-crypto-fallback.c index cc9e90be23b7..4ec7da342280 100644 --- a/block/blk-crypto-fallback.c +++ b/block/blk-crypto-fallback.c @@ -81,7 +81,7 @@ static struct blk_crypto_fallback_keyslot { static struct blk_crypto_profile *blk_crypto_fallback_profile; static...
aefc2a1fa2edc2a486aaf857e48b3fd13062b0eb
Analyze and fix the following issue in the Linux kernel code: blk-crypto: submit the encrypted bio in blk_crypto_fallback_bio_prep
Problem Details: Restructure blk_crypto_fallback_bio_prep so that it always submits the encrypted bio instead of passing it back to the caller, which allows to simplify the calling conventions for blk_crypto_fallback_bio_prep and blk_crypto_bio_prep so that they never have to return a bio, and can use a true return val...
```diff diff --git a/block/blk-core.c b/block/blk-core.c index 8387fe50ea15..f87e5f1a101f 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -628,7 +628,7 @@ static void __submit_bio(struct bio *bio) /* If plug is not used, add new plug here to cache nsecs time. */ struct blk_plug plug; - if (unlikely(!blk_c...
76cba1e60b69c9cd53b9127d017a7dc5945455b1
Analyze and fix the following issue in the Linux kernel code: dmaengine: apple-admac: Add "apple,t8103-admac" compatible
Problem Details: After discussion with the devicetree maintainers we agreed to not extend lists with the generic compatible "apple,admac" anymore [1]. Use "apple,t8103-admac" as base compatible as it is the SoC the driver and bindings were written for. [1]: https://lore.kernel.org/asahi/12ab93b7-1fc2-4ce0-926e-c8141cf...
```diff diff --git a/drivers/dma/apple-admac.c b/drivers/dma/apple-admac.c index bd49f0374291..04bbd774b3b4 100644 --- a/drivers/dma/apple-admac.c +++ b/drivers/dma/apple-admac.c @@ -936,6 +936,7 @@ static void admac_remove(struct platform_device *pdev) } static const struct of_device_id admac_of_match[] = { + { .c...