id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
8660484ed1cf3261e89e0bad94c6395597e87599
Analyze and fix the following issue in the Linux kernel code: module: add debugging auto-load duplicate module support
Problem Details: The finit_module() system call can in the worst case use up to more than twice of a module's size in virtual memory. Duplicate finit_module() system calls are non fatal, however they unnecessarily strain virtual memory during bootup and in the worst case can cause a system to fail to boot. This is only...
```diff diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 6221a1d057dd..5915a23207da 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -3332,6 +3332,12 @@ specified, <module>.async_...
15c6ba7992993fecdac52a424ce35b6e4a272c75
Analyze and fix the following issue in the Linux kernel code: powerpc/85xx: mpc85xx_{ds/rdb} replace prink by pr_xxx macro
Problem Details: Use pr_debug() instead of printk(KERN_DEBUG Use pr_err() instead of printk(KERN_ERR Use pr_info() instead of printk(KERN_INFO or printk(" Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link:...
```diff diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c index 98cca1102e0b..d8d13438e18f 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c @@ -76,13 +76,13 @@ void __init mpc85xx_ds_pic_init(void) } if (cascade_nod...
1bca2f8219da51a1119d1f4054b44880cbf0494e
Analyze and fix the following issue in the Linux kernel code: powerpc/85xx: mpc85xx_{ds/rdb} replace BUG_ON() by WARN_ON()
Problem Details: No need to BUG() in case mpic_alloc() fails. Use WARN_ON(). Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230408140122.25293-4-pali@kernel.org
```diff diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c index c6016915264c..98cca1102e0b 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c @@ -62,7 +62,9 @@ void __init mpc85xx_ds_pic_init(void) mpic = mpic_alloc(NUL...
6faab5d7ac49d40bedf348a879042681755c14b0
Analyze and fix the following issue in the Linux kernel code: powerpc/85xx: Remove DBG() macro
Problem Details: DBG() macro is defined at three places while used only one time at one place. Replace its only use by a pr_debug() and remove the macro. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link:...
```diff diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c index c474da3eeea8..25edfe1b8ae1 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c @@ -34,14 +34,6 @@ #include "mpc85xx.h" -#undef DEBUG - -#ifdef DEBUG -#defi...
648a1783fe2551f5a091c9a5f8f463cb2cbf8745
Analyze and fix the following issue in the Linux kernel code: powerpc/boot: Fix boot wrapper code generation with CONFIG_POWER10_CPU
Problem Details: -mcpu=power10 will generate prefixed and pcrel code by default, which we do not support. The general kernel disables these with cflags, but those were missed for the boot wrapper. Fixes: 4b2a9315f20d ("powerpc/64s: POWER10 CPU Kconfig build option") Cc: stable@vger.kernel.org # v6.1+ Reported-by: Dann...
```diff diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 08071bac056d..129a1e190f25 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -34,6 +34,8 @@ endif BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ -fno-strict-aliasing -O2 -msoft-float ...
514b8a79aa85d800458cfb7909ed0e1a1c1bffa2
Analyze and fix the following issue in the Linux kernel code: drm/i915/mtl: Extend Wa_22011802037 to MTL A-step
Problem Details: Wa_22011802037 was being applied to all graphics_ver 11 & 12. This patch updates the if statement to apply the W/A to right platforms and extends it to MTL-M:A step. v1.1: Fix checkpatch warning. v2: Change the check to reflect the wa at other places(Lucas) Bspec: 66622 Cc: Lucas De Marchi <lucas.dem...
```diff diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c index 88e881b100cf..ee3e8352637f 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c @@ -1629,16 +1629,16 @@ static void guc_reset...
71deb8a5658c592ccad5ededb2ceffef6fcbba5f
Analyze and fix the following issue in the Linux kernel code: xfs: Extend table marker on deprecated mount options table
Problem Details: Sphinx reports htmldocs warning on deprecated mount options table: /home/bagas/repo/linux-kernel/Documentation/admin-guide/xfs.rst:243: WARNING: Malformed table. Text in column margin in table line 5. =========================== ================ Name Removal Schedule ==...
```diff diff --git a/Documentation/admin-guide/xfs.rst b/Documentation/admin-guide/xfs.rst index e85a9404d5c0..3a9c041d7f6c 100644 --- a/Documentation/admin-guide/xfs.rst +++ b/Documentation/admin-guide/xfs.rst @@ -236,14 +236,14 @@ the dates listed above. Deprecated Mount Options ======================== -========...
422d56536fd2ebac254e469e196c64cf53cd8a07
Analyze and fix the following issue in the Linux kernel code: xfs: fix duplicate includes
Problem Details: Header files were already included, just not in the normal order. Remove the duplicates, preserving normal order. Also move xfs_ag.h include to before the scrub internal includes which are normally last in the include list. Fixes: d5c88131dbf0 ("xfs: allow queued AG intents to drain before scrubbing")...
```diff diff --git a/fs/xfs/scrub/refcount.c b/fs/xfs/scrub/refcount.c index ed5eb367ce49..304ea1e1bfb0 100644 --- a/fs/xfs/scrub/refcount.c +++ b/fs/xfs/scrub/refcount.c @@ -9,6 +9,7 @@ #include "xfs_format.h" #include "xfs_trans_resv.h" #include "xfs_mount.h" +#include "xfs_ag.h" #include "xfs_btree.h" #include ...
691d0b782066a6eeeecbfceb7910a8f6184e6105
Analyze and fix the following issue in the Linux kernel code: SUNRPC: remove the maximum number of retries in call_bind_status
Problem Details: Currently call_bind_status places a hard limit of 3 to the number of retries on EACCES error. This limit was done to prevent NLM unlock requests from being hang forever when the server keeps returning garbage. However this change causes problem for cases when NLM service takes longer than 9 seconds to ...
```diff diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index b8ca3ecaf8d7..8ada7dc802d3 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h @@ -90,8 +90,7 @@ struct rpc_task { #endif unsigned char tk_priority : 2,/* Task priority */ tk_garb_retry : 2, - tk_...
7a68f9fa97357a0f2073c9c31ed4101da4fce93e
Analyze and fix the following issue in the Linux kernel code: rpmsg: glink: Propagate TX failures in intentless mode as well
Problem Details: As support for splitting transmission over several messages using TX_DATA_CONT was introduced it does not immediately return the return value of qcom_glink_tx(). The result is that in the intentless case (i.e. intent == NULL), the code will continue to send all additional chunks. This is wasteful, and...
```diff diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index 196ca7d8df7c..916c0dbe4213 100644 --- a/drivers/rpmsg/qcom_glink_native.c +++ b/drivers/rpmsg/qcom_glink_native.c @@ -1371,8 +1371,9 @@ static int __qcom_glink_send(struct glink_channel *channel, ret = qcom_glink_tx(glink...
265b0de2f0f293f98173abb336edb63921b9c282
Analyze and fix the following issue in the Linux kernel code: perf probe: Add missing 0x prefix for addresses printed in hexadecimal
Problem Details: To fix this confusing warning: # perf probe -l Failed to find debug information for address 798240 probe_main:prometheus_new_counter__return (on github.com/prometheus/client_golang/prometheus.NewCounter%return in /home/acme/git/prometheus-uprobes/main with counter) # As that 798240 is print...
```diff diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index 54b49ce85c9f..f171360b0ef4 100644 --- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c @@ -1729,7 +1729,7 @@ int debuginfo__find_probe_point(struct debuginfo *dbg, u64 addr, addr += baseaddr; /* Find cu ...
3d2f8f1f184c60508f7af3022536651d7ac2dd07
Analyze and fix the following issue in the Linux kernel code: net: dsa: microchip: ksz8795: Correctly handle huge frame configuration
Problem Details: Because of the logic in place, SW_HUGE_PACKET can never be set. (If the first condition is true, then the 2nd one is also true, but is not executed) Change the logic and update each bit individually. Fixes: 29d1e85f45e0 ("net: dsa: microchip: ksz8: add MTU configuration support") Signed-off-by: Chris...
```diff diff --git a/drivers/net/dsa/microchip/ksz8795.c b/drivers/net/dsa/microchip/ksz8795.c index 3fffd5da8d3b..ffcad057d065 100644 --- a/drivers/net/dsa/microchip/ksz8795.c +++ b/drivers/net/dsa/microchip/ksz8795.c @@ -96,7 +96,7 @@ static int ksz8795_change_mtu(struct ksz_device *dev, int frame_size) if (frame...
ccc4505454db10402d5284f22d8b7db62e636fc5
Analyze and fix the following issue in the Linux kernel code: rust: fix regexp in scripts/is_rust_module.sh
Problem Details: nm can use "R" or "r" to show read-only data sections, but scripts/is_rust_module.sh can only recognize "r", so with some versions of binutils it can fail to detect if a module is a Rust module or not. Right now we're using this script only to determine if we need to skip BTF generation (that is disab...
```diff diff --git a/scripts/is_rust_module.sh b/scripts/is_rust_module.sh index 28b3831a7593..464761a7cf7f 100755 --- a/scripts/is_rust_module.sh +++ b/scripts/is_rust_module.sh @@ -13,4 +13,4 @@ set -e # # In the future, checking for the `.comment` section may be another # option, see https://github.com/rust-lang/...
71b547f561247897a0a14f3082730156c0533fed
Analyze and fix the following issue in the Linux kernel code: bpf: Fix incorrect verifier pruning due to missing register precision taints
Problem Details: Juan Jose et al reported an issue found via fuzzing where the verifier's pruning logic prematurely marks a program path as safe. Consider the following program: 0: (b7) r6 = 1024 1: (b7) r7 = 0 2: (b7) r8 = 0 3: (b7) r9 = -2147483648 4: (97) r6 %= 1025 5: (05) goto pc+0 6: (bd) i...
```diff diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index d517d13878cf..767e8930b0bd 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -2967,6 +2967,21 @@ static int backtrack_insn(struct bpf_verifier_env *env, int idx, } } else if (opcode == BPF_EXIT) { return -ENOTSUPP; + } ...
38d11da522aacaa05898c734a1cec86f1e611129
Analyze and fix the following issue in the Linux kernel code: dm: don't lock fs when the map is NULL in process of resume
Problem Details: Commit fa247089de99 ("dm: requeue IO if mapping table not yet available") added a detection of whether the mapping table is available in the IO submission process. If the mapping table is unavailable, it returns BLK_STS_RESOURCE and requeues the IO. This can lead to the following deadlock problem: dm ...
```diff diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 7d5c9c582ed2..cc77cf3d4109 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c @@ -1168,10 +1168,13 @@ static int do_resume(struct dm_ioctl *param) /* Do we need to load a new map ? */ if (new_map) { sector_t old_size, new_size; ...
e1805aae1e0f648351913e7f5a8a7530a90c8634
Analyze and fix the following issue in the Linux kernel code: perf map: Add missing conversions to map__refcnt()
Problem Details: Some conversions weren't performed in 4e8db2d7520f780f ("perf map: Add map__refcnt() accessor to use in the maps test"), fix it. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
```diff diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c index d81b6ca18ee9..b6a8935026eb 100644 --- a/tools/perf/util/map.c +++ b/tools/perf/util/map.c @@ -112,7 +112,7 @@ void map__init(struct map *map, u64 start, u64 end, u64 pgoff, struct dso *dso) map->map_ip = map__dso_map_ip; map->unmap_ip = map_...
39218bcf941ab1a5eabbf350c0f7a1f1325434b0
Analyze and fix the following issue in the Linux kernel code: s390/kdump: fix virtual vs physical address confusion
Problem Details: Fix virtual vs physical address confusion (which currently are the same). Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com> Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
```diff diff --git a/arch/s390/kernel/machine_kexec.c b/arch/s390/kernel/machine_kexec.c index 3e0fd01a192a..fb887674e159 100644 --- a/arch/s390/kernel/machine_kexec.c +++ b/arch/s390/kernel/machine_kexec.c @@ -29,8 +29,7 @@ #include <asm/nmi.h> #include <asm/sclp.h> -typedef void (*relocate_kernel_t)(kimage_entry_...
a25bc8486f9c01c1af6b6c5657234b2eee2c39d6
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Fix buffer overflow in kvm_arm_set_fw_reg()
Problem Details: The KVM_REG_SIZE() comes from the ioctl and it can be a power of two between 0-32768 but if it is more than sizeof(long) this will corrupt memory. Fixes: 99adb567632b ("KVM: arm/arm64: Add save/restore support for firmware workaround state") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Revi...
```diff diff --git a/arch/arm64/kvm/hypercalls.c b/arch/arm64/kvm/hypercalls.c index 5da884e11337..c4b4678bc4a4 100644 --- a/arch/arm64/kvm/hypercalls.c +++ b/arch/arm64/kvm/hypercalls.c @@ -397,6 +397,8 @@ int kvm_arm_set_fw_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg) u64 val; int wa_level; + if (K...
98dba02d9a93eec11bffbb93c7c51624290702d2
Analyze and fix the following issue in the Linux kernel code: dm flakey: fix a crash with invalid table line
Problem Details: This command will crash with NULL pointer dereference: dmsetup create flakey --table \ "0 `blockdev --getsize /dev/ram0` flakey /dev/ram0 0 0 1 2 corrupt_bio_byte 512" Fix the crash by checking if arg_name is non-NULL before comparing it. Cc: stable@vger.kernel.org Signed-off-by: Mikulas Patocka <...
```diff diff --git a/drivers/md/dm-flakey.c b/drivers/md/dm-flakey.c index ebcfb99b186b..ef07b294e550 100644 --- a/drivers/md/dm-flakey.c +++ b/drivers/md/dm-flakey.c @@ -125,9 +125,9 @@ static int parse_features(struct dm_arg_set *as, struct flakey_c *fc, * Direction r or w? */ arg_name = dm_shift_arg(as...
55de1e4ad43b375566162ae0cc2b56dfa44aae4e
Analyze and fix the following issue in the Linux kernel code: riscv: Prepare EFI header for relocatable kernels
Problem Details: ld does not handle relocations correctly as explained here [1], a fix for that was proposed by Nelson there but we have to support older toolchains and then provide this fix. Note that llvm does not need this fix and is then excluded. [1] https://sourceware.org/pipermail/binutils/2023-March/126690.ht...
```diff diff --git a/arch/riscv/include/asm/set_memory.h b/arch/riscv/include/asm/set_memory.h index a2c14d4b3993..ec11001c3fe0 100644 --- a/arch/riscv/include/asm/set_memory.h +++ b/arch/riscv/include/asm/set_memory.h @@ -56,4 +56,7 @@ bool kernel_page_present(struct page *page); #define SECTION_ALIGN L1_CACHE_BYTES ...
2ddade322925641ee2a75f13665c51f2e74d7791
Analyze and fix the following issue in the Linux kernel code: selftests/xsk: Fix munmap for hugepage allocated umem
Problem Details: Fix the unmapping of hugepage allocated umems so that they are properly unmapped. The new test referred to in the fixes label, introduced a test that allocated a umem that is not a multiple of a 2M hugepage size. This is fine for mmap() that rounds the size up the nearest multiple of 2M. But munmap() r...
```diff diff --git a/tools/testing/selftests/bpf/xskxceiver.c b/tools/testing/selftests/bpf/xskxceiver.c index 5a9691e942de..a59d04118842 100644 --- a/tools/testing/selftests/bpf/xskxceiver.c +++ b/tools/testing/selftests/bpf/xskxceiver.c @@ -77,6 +77,7 @@ #include <linux/if_link.h> #include <linux/if_ether.h> #incl...
b100722a777f6455d913666a376f81342b2cb995
Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: Remove disabling of 80+80 and 160 MHz
Problem Details: This is a regression fix for 80+80 and 160 MHz support bits being cleared, therefore not adverised. Remove disable of 80+80 and 160 MHz capability flags and assign valid center frequency 2 similar to VHT80_80. Fixes: 38dfe775d0ab ("wifi: ath11k: push MU-MIMO params from hostapd to hardware") Reported-...
```diff diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 4447fd4bd68f..1c93f1afccc5 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -5585,10 +5585,6 @@ static int ath11k_mac_copy_he_cap(struct ath11k *ar, he_cap_elem-...
2c69679626d5daa680d71c77ad58af0088db537f
Analyze and fix the following issue in the Linux kernel code: drm/i915/dp_mst: Fix active port PLL selection for secondary MST streams
Problem Details: The port PLL selection needs to be up-to-date in the CRTC state of both the primary and all secondary MST streams. The commit removing the encoder update_prepare/complete hooks (see Fixes: below), stopped doing this for secondary streams, fix this up. Fixes: 0f752b2178c9 ("drm/i915: Remove the encoder...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c index d0bb3a52ae5c..3a7b98837516 100644 --- a/drivers/gpu/drm/i915/display/intel_ddi.c +++ b/drivers/gpu/drm/i915/display/intel_ddi.c @@ -3060,6 +3060,25 @@ void intel_ddi_update_pipe(struct intel_atomic_state *stat...
ecd7ebaf0b5a094a6180b299a5635c0eea42be4b
Analyze and fix the following issue in the Linux kernel code: riscv: Fix ptdump when KASAN is enabled
Problem Details: The KASAN shadow region was moved next to the kernel mapping but the ptdump code was not updated and it appears to break the dump of the kernel page table, so fix this by moving the KASAN shadow region in ptdump. Fixes: f7ae02333d13 ("riscv: Move KASAN mapping next to the kernel mapping") Signed-off-b...
```diff diff --git a/arch/riscv/mm/ptdump.c b/arch/riscv/mm/ptdump.c index 830e7de65e3a..20a9f991a6d7 100644 --- a/arch/riscv/mm/ptdump.c +++ b/arch/riscv/mm/ptdump.c @@ -59,10 +59,6 @@ struct ptd_mm_info { }; enum address_markers_idx { -#ifdef CONFIG_KASAN - KASAN_SHADOW_START_NR, - KASAN_SHADOW_END_NR, -#endif ...
617955ca6e275c4dd0dcf5316fca7fc04a8f2fe6
Analyze and fix the following issue in the Linux kernel code: riscv: Fix EFI stub usage of KASAN instrumented strcmp function
Problem Details: The EFI stub must not use any KASAN instrumented code as the kernel proper did not initialize the thread pointer and the mapping for the KASAN shadow region. Avoid using the generic strcmp function, instead use the one in drivers/firmware/efi/libstub/string.c. Signed-off-by: Alexandre Ghiti <alexghit...
```diff diff --git a/arch/riscv/kernel/image-vars.h b/arch/riscv/kernel/image-vars.h index 7e2962ef73f9..15616155008c 100644 --- a/arch/riscv/kernel/image-vars.h +++ b/arch/riscv/kernel/image-vars.h @@ -23,8 +23,6 @@ * linked at. The routines below are all implemented in assembler in a * position independent manner...
b956e3110a797a3663f91f9b8935b667cc23fe72
Analyze and fix the following issue in the Linux kernel code: wifi: ath9k: Don't mark channelmap stack variable read-only in ath9k_mci_update_wlan_channels()
Problem Details: This partially reverts commit e161d4b60ae3a5356e07202e0bfedb5fad82c6aa. Turns out the channelmap variable is not actually read-only, it's modified through the MCI_GPM_CLR_CHANNEL_BIT() macro further down in the function, so making it read-only causes page faults when that code is hit. Link: https://b...
```diff diff --git a/drivers/net/wireless/ath/ath9k/mci.c b/drivers/net/wireless/ath/ath9k/mci.c index 3363fc4e8966..a0845002d6fe 100644 --- a/drivers/net/wireless/ath/ath9k/mci.c +++ b/drivers/net/wireless/ath/ath9k/mci.c @@ -646,9 +646,7 @@ void ath9k_mci_update_wlan_channels(struct ath_softc *sc, bool allow_all) s...
f9fff67d2d7ca6fa8066132003a3deef654c55b1
Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: Fix SKB corruption in REO destination ring
Problem Details: While running traffics for a long time, randomly an RX descriptor filled with value "0" from REO destination ring is received. This descriptor which is invalid causes the wrong SKB (SKB stored in the IDR lookup with buffer id "0") to be fetched which in turn causes SKB memory corruption issue and the s...
```diff diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c index a4934bd79969..f67ce62b2b48 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -389,10 +389,10 @@ int ath11k_dp_rxbufs_replenish(struct ath11k_base *ab, int mac_...
2f0c9ac8362da09c80f1cd422ef7fd6fa9b252b9
Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: Fix incorrect update of radiotap fields
Problem Details: Fix incorrect update of ppdu stats causing incorrect radiotap fields. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/2023040319...
```diff diff --git a/drivers/net/wireless/ath/ath11k/hal_rx.c b/drivers/net/wireless/ath/ath11k/hal_rx.c index b9939c5a4ecd..bb1d40034aa8 100644 --- a/drivers/net/wireless/ath/ath11k/hal_rx.c +++ b/drivers/net/wireless/ath/ath11k/hal_rx.c @@ -1029,7 +1029,7 @@ ath11k_hal_rx_parse_mon_status_tlv(struct ath11k_base *ab, ...
6257c702264c44d74c6b71f0c62a7665da2dc356
Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: fix tx status reporting in encap offload mode
Problem Details: ieee80211_tx_status() treats packets in 802.11 frame format and tries to extract sta address from packet header. When tx encap offload is enabled, this becomes invalid operation. Hence, switch to using ieee80211_tx_status_ext() after filling in station address for handling both 802.11 and 802.3 frames....
```diff diff --git a/drivers/net/wireless/ath/ath11k/dp.h b/drivers/net/wireless/ath/ath11k/dp.h index 6022e27ba91d..d04f78ab6b37 100644 --- a/drivers/net/wireless/ath/ath11k/dp.h +++ b/drivers/net/wireless/ath/ath11k/dp.h @@ -303,12 +303,16 @@ struct ath11k_dp { #define HTT_TX_WBM_COMP_STATUS_OFFSET 8 +#define HT...
93a91f40c25c3d0e61f8540a7accf105090f9995
Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: fix double free of peer rx_tid during reo cmd failure
Problem Details: Peer rx_tid is locally copied thrice during peer_rx_tid_cleanup to send REO_CMD_UPDATE_RX_QUEUE followed by REO_CMD_FLUSH_CACHE to flush all aged REO descriptors from HW cache. When sending REO_CMD_FLUSH_CACHE fails, we do dma unmap of already mapped rx_tid->vaddr and free it. This is not checked duri...
```diff diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c index 847da167a41c..1d45aa018df3 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -668,13 +668,18 @@ void ath11k_dp_reo_cmd_list_cleanup(struct ath11k_base *ab) s...
680921653cf39f086fe065234a2d9813b526bb6c
Analyze and fix the following issue in the Linux kernel code: dt-bindings: vendor-prefixes: Add prefix for acbel
Problem Details: Add a vendor prefix entry for acbel (https://www.acbel.com) Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230413132627.3444119-2-lakshmiy@us.ibm.com Signed-off-by: Guenter Roeck <linux@roeck-us.ne...
```diff diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index ed64e06ecca4..9dbb8f69be65 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -37,6 +37,8 @@ pattern...
5dcd53e315b7cd3efb591227c281f979bebd2155
Analyze and fix the following issue in the Linux kernel code: hwmon: (nct6775) update ASUS WMI monitoring list A620/B760/W790
Problem Details: Boards such as * B360M-BASALT, * B360M-D3H, * EX-B360M-V, * EX-B360M-V3, * EX-B360M-V5, * EX-B760M-V5 D4, * PRIME A620M-A, * PRIME B460I-PLUS, * PRIME B460M-A, * PRIME B460M-K, * PRIME B550-PLUS AC-HES, * PRIME B660M-A AC D4, * PRIME B760M-A, * PRIME B760M-A AX D4, * PRIME B760M-A D4, * PRIME B760M-AJ ...
```diff diff --git a/drivers/hwmon/nct6775-platform.c b/drivers/hwmon/nct6775-platform.c index 680fa0ecd6c3..5782acfb4ee1 100644 --- a/drivers/hwmon/nct6775-platform.c +++ b/drivers/hwmon/nct6775-platform.c @@ -1052,6 +1052,11 @@ static int __init nct6775_find(int sioaddr, struct nct6775_sio_data *sio_data) static str...
6c2b659913ad9c70c30050efc3e287fd0869012a
Analyze and fix the following issue in the Linux kernel code: hwmon: (coretemp) Delete tjmax debug message
Problem Details: After commit c0c67f8761ce ("hwmon: (coretemp) Add support for dynamic tjmax"), tjmax value is retrieved from MSR every time the temperature is read. This means that, with debug message enabled, the tjmax debug message is printed out for every single temperature read for any CPU. This spams the syslog. ...
```diff diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index 30d77f451937..fe3d4d0dcbed 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c @@ -286,10 +286,8 @@ static int get_tjmax(struct temp_data *tdata, struct device *dev) * If the TjMax is not plausible, an assumption * w...
b0eb085b4f960a2961e566b5608470e493b2003d
Analyze and fix the following issue in the Linux kernel code: hwmon: fix typo in Makefile
Problem Details: Fix the spelling of "ACPI" in Makefile. Signed-off-by: James Seo <james@equiv.tech> Link: https://lore.kernel.org/r/20230405073056.53466-3-james@equiv.tech Signed-off-by: Guenter Roeck <linux@roeck-us.net>
```diff diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile index 88712b5031c8..e12c111a174a 100644 --- a/drivers/hwmon/Makefile +++ b/drivers/hwmon/Makefile @@ -6,7 +6,7 @@ obj-$(CONFIG_HWMON) += hwmon.o obj-$(CONFIG_HWMON_VID) += hwmon-vid.o -# APCI drivers +# ACPI drivers obj-$(CONFIG_SENSORS_ACPI_PO...
a4fffe48e4bab49b991490abd3e6d4bd98af2610
Analyze and fix the following issue in the Linux kernel code: hwmon: (nct6775) update ASUS WMI monitoring list B360/H410/H610/Z390...
Problem Details: Boards such as * EX-B460M-V5, * EX-H410M-V3, * PRIME B360M-D, * PRIME B360M-K, * PRIME H410M-A, * PRIME H410M-D, * PRIME H410M-E, * PRIME H410M-F, * PRIME H410M-K, * PRIME H410M-K R2.0, * PRIME H510M-K R2.0, * PRIME Z390-A, * PRIME Z390-A/H10, * PRIME Z390-P, * PRIME Z390M-PLUS, * PRIME Z490-A, * PRIME...
```diff diff --git a/drivers/hwmon/nct6775-platform.c b/drivers/hwmon/nct6775-platform.c index 9a7ad64c2cc3..680fa0ecd6c3 100644 --- a/drivers/hwmon/nct6775-platform.c +++ b/drivers/hwmon/nct6775-platform.c @@ -1052,6 +1052,8 @@ static int __init nct6775_find(int sioaddr, struct nct6775_sio_data *sio_data) static stru...
c05403e64d7feb12ac31cf785a61b665970cc821
Analyze and fix the following issue in the Linux kernel code: hwmon: (nct6775) Fix ROG B550-XE WIFI and Pro B660M-C D4 names
Problem Details: ROG STRIX B550-XE GAMING WIFI motherboard is incorrectly named as ROG STRIX B550-XE GAMING (WI-FI). Pro B660M-C D4 motherboard is incorrectly named as Pro B660M-C-D4. Validated by dmidecode output from https://github.com/linuxhw/DMI/ Link: https://bugzilla.kernel.org/show_bug.cgi?id=204807 Signed-of...
```diff diff --git a/drivers/hwmon/nct6775-platform.c b/drivers/hwmon/nct6775-platform.c index 5ba888b7eb8c..9a7ad64c2cc3 100644 --- a/drivers/hwmon/nct6775-platform.c +++ b/drivers/hwmon/nct6775-platform.c @@ -1090,7 +1090,7 @@ static const char * const asus_wmi_boards[] = { "ROG STRIX B550-F GAMING (WI-FI)", "ROG...
0282592678b1e397916db36052986380d5fe4ec6
Analyze and fix the following issue in the Linux kernel code: hwmon: (nct6775) Sort ASUS board list
Problem Details: Rearrange board list in alphabetical order by: LC_ALL=C sort -u Link: https://bugzilla.kernel.org/show_bug.cgi?id=204807 Signed-off-by: Denis Pauk <pauk.denis@gmail.com> Link: https://lore.kernel.org/r/20230323212751.2474-1-pauk.denis@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
```diff diff --git a/drivers/hwmon/nct6775-platform.c b/drivers/hwmon/nct6775-platform.c index 2db71b62e03d..5ba888b7eb8c 100644 --- a/drivers/hwmon/nct6775-platform.c +++ b/drivers/hwmon/nct6775-platform.c @@ -1052,14 +1052,6 @@ static int __init nct6775_find(int sioaddr, struct nct6775_sio_data *sio_data) static str...
bcd2fbec8a2583f4180ffc8b453c24fad2068306
Analyze and fix the following issue in the Linux kernel code: hwmon: (nct6775) update ASUS WMI monitoring list A520/B360/B460/B550...
Problem Details: Boards such as * EX-B660M-V5 D4, * PRIME A520M-A, * PRIME A520M-A II, * PRIME A520M-E, * PRIME A520M-K, * PRIME B360M-A, * PRIME B360M-C, * PRIME B460M-A R2.0, * PRIME B550M-A AC, * PRIME B550M-A WIFI II, * PRIME B550M-K, * PRIME B650M-A AX II, * PRIME Z590-P WIFI, * PRIME Z590-V, * Pro A520M-C, * ProA...
```diff diff --git a/drivers/hwmon/nct6775-platform.c b/drivers/hwmon/nct6775-platform.c index 02e9241a98bf..2db71b62e03d 100644 --- a/drivers/hwmon/nct6775-platform.c +++ b/drivers/hwmon/nct6775-platform.c @@ -1052,6 +1052,7 @@ static int __init nct6775_find(int sioaddr, struct nct6775_sio_data *sio_data) static stru...
23e8a379cf5c29a97c63016e1554de731b26a29b
Analyze and fix the following issue in the Linux kernel code: hwmon: (nct6775) Fix TUF GAMING B550M-E WIFI name
Problem Details: TUF GAMING B550M-E WIFI motherboard is incorrectly named as TUF GAMING B550M-E (WI-FI). Validated by dmidecode output from https://github.com/linuxhw/DMI/ Link: https://bugzilla.kernel.org/show_bug.cgi?id=204807 Signed-off-by: Denis Pauk <pauk.denis@gmail.com> Link: https://lore.kernel.org/r/20230315...
```diff diff --git a/drivers/hwmon/nct6775-platform.c b/drivers/hwmon/nct6775-platform.c index b19edee85575..02e9241a98bf 100644 --- a/drivers/hwmon/nct6775-platform.c +++ b/drivers/hwmon/nct6775-platform.c @@ -1096,7 +1096,7 @@ static const char * const asus_wmi_boards[] = { "ROG STRIX Z490-H GAMING", "ROG STRIX Z...
ea00552690bb408a8d1c361edf626d1bfe961f74
Analyze and fix the following issue in the Linux kernel code: hwmon: (nct6775) add Asus Pro A520M-C II/CSM
Problem Details: An NCT6798D chip is now detected: dmesg|grep nct6775 [ 23.765392] nct6775: Found NCT6798D or compatible chip at 0x2e:0x290 And sensors now shows: nct6798-isa-0290 Adapter: ISA adapter in0: 312.00 mV (min = +0.00 V, max = +1.74 V) in1: ...
```diff diff --git a/drivers/hwmon/nct6775-platform.c b/drivers/hwmon/nct6775-platform.c index 24c67dbfa8ab..b19edee85575 100644 --- a/drivers/hwmon/nct6775-platform.c +++ b/drivers/hwmon/nct6775-platform.c @@ -1052,6 +1052,7 @@ static int __init nct6775_find(int sioaddr, struct nct6775_sio_data *sio_data) static stru...
9fadbda6d1e0c1022fc77fa14461d1f475b83510
Analyze and fix the following issue in the Linux kernel code: docs: hwmon: sysfs-interface: Fix stray colon
Problem Details: The commit 036d6a4e75c9 ("ABI: sysfs-class-hwmon: add ABI documentation for it") moved all ABI attributes to the usual ABI documentation. But this change left a stray colon for the fan speed control method. Fix this to avoid a confusion of readers. Fixes: 036d6a4e75c9 ("ABI: sysfs-class-hwmon: add ABI...
```diff diff --git a/Documentation/hwmon/sysfs-interface.rst b/Documentation/hwmon/sysfs-interface.rst index 209626fb2405..f76e9f8cc1ad 100644 --- a/Documentation/hwmon/sysfs-interface.rst +++ b/Documentation/hwmon/sysfs-interface.rst @@ -201,7 +201,7 @@ PWM Pulse width modulation fan control. `pwm[1-*]_enable` -...
8107fe93896dee8f159c8cb4ec8ec18656fbcd96
Analyze and fix the following issue in the Linux kernel code: hwmon: (gpio-fan) drop of_match_ptr for ID table
Problem Details: The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it might not be relevant here). This also fixes !CONFIG_OF error: drivers/hwmon/gpio-fan.c:484:34: error: ‘of_gpio_fan_...
```diff diff --git a/drivers/hwmon/gpio-fan.c b/drivers/hwmon/gpio-fan.c index e75db6f64e8c..d92c536be9af 100644 --- a/drivers/hwmon/gpio-fan.c +++ b/drivers/hwmon/gpio-fan.c @@ -586,7 +586,7 @@ static struct platform_driver gpio_fan_driver = { .driver = { .name = "gpio-fan", .pm = pm_sleep_ptr(&gpio_fan_pm), -...
0c072385348e3ac5229145644055d3e2afb5b3db
Analyze and fix the following issue in the Linux kernel code: hwmon: (k10temp) Check range scale when CUR_TEMP register is read-write
Problem Details: Spec says, when CUR_TEMP_TJ_SEL == 3 and CUR_TEMP_RANGE_SEL == 0, it should use RangeUnadjusted is 0, which is (CurTmp*0.125 -49) C. The CUR_TEMP register is read-write when CUR_TEMP_TJ_SEL == 3 (bit 17-16). Add the check to detect it. Sensors command's output before the patch. $sensors k10temp-pci-...
```diff diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c index 5a9d47a229e4..be8bbb1c3a02 100644 --- a/drivers/hwmon/k10temp.c +++ b/drivers/hwmon/k10temp.c @@ -75,6 +75,7 @@ static DEFINE_MUTEX(nb_smu_ind_mutex); #define ZEN_CUR_TEMP_SHIFT 21 #define ZEN_CUR_TEMP_RANGE_SEL_MASK BIT(19) +#define ZE...
80f746e2bd0e1da3fdb49a53570e54a1a225faac
Analyze and fix the following issue in the Linux kernel code: sh: sq: Fix incorrect element size for allocating bitmap buffer
Problem Details: The Store Queue code allocates a bitmap buffer with the size of multiple of sizeof(long) in sq_api_init(). While the buffer size is calculated correctly, the code uses the wrong element size to allocate the buffer which results in the allocated bitmap buffer being too small. Fix this by allocating the...
```diff diff --git a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c index 27f2e3da5aa2..6e0bb3f47fa5 100644 --- a/arch/sh/kernel/cpu/sh4/sq.c +++ b/arch/sh/kernel/cpu/sh4/sq.c @@ -382,7 +382,7 @@ static int __init sq_api_init(void) if (unlikely(!sq_cache)) return ret; - sq_bitmap = kzalloc(size, GFP_K...
3ad1be6faef9a482c3098928220fcafaa51a1283
Analyze and fix the following issue in the Linux kernel code: perf dso: Fix use before NULL check introduced by map__dso() introduction
Problem Details: James Clark noticed that the recent 63df0e4bc368adbd ("perf map: Add accessor for dso") patch accessed map->dso before the 'map' variable was NULL checked, which is a change in logic that leads to segmentation faults, so comb thru that patch to fix similar cases. Fixes: 63df0e4bc368adbd ("perf map: Ad...
```diff diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 8fba247b798c..006f522d0e7f 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -1075,8 +1075,7 @@ static int grab_bb(u8 *buffer, u64 start, u64 end, return 0; } - dso = map__dso(al.map); - if (!thread__...
359f5b0d4e26b7a7bcc574d6148b31a17cefe47d
Analyze and fix the following issue in the Linux kernel code: spi: spi-rockchip: Fix missing unwind goto in rockchip_sfc_probe()
Problem Details: If devm_request_irq() fails, then we are directly return 'ret' without clk_disable_unprepare(sfc->clk) and clk_disable_unprepare(sfc->hclk). Fix this by changing direct return to a goto 'err_irq'. Fixes: 0b89fc0a367e ("spi: rockchip-sfc: add rockchip serial flash controller") Signed-off-by: Li Lanzhe...
```diff diff --git a/drivers/spi/spi-rockchip-sfc.c b/drivers/spi/spi-rockchip-sfc.c index bd87d3c92dd3..69347b6bf60c 100644 --- a/drivers/spi/spi-rockchip-sfc.c +++ b/drivers/spi/spi-rockchip-sfc.c @@ -632,7 +632,7 @@ static int rockchip_sfc_probe(struct platform_device *pdev) if (ret) { dev_err(dev, "Failed to r...
86a24e99c97234f87d9f70b528a691150e145197
Analyze and fix the following issue in the Linux kernel code: ASoC: fsl_asrc_dma: fix potential null-ptr-deref
Problem Details: dma_request_slave_channel() may return NULL which will lead to NULL pointer dereference error in 'tmp_chan->private'. Correct this behaviour by, first, switching from deprecated function dma_request_slave_channel() to dma_request_chan(). Secondly, enable sanity check for the resuling value of dma_requ...
```diff diff --git a/sound/soc/fsl/fsl_asrc_dma.c b/sound/soc/fsl/fsl_asrc_dma.c index 3b81a465814a..05a7d1588d20 100644 --- a/sound/soc/fsl/fsl_asrc_dma.c +++ b/sound/soc/fsl/fsl_asrc_dma.c @@ -209,14 +209,19 @@ static int fsl_asrc_dma_hw_params(struct snd_soc_component *component, be_chan = soc_component_to_pcm(co...
238787157d83969e5149c8e99787d5d90e85fbe5
Analyze and fix the following issue in the Linux kernel code: ASoC: fsl_sai: Fix pins setting for i.MX8QM platform
Problem Details: SAI on i.MX8QM platform supports the data lines up to 4. So the pins setting should be corrected to 4. Fixes: eba0f0077519 ("ASoC: fsl_sai: Enable combine mode soft") Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Reviewed-by: Iuliana Prodan <iuliana...
```diff diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index 1b197478b3d9..990bba0be1fb 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -1546,7 +1546,7 @@ static const struct fsl_sai_soc_data fsl_sai_imx8qm_data = { .use_imx_pcm = true, .use_edma = true, .fifo_depth = 64, - ....
4e195166624851d1da1a4e42110e66ee4faca4a3
Analyze and fix the following issue in the Linux kernel code: stmmac: fix changing mac address
Problem Details: Without the IFF_LIVE_ADDR_CHANGE flag being set, the network code disallows changing the mac address while the interface is UP. Consequences are, for instance, that the interface can't be used in a failover bond. Add the missing flag to net_device priv_flags. Tested on Intel Elkhart Lake with defaul...
```diff diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 5280256a638f..47534310365a 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -7339,6 +7339,8 @@ int stmmac_dvr_probe(st...
fcd4843a19d50f9e59116b2643e1a7d171b6fca1
Analyze and fix the following issue in the Linux kernel code: hamradio: drop ISA_DMA_API dependency
Problem Details: It looks like the dependency got added accidentally in commit a553260618d8 ("[PATCH] ISA DMA Kconfig fixes - part 3"). Unlike the previously removed dmascc driver, the scc driver never used DMA. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/hamradio/Kconfig b/drivers/net/hamradio/Kconfig index a9c44f08199d..a94c7bd5db2e 100644 --- a/drivers/net/hamradio/Kconfig +++ b/drivers/net/hamradio/Kconfig @@ -47,7 +47,7 @@ config BPQETHER config SCC tristate "Z8530 SCC driver" - depends on ISA && AX25 && ISA_DMA_API + depends o...
1f64757ee2bb22a93ec89b4c71707297e8cca0ba
Analyze and fix the following issue in the Linux kernel code: mlxsw: pci: Fix possible crash during initialization
Problem Details: During initialization the driver issues a reset command via its command interface in order to remove previous configuration from the device. After issuing the reset, the driver waits for 200ms before polling on the "system_status" register using memory-mapped IO until the device reaches a ready state ...
```diff diff --git a/drivers/net/ethernet/mellanox/mlxsw/pci_hw.h b/drivers/net/ethernet/mellanox/mlxsw/pci_hw.h index 48dbfea0a2a1..7cdf0ce24f28 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/pci_hw.h +++ b/drivers/net/ethernet/mellanox/mlxsw/pci_hw.h @@ -26,7 +26,7 @@ #define MLXSW_PCI_CIR_TIMEOUT_MSECS 1000 #...
4c60d04c2888a542f96fe77ecbdfc242b484f943
Analyze and fix the following issue in the Linux kernel code: net: skbuff: push nf_trace down the bitfield
Problem Details: nf_trace is a debug feature, AFAIU, and yet it sits oddly high in the sk_buff bitfield. Move it down, pushing up dst_pending_confirm and inner_protocol_type. Next change will make nf_trace optional (under Kconfig) and all optional fields should be placed after 2b fields to avoid 2b fields straddling b...
```diff diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 2595b2cfba0d..3ae9e8868afa 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -934,7 +934,7 @@ struct sk_buff { /* public: */ __u8 pkt_type:3; /* see PKT_TYPE_MAX */ __u8 ignore_df:1; - __u8 nf_trace:1; + __u8 dst_...
1e264f9d2918b5737023c44a23ae04def1095210
Analyze and fix the following issue in the Linux kernel code: net: dsa: qca8k: add LEDs basic support
Problem Details: Add LEDs basic support for qca8k Switch Family by adding basic brightness_set() support. Since these LEDs refelect port status, the default label is set to ":port". DT binding should describe the color and function of the LEDs using standard LEDs api. Each LED always have the device name as prefix. Th...
```diff diff --git a/drivers/net/dsa/qca/Kconfig b/drivers/net/dsa/qca/Kconfig index ba339747362c..7a86d6d6a246 100644 --- a/drivers/net/dsa/qca/Kconfig +++ b/drivers/net/dsa/qca/Kconfig @@ -15,3 +15,11 @@ config NET_DSA_QCA8K help This enables support for the Qualcomm Atheros QCA8K Ethernet switch chips. + +...
27ac123b454417ea92d77c13a5d94655f53b759c
Analyze and fix the following issue in the Linux kernel code: drm/i915/dp_mst: Fix active port PLL selection for secondary MST streams
Problem Details: The port PLL selection needs to be up-to-date in the CRTC state of both the primary and all secondary MST streams. The commit removing the encoder update_prepare/complete hooks (see Fixes: below), stopped doing this for secondary streams, fix this up. Fixes: 0f752b2178c9 ("drm/i915: Remove the encoder...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c index 2ef1af921a0b..8fb0f205b553 100644 --- a/drivers/gpu/drm/i915/display/intel_ddi.c +++ b/drivers/gpu/drm/i915/display/intel_ddi.c @@ -3349,6 +3349,25 @@ void intel_ddi_update_pipe(struct intel_atomic_state *stat...
73db1b8f2bb6725b7391e85aab41fdf592b3c0c1
Analyze and fix the following issue in the Linux kernel code: netfilter: conntrack: fix wrong ct->timeout value
Problem Details: (struct nf_conn)->timeout is an interval before the conntrack confirmed. After confirmed, it becomes a timestamp. It is observed that timeout of an unconfirmed conntrack: - Set by calling ctnetlink_change_timeout(). As a result, `nfct_time_stamp` was wrongly added to `ct->timeout` twice. - Get by c...
```diff diff --git a/include/net/netfilter/nf_conntrack_core.h b/include/net/netfilter/nf_conntrack_core.h index 71d1269fe4d4..3384859a8921 100644 --- a/include/net/netfilter/nf_conntrack_core.h +++ b/include/net/netfilter/nf_conntrack_core.h @@ -89,7 +89,11 @@ static inline void __nf_ct_set_timeout(struct nf_conn *ct,...
63f148c44f3919047301a023b10b0e3ce65a7389
Analyze and fix the following issue in the Linux kernel code: sh: pci: Remove unused variable in SH-7786 PCI Express code
Problem Details: Addresses the following warning when building sdk7786_defconfig: arch/sh/drivers/pci/pcie-sh7786.c:34:22: warning: 'dma_pfn_offset' defined but not used [-Wunused-variable] 34 | static unsigned long dma_pfn_offset; | ^~~~~~~~~~~~~~ Fixes: e0d072782c73 ("dma-mapping: intr...
```diff diff --git a/arch/sh/drivers/pci/pcie-sh7786.c b/arch/sh/drivers/pci/pcie-sh7786.c index b0c2a5238d04..39bb5038e1c6 100644 --- a/arch/sh/drivers/pci/pcie-sh7786.c +++ b/arch/sh/drivers/pci/pcie-sh7786.c @@ -31,7 +31,6 @@ struct sh7786_pcie_port { static struct sh7786_pcie_port *sh7786_pcie_ports; static uns...
bc66b591903e197982215f9febcfa09c4becfd89
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: Remove specific patch for Dell Precision 3260
Problem Details: Unfortunately, the tester gave a weak feedback (working/non-working) for this case. After the double confirmation, this change is not really required. The standard code with alc269_fallback_pin_fixup_tbl should work on this hardware. Fixes: 5911d78fabbb ("ALSA: hda/realtek: Improve support for Dell Pr...
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 3b9f077a227f..6a6c72b5ea26 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -9288,7 +9288,6 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x1028, 0x0a62, "Dell Precisio...
3b522cadedfe6e9e0e8193d7d4ab5aa8d0c73209
Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fill txd by host driver
Problem Details: The hardware SDO has issue to fill txd for the moment, so fallback to driver filling method. Fixes: 98686cd21624 (wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices) Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
```diff diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c index 0639bd3808c6..130eb7b4fd91 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c @@ -1132,11 +1132,8 @@ int mt7996_tx_prepare_skb(stru...
e12b2e99b8799f26432528934edc8677888ad72f
Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7615: increase eeprom size for mt7663
Problem Details: mt7663 efuse has 0x600 bytes instead of 0x400. Increase the size in order to fix issues with incomplete calibration data Signed-off-by: Felix Fietkau <nbd@nbd.name>
```diff diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c b/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c index 6dbaaf95ee38..68e88224b8b1 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c @@ -47,6 +47,9 @@ static int mt7615_efuse...
63740448a32eb662e05894425b47bcc5814136f4
Analyze and fix the following issue in the Linux kernel code: mptcp: fix accept vs worker race
Problem Details: The mptcp worker and mptcp_accept() can race, as reported by Christoph: refcount_t: addition on 0; use-after-free. WARNING: CPU: 1 PID: 14351 at lib/refcount.c:25 refcount_warn_saturate+0x105/0x1b0 lib/refcount.c:25 Modules linked in: CPU: 1 PID: 14351 Comm: syz-executor.2 Not tainted 6.3.0-rc1-gde5e8...
```diff diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 5181fb91595b..b998e9df53ce 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -2315,7 +2315,26 @@ static void __mptcp_close_ssk(struct sock *sk, struct sock *ssk, unsigned int flags) { struct mptcp_sock *msk = mptcp_sk(sk);...
2a6a870e44dd88f1a6a2893c65ef756a9edfb4c7
Analyze and fix the following issue in the Linux kernel code: mptcp: stops worker on unaccepted sockets at listener close
Problem Details: This is a partial revert of the blamed commit, with a relevant change: mptcp_subflow_queue_clean() now just change the msk socket status and stop the worker, so that the UaF issue addressed by the blamed commit is not re-introduced. The above prevents the mptcp worker from running concurrently with in...
```diff diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index 06c5872e3b00..5181fb91595b 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -2365,8 +2365,12 @@ static void __mptcp_close_ssk(struct sock *sk, struct sock *ssk, mptcp_subflow_drop_ctx(ssk); } else { /* otherwise tcp will dispo...
2cdaa3eefed83082923cf219c8b6a314e622da74
Analyze and fix the following issue in the Linux kernel code: netfilter: conntrack: restore IPS_CONFIRMED out of nf_conntrack_hash_check_insert()
Problem Details: e6d57e9ff0ae ("netfilter: conntrack: fix rmmod double-free race") consolidates IPS_CONFIRMED bit set in nf_conntrack_hash_check_insert(). However, this breaks ctnetlink: # conntrack -I -p tcp --timeout 123 --src 1.2.3.4 --dst 5.6.7.8 --state ESTABLISHED --sport 1 --dport 4 -u SEEN_REPLY conntrack v1...
```diff diff --git a/net/netfilter/nf_conntrack_bpf.c b/net/netfilter/nf_conntrack_bpf.c index cd99e6dc1f35..34913521c385 100644 --- a/net/netfilter/nf_conntrack_bpf.c +++ b/net/netfilter/nf_conntrack_bpf.c @@ -381,6 +381,7 @@ __bpf_kfunc struct nf_conn *bpf_ct_insert_entry(struct nf_conn___init *nfct_i) struct nf_co...
4e006c7a6dac0ead4c1bf606000aa90a372fc253
Analyze and fix the following issue in the Linux kernel code: net: rpl: fix rpl header size calculation
Problem Details: This patch fixes a missing 8 byte for the header size calculation. The ipv6_rpl_srh_size() is used to check a skb_pull() on skb->data which points to skb_transport_header(). Currently we only check on the calculated addresses fields using CmprI and CmprE fields, see: https://www.rfc-editor.org/rfc/rfc...
```diff diff --git a/net/ipv6/rpl.c b/net/ipv6/rpl.c index 488aec9e1a74..d1876f192225 100644 --- a/net/ipv6/rpl.c +++ b/net/ipv6/rpl.c @@ -32,7 +32,8 @@ static void *ipv6_rpl_segdata_pos(const struct ipv6_rpl_sr_hdr *hdr, int i) size_t ipv6_rpl_srh_size(unsigned char n, unsigned char cmpri, unsigned char cmpre) ...
6f4833383e8514ea796d094e05c24889b8997fde
Analyze and fix the following issue in the Linux kernel code: net: vmxnet3: Fix NULL pointer dereference in vmxnet3_rq_rx_complete()
Problem Details: When vmxnet3_rq_create() fails to allocate rq->data_ring.base due to page allocation failure, subsequent call to vmxnet3_rq_rx_complete() can result in NULL pointer dereference. To fix this bug, check not only that rxDataRingUsed is true but also that adapter->rxdataring_enabled is true before calling...
```diff diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index da488cbb0542..f2b76ee866a4 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c @@ -1504,7 +1504,7 @@ vmxnet3_rq_rx_complete(struct vmxnet3_rx_queue *rq, goto rcd_done; } - if ...
3f734b8c594bd378b0266cd98d6ce12b459da1d4
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: XDP, Use multiple single-entry objects in xdpi_fifo
Problem Details: Here we fix the current wi->num_pkts abuse, as it was used to indicate multiple xdpi entries in the xdpi_fifo. Instead, reduce mlx5e_xdp_info to the size of a single field, making it a union of unions. Per packet, use as many instances as needed to provide the information needed at the time of complet...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h index 386f5a498e52..0e15afbe1673 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h @@ -476,7 +476,7 @@ struct mlx5e_txqsq { } ____cacheline_aligned...
c484fcc058bada604d7e4e5228d4affb646ddbc2
Analyze and fix the following issue in the Linux kernel code: bonding: Fix memory leak when changing bond type to Ethernet
Problem Details: When a net device is put administratively up, its 'IFF_UP' flag is set (if not set already) and a 'NETDEV_UP' notification is emitted, which causes the 8021q driver to add VLAN ID 0 on the device. The reverse happens when a net device is put administratively down. When changing the type of a bond to E...
```diff diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 8cc9a74789b7..7a7d584f378a 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1777,14 +1777,15 @@ void bond_lower_state_changed(struct slave *slave) /* The bonding driver uses ether_setup(...
ef16799640865f937719f0771c93be5dca18adc6
Analyze and fix the following issue in the Linux kernel code: wifi: iwlwifi: dvm: Fix memcpy: detected field-spanning write backtrace
Problem Details: A received TKIP key may be up to 32 bytes because it may contain MIC rx/tx keys too. These are not used by iwl and copying these over overflows the iwl_keyinfo.key field. Add a check to not copy more data to iwl_keyinfo.key then will fit. This fixes backtraces like this one: memcpy: detected field-...
```diff diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/sta.c b/drivers/net/wireless/intel/iwlwifi/dvm/sta.c index cef43cf80620..8b01ab986cb1 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/sta.c @@ -1081,6 +1081,7 @@ static int iwlagn_send_sta_key(struct iwl_p...
33d74c8ff5ced854bc0ab6f94a778464dd2b905b
Analyze and fix the following issue in the Linux kernel code: net: mscc: ocelot: remove incompatible prototypes
Problem Details: The types for the register argument changed recently, but there are still incompatible prototypes that got left behind, and gcc-13 warns about these: In file included from drivers/net/ethernet/mscc/ocelot.c:13: drivers/net/ethernet/mscc/ocelot.h:97:5: error: conflicting types for 'ocelot_port_readl' d...
```diff diff --git a/drivers/net/ethernet/mscc/ocelot.h b/drivers/net/ethernet/mscc/ocelot.h index 14440a3b04c3..87f2055c242c 100644 --- a/drivers/net/ethernet/mscc/ocelot.h +++ b/drivers/net/ethernet/mscc/ocelot.h @@ -94,9 +94,6 @@ int ocelot_mact_forget(struct ocelot *ocelot, struct net_device *ocelot_port_to_netdev...
213ef669d1e536e57cdff8ddc2d3b9347b98e35f
Analyze and fix the following issue in the Linux kernel code: LoongArch: Replace hard-coded values in comments with VALEN
Problem Details: According to LoongArch documentation [1], CSR.PGDL and CSR.PGDH are concerned with the VA's MSB which is VALEN-1 instead of always being 47. Fix comments to avoid misleading others. [1] https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#page-global-directory-base-address-for-low...
```diff diff --git a/arch/loongarch/include/asm/loongarch.h b/arch/loongarch/include/asm/loongarch.h index 8c2969965c3c..83da5d29e2d1 100644 --- a/arch/loongarch/include/asm/loongarch.h +++ b/arch/loongarch/include/asm/loongarch.h @@ -423,9 +423,9 @@ static __always_inline void iocsr_write64(u64 val, u32 reg) #define ...
370a3b8f58743eceb97c5256538d6048c26d2d03
Analyze and fix the following issue in the Linux kernel code: LoongArch: Check unwind_error() in arch_stack_walk()
Problem Details: We can see the following messages with CONFIG_PROVE_LOCKING=y on LoongArch: BUG: MAX_STACK_TRACE_ENTRIES too low! turning off the locking correctness validator. This is because stack_trace_save() returns a big value after call arch_stack_walk(), here is the call trace: save_trace() stack_t...
```diff diff --git a/arch/loongarch/kernel/stacktrace.c b/arch/loongarch/kernel/stacktrace.c index 3a690f96f00c..2463d2fea21f 100644 --- a/arch/loongarch/kernel/stacktrace.c +++ b/arch/loongarch/kernel/stacktrace.c @@ -30,7 +30,7 @@ void arch_stack_walk(stack_trace_consume_fn consume_entry, void *cookie, regs->regs...
c4b52d8b6c1de1e6359bef2d1394d5917940b3dc
Analyze and fix the following issue in the Linux kernel code: riscv: export cpu/freq invariant to scheduler
Problem Details: RISC-V now manages CPU topology using arch_topology which provides CPU capacity and frequency related interfaces to access the cpu/freq invariant in possible heterogeneous or DVFS-enabled platforms. Here adds topology.h file to export the arch_topology interfaces for replacing the scheduler's constant...
```diff diff --git a/arch/riscv/include/asm/topology.h b/arch/riscv/include/asm/topology.h new file mode 100644 index 000000000000..727e8d163a3b --- /dev/null +++ b/arch/riscv/include/asm/topology.h @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_RISCV_TOPOLOGY_H +#define _ASM_RISCV_TOPOLOGY_H + ...
0c028b6a115e7f18480ec3f98ba7bccf011646ea
Analyze and fix the following issue in the Linux kernel code: scsi: scsi_debug: Abort commands from scsi_debug_device_reset()
Problem Details: Currently scsi_debug_device_reset() does not do much apart from setting the SDEBUG_UA_POR ("Power on, reset, or bus device reset") flag, which is eventually passed back to the SCSI midlayer later for a "unit attention" command. There is a report that blktest scsi/007 test fails due to commit 1107c7b24...
```diff diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index f4fa1035a191..8c58128ad32a 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -5291,6 +5291,26 @@ static int scsi_debug_abort(struct scsi_cmnd *SCpnt) return SUCCESS; } +static bool scsi_debug_stop_all_queued_it...
023fc150a39ffe656da3e459ad801eb1c7fdfad9
Analyze and fix the following issue in the Linux kernel code: cifs: Reapply lost fix from commit 30b2b2196d6e
Problem Details: Reapply the fix from: 30b2b2196d6e ("cifs: do not include page data when checking signature") that got lost in the iteratorisation of the cifs driver. Fixes: d08089f649a0 ("cifs: Change the I/O paths to use an iterator rather than a page list") Acked-by: Paulo Alcantara (SUSE) <pc@manguebit.com> ...
```diff diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index 4245249dbba8..366f0c3b799b 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c @@ -4180,10 +4180,12 @@ smb2_readv_callback(struct mid_q_entry *mid) struct smb2_hdr *shdr = (struct smb2_hdr *)rdata->iov[0].iov_base; struct cifs_credits credits ...
ac13692844f2fb23c503066c0cb231243218a7c8
Analyze and fix the following issue in the Linux kernel code: cifs: Fix unbuffered read
Problem Details: If read() is done in an unbuffered manner, such that, say, cifs_strict_readv() goes through cifs_user_readv() and thence __cifs_readv(), it doesn't recognise the EOF and keeps indicating to userspace that it returning full buffers of data. This is due to ctx->iter being advanced in cifs_send_async_rea...
```diff diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 6831a9949c43..b33d2e7b0f98 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -4010,7 +4010,6 @@ static void collect_uncached_read_data(struct cifs_aio_ctx *ctx) { struct cifs_readdata *rdata, *tmp; - struct iov_iter *to = &ctx->iter; struct cifs_sb_info...
96c7c2f4d5bd94b15fe63448c087f01607b56f4a
Analyze and fix the following issue in the Linux kernel code: drm/scheduler: set entity to NULL in drm_sched_entity_pop_job()
Problem Details: It already happend a few times that patches slipped through which implemented access to an entity through a job that was already removed from the entities queue. Since jobs and entities might have different lifecycles, this can potentially cause UAF bugs. In order to make it obvious that a jobs entity...
```diff diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler/sched_entity.c index e0a8890a62e2..3e2a31d8190e 100644 --- a/drivers/gpu/drm/scheduler/sched_entity.c +++ b/drivers/gpu/drm/scheduler/sched_entity.c @@ -448,6 +448,12 @@ struct drm_sched_job *drm_sched_entity_pop_job(struct drm_sc...
ea97f6c8558e83cb457c3b5f53351e4fd8519ab1
Analyze and fix the following issue in the Linux kernel code: io_uring: add support for multishot timeouts
Problem Details: A multishot timeout submission will repeatedly generate completions with the IORING_CQE_F_MORE cflag set. Depending on the value of the `off' field in the submission, these timeouts can either repeat indefinitely until cancelled (`off' = 0) or for a fixed number of times (`off' > 0). Only noseq timeou...
```diff diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h index f8d14d1c58d3..0716cb17e436 100644 --- a/include/uapi/linux/io_uring.h +++ b/include/uapi/linux/io_uring.h @@ -250,6 +250,7 @@ enum io_uring_op { #define IORING_TIMEOUT_REALTIME (1U << 3) #define IORING_LINK_TIMEOUT_UPDATE (1U <<...
3cc0c3738cde66a1eadf977fa7b2fdecbbcf5d4f
Analyze and fix the following issue in the Linux kernel code: selftests/memfd: fix test_sysctl
Problem Details: sysctl memfd_noexec is pid-namespaced, non-reservable, and inherent to the child process. Move the inherence test from init ns to child ns, so init ns can keep the default value. Link: https://lkml.kernel.org/r/20230414022801.2545257-1-jeffxu@google.com Signed-off-by: Jeff Xu <jeffxu@google.com> Repo...
```diff diff --git a/tools/testing/selftests/memfd/memfd_test.c b/tools/testing/selftests/memfd/memfd_test.c index ae71f15f790d..dba0e8ba002f 100644 --- a/tools/testing/selftests/memfd/memfd_test.c +++ b/tools/testing/selftests/memfd/memfd_test.c @@ -43,6 +43,9 @@ */ static size_t mfd_def_size = MFD_DEF_SIZE; stati...
a31a6c2465a368e2c40b8d768aa682b92743f33e
Analyze and fix the following issue in the Linux kernel code: dt-bindings: drm/bridge: ti-sn65dsi86: Fix the video-interfaces.yaml references
Problem Details: video-interface.txt does not exist anymore, as it has been converted to video-interfaces.yaml. Instead of referencing video-interfaces.yaml multiple times, pass it as a $ref to the schema. Signed-off-by: Fabio Estevam <festevam@denx.de> Link: https://lore.kernel.org/r/20230412175800.2537812-1-festeva...
```diff diff --git a/Documentation/devicetree/bindings/display/bridge/ti,sn65dsi86.yaml b/Documentation/devicetree/bindings/display/bridge/ti,sn65dsi86.yaml index 911564468c5e..6ec6d287bff4 100644 --- a/Documentation/devicetree/bindings/display/bridge/ti,sn65dsi86.yaml +++ b/Documentation/devicetree/bindings/display/br...
31088f6f7906253ef4577f6a9b84e2d42447dba0
Analyze and fix the following issue in the Linux kernel code: uapi/linux/const.h: prefer ISO-friendly __typeof__
Problem Details: typeof is (still) a GNU extension, which means that it cannot be used when building ISO C (e.g. -std=c99). It should therefore be avoided in uapi headers in favour of the ISO-friendly __typeof__. Unfortunately this issue could not be detected by CONFIG_UAPI_HEADER_TEST=y as the __ALIGN_KERNEL() macr...
```diff diff --git a/include/uapi/linux/const.h b/include/uapi/linux/const.h index af2a44c08683..a429381e7ca5 100644 --- a/include/uapi/linux/const.h +++ b/include/uapi/linux/const.h @@ -28,7 +28,7 @@ #define _BITUL(x) (_UL(1) << (x)) #define _BITULL(x) (_ULL(1) << (x)) -#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL...
a3b2aeac9d154e5e15ddbf19de934c0c606b6acd
Analyze and fix the following issue in the Linux kernel code: delayacct: track delays from IRQ/SOFTIRQ
Problem Details: Delay accounting does not track the delay of IRQ/SOFTIRQ. While IRQ/SOFTIRQ could have obvious impact on some workloads productivity, such as when workloads are running on system which is busy handling network IRQ/SOFTIRQ. Get the delay of IRQ/SOFTIRQ could help users to reduce such delay. Such as s...
```diff diff --git a/Documentation/accounting/delay-accounting.rst b/Documentation/accounting/delay-accounting.rst index 79f537c9f160..f61c01fc376e 100644 --- a/Documentation/accounting/delay-accounting.rst +++ b/Documentation/accounting/delay-accounting.rst @@ -16,6 +16,7 @@ d) memory reclaim e) thrashing f) direct ...
8af055ae25bff48f57227f5e3d48a4306f3dd1c4
Analyze and fix the following issue in the Linux kernel code: scripts/gdb: raise error with reduced debugging information
Problem Details: If CONFIG_DEBUG_INFO_REDUCED is enabled in the kernel configuration, we will typically not be able to load vmlinux-gdb.py and will fail with: Traceback (most recent call last): File "/home/fainelli/work/buildroot/output/arm64/build/linux-custom/vmlinux-gdb.py", line 25, in <module> import linux....
```diff diff --git a/scripts/gdb/linux/constants.py.in b/scripts/gdb/linux/constants.py.in index 6c886deb0b18..e484e2e7e4d5 100644 --- a/scripts/gdb/linux/constants.py.in +++ b/scripts/gdb/linux/constants.py.in @@ -40,6 +40,8 @@ import gdb +LX_CONFIG(CONFIG_DEBUG_INFO_REDUCED) + /* linux/clk-provider.h */ if IS_...
c917a872cee480d1fc8461da9be93e27e7977877
Analyze and fix the following issue in the Linux kernel code: checkpatch: don't print the next line if not defined
Problem Details: When checking if "Reported-by" tag is followed by "Link:", there is no need to print the next line if there is no next line. While at it, also mention in this case that the "Link:" tag should be followed by a URL, similar to the next warning. By doing that, the code is now similar to what is done abo...
```diff diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index c7cd0750b41e..8e22eb45ab2d 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3162,7 +3162,7 @@ sub process { if ($sign_off =~ /^reported(?:|-and-tested)-by:$/i) { if (!defined $lines[$linenr]) { WARN("BAD_REPORTED_B...
0d828200ad56505a827610af876ca0b138b943a6
Analyze and fix the following issue in the Linux kernel code: docs: process: allow Closes tags with links
Problem Details: Since v6.3, checkpatch.pl now complains about the use of "Closes:" tags followed by a link [1]. It also complains if a "Reported-by:" tag is followed by a "Closes:" one [2]. As detailed in the first patch, this "Closes:" tag is used for a bit of time, mainly by DRM and MPTCP subsystems. It is used b...
```diff diff --git a/Documentation/process/5.Posting.rst b/Documentation/process/5.Posting.rst index 7a670a075ab6..de4edd42d5c0 100644 --- a/Documentation/process/5.Posting.rst +++ b/Documentation/process/5.Posting.rst @@ -207,8 +207,8 @@ the patch:: Fixes: 1f2e3d4c5b6a ("The first line of the commit specified by the...
8fc2a304f57cb304231a4b0564d5995b2dd04f63
Analyze and fix the following issue in the Linux kernel code: scripts/gdb: fix lx-timerlist for HRTIMER_MAX_CLOCK_BASES printing
Problem Details: HRTIMER_MAX_CLOCK_BASES is of enum type hrtimer_base_type. To print it as an integer, HRTIMER_MAX_CLOCK_BASES should be converted first. Link: https://lkml.kernel.org/r/TYCP286MB214640FF0E7F04AC3926A39EC6819@TYCP286MB2146.JPNP286.PROD.OUTLOOK.COM Signed-off-by: Peng Liu <liupeng17@lenovo.com> Reviewe...
```diff diff --git a/scripts/gdb/linux/timerlist.py b/scripts/gdb/linux/timerlist.py index 8281da068c5b..249f0e804b24 100644 --- a/scripts/gdb/linux/timerlist.py +++ b/scripts/gdb/linux/timerlist.py @@ -188,7 +188,8 @@ class LxTimerList(gdb.Command): max_clock_bases = gdb.parse_and_eval("HRTIMER_MAX_CLOCK_BASE...
7362042f3556528e9e9b1eb5ce8d7a3a6331476b
Analyze and fix the following issue in the Linux kernel code: scripts/gdb: fix lx-timerlist for Python3
Problem Details: Below incompatibilities between Python2 and Python3 made lx-timerlist fail to run under Python3. o xrange() is replaced by range() in Python3 o bytes and str are different types in Python3 o the return value of Inferior.read_memory() is memoryview object in Python3 akpm: cc stable so that older ker...
```diff diff --git a/scripts/gdb/linux/timerlist.py b/scripts/gdb/linux/timerlist.py index 44e39dc3eb64..8281da068c5b 100644 --- a/scripts/gdb/linux/timerlist.py +++ b/scripts/gdb/linux/timerlist.py @@ -72,7 +72,7 @@ def print_cpu(hrtimer_bases, cpu, max_clock_bases): ts = cpus.per_cpu(tick_sched_ptr, cpu) ...
747cd84f677cedb27db10d4ada777d7ec20431ee
Analyze and fix the following issue in the Linux kernel code: scripts/gdb: fix lx-timerlist for struct timequeue_head change
Problem Details: commit 511885d7061e ("lib/timerqueue: Rely on rbtree semantics for next timer") changed struct timerqueue_head, and so print_active_timers() should be changed accordingly with its way to interpret the structure. Link: https://lkml.kernel.org/r/TYCP286MB21463BD277330B26DDC18903C6819@TYCP286MB2146.JPNP2...
```diff diff --git a/scripts/gdb/linux/timerlist.py b/scripts/gdb/linux/timerlist.py index 071d0dd5a634..44e39dc3eb64 100644 --- a/scripts/gdb/linux/timerlist.py +++ b/scripts/gdb/linux/timerlist.py @@ -43,8 +43,7 @@ def print_timer(rb_node, idx): def print_active_timers(base): - curr = base['active']['next']['...
7f63cf2d9b9bbe7b90f808927558a66ff737d399
Analyze and fix the following issue in the Linux kernel code: mm: Multi-gen LRU: remove wait_event_killable()
Problem Details: Android 14 and later default to MGLRU [1] and field telemetry showed occasional long tail latency (>100ms) in the reclaim path. Tracing revealed priority inversion in the reclaim path. In try_to_inc_max_seq(), when high priority tasks were blocked on wait_event_killable(), the preemption of the low p...
```diff diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 337956748976..a4889c9d4055 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -443,18 +443,14 @@ enum { struct lru_gen_mm_state { /* set to max_seq after each iteration */ unsigned long seq; - /* where the current iteration...
583c27a167c2bc6088ec80be0d16ef44dd9fc6b0
Analyze and fix the following issue in the Linux kernel code: mm: vmscan: ignore non-LRU-based reclaim in memcg reclaim
Problem Details: Patch series "Ignore non-LRU-based reclaim in memcg reclaim", v6. Upon running some proactive reclaim tests using memory.reclaim, we noticed some tests flaking where writing to memory.reclaim would be successful even though we did not reclaim the requested amount fully Looking further into it, I disco...
```diff diff --git a/mm/vmscan.c b/mm/vmscan.c index 7f2441d6dfb2..f2fa565276cb 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -528,6 +528,46 @@ static bool writeback_throttling_sane(struct scan_control *sc) } #endif +/* + * flush_reclaim_state(): add pages reclaimed outside of LRU-based reclaim to + * scan_control-...
ec342603e6d7404c17936a6b53670c28355d3bc3
Analyze and fix the following issue in the Linux kernel code: memcg: page_cgroup_ino() get memcg from the page's folio
Problem Details: In a kernel with added WARN_ON_ONCE(PageTail) in page_memcg_check(), we observed a warning from page_cgroup_ino() when reading /proc/kpagecgroup. This warning was added to catch fragile reads of a page memcg. Make page_cgroup_ino() get memcg from the page's folio using folio_memcg_check(): that gives...
```diff diff --git a/mm/memcontrol.c b/mm/memcontrol.c index cb17f3abdfe0..4b27e245a055 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -396,7 +396,8 @@ ino_t page_cgroup_ino(struct page *page) unsigned long ino = 0; rcu_read_lock(); - memcg = page_memcg_check(page); + /* page_folio() is racy here, but the ...
87a7ae75d7383afa998f57656d1d14e2a730cc47
Analyze and fix the following issue in the Linux kernel code: mm/vmemmap/devdax: fix kernel crash when probing devdax devices
Problem Details: commit 4917f55b4ef9 ("mm/sparse-vmemmap: improve memory savings for compound devmaps") added support for using optimized vmmemap for devdax devices. But how vmemmap mappings are created are architecture specific. For example, powerpc with hash translation doesn't have vmemmap mappings in init_mm page...
```diff diff --git a/include/linux/mm.h b/include/linux/mm.h index 5a3eaa9a1f8c..21a7e2460084 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -3560,6 +3560,22 @@ void vmemmap_populate_print_last(void); void vmemmap_free(unsigned long start, unsigned long end, struct vmem_altmap *altmap); #endif + +#ifd...
f9da24263db43da12f1e105cb8ac5e02c66f12d0
Analyze and fix the following issue in the Linux kernel code: selftests/mm: allow uffd test to skip properly with no privilege
Problem Details: Allow skip a unit test properly due to no privilege (e.g. sigbus and events tests). [colin.i.king@gmail.com: fix spelling mistake "priviledge" -> "privilege"] Link: https://lkml.kernel.org/r/20230414081506.1678998-1-colin.i.king@gmail.com Link: https://lkml.kernel.org/r/20230412164520.329163-1-pete...
```diff diff --git a/tools/testing/selftests/mm/uffd-common.c b/tools/testing/selftests/mm/uffd-common.c index 12ac84712a38..3e98e129f8bd 100644 --- a/tools/testing/selftests/mm/uffd-common.c +++ b/tools/testing/selftests/mm/uffd-common.c @@ -232,7 +232,7 @@ void uffd_stats_report(struct uffd_args *args, int n_cpus) ...
686a8bb723497197022c73807cdd29eb5a1aeec8
Analyze and fix the following issue in the Linux kernel code: selftests/mm: split uffd tests into uffd-stress and uffd-unit-tests
Problem Details: In many ways it's weird and unwanted to keep all the tests in the same userfaultfd.c at least when still in the current way. For example, it doesn't make much sense to run the stress test for each method we can create an userfaultfd handle (either via syscall or /dev/ node). It's a waste of time runn...
```diff diff --git a/tools/testing/selftests/mm/.gitignore b/tools/testing/selftests/mm/.gitignore index 347277f2adc3..8917455f4f51 100644 --- a/tools/testing/selftests/mm/.gitignore +++ b/tools/testing/selftests/mm/.gitignore @@ -21,7 +21,8 @@ protection_keys protection_keys_32 protection_keys_64 madv_populate -use...
1462c52e9f2b99e72022ed8979bfc969894bb3da
Analyze and fix the following issue in the Linux kernel code: mm/huge_memory: conditionally call maybe_mkwrite() and drop pte_wrprotect() in __split_huge_pmd_locked()
Problem Details: No need to call maybe_mkwrite() to then wrprotect if the source PMD was not writable. It's worth nothing that this now allows for PTEs to be writable even if the source PMD was not writable: if vma->vm_page_prot includes write permissions. As documented in commit 931298e103c2 ("mm/userfaultfd: rely o...
```diff diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 5700b1c727b6..c23fa39dec92 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2233,11 +2233,10 @@ static void __split_huge_pmd_locked(struct vm_area_struct *vma, pmd_t *pmd, entry = pte_swp_mkuffd_wp(entry); } else { entry = mk_pte(page + ...
5436d6556937de6236ffa1829550d13702569dab
Analyze and fix the following issue in the Linux kernel code: mm/huge_memory: revert "Partly revert "mm/thp: carry over dirty bit when thp splits on pmd""
Problem Details: This reverts commit 624a2c94f5b7 ("Partly revert "mm/thp: carry over dirty bit when thp splits on pmd"") and the fixup in commit e833bc503405 ("mm/thp: re-apply mkdirty for small pages after split"). Now that sparc64 mkdirty handling is fixed and no longer sets a PTE/PMD writable that shouldn't be wri...
```diff diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 00a7a98f2ba2..5700b1c727b6 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2236,18 +2236,13 @@ static void __split_huge_pmd_locked(struct vm_area_struct *vma, pmd_t *pmd, entry = maybe_mkwrite(entry, vma); if (anon_exclusive) SetPageAn...
3c811f7883c4ee5a34ba4354381bde062888dd31
Analyze and fix the following issue in the Linux kernel code: mm/migrate: revert "mm/migrate: fix wrongly apply write bit after mkdirty on sparc64"
Problem Details: This reverts commit 96a9c287e25d ("mm/migrate: fix wrongly apply write bit after mkdirty on sparc64"). Now that sparc64 mkdirty handling is fixed and no longer sets a PTE/PMD writable that shouldn't be writable, let's revert the temporary fix. The mkdirty mm selftest still passes with this change on ...
```diff diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 0dbce09916c4..00a7a98f2ba2 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -3276,6 +3276,8 @@ void remove_migration_pmd(struct page_vma_mapped_walk *pvmw, struct page *new) pmde = mk_huge_pmd(new, READ_ONCE(vma->vm_page_prot)); if (pmd_swp_soft_...
fa2e71a6fcee495e16176bd606e7121332627a16
Analyze and fix the following issue in the Linux kernel code: sparc/mm: don't unconditionally set HW writable bit when setting PTE dirty on 64bit
Problem Details: On sparc64, there is no HW modified bit, therefore, SW tracks via a SW bit if the PTE is dirty via pte_mkdirty(). However, pte_mkdirty() currently also unconditionally sets the HW writable bit, which is wrong. pte_mkdirty() is not supposed to make a PTE actually writable, unless the SW writable bit -...
```diff diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h index 2dc8d4641734..5563efa1a19f 100644 --- a/arch/sparc/include/asm/pgtable_64.h +++ b/arch/sparc/include/asm/pgtable_64.h @@ -357,6 +357,42 @@ static inline pgprot_t pgprot_noncached(pgprot_t prot) */ #define pgprot_nonc...
9eac40fc0cc7b5bbc405af3b94cbe8aeb680ab26
Analyze and fix the following issue in the Linux kernel code: selftests/mm: mkdirty: test behavior of (pte|pmd)_mkdirty on VMAs without write permissions
Problem Details: Let's add some tests that trigger (pte|pmd)_mkdirty on VMAs without write permissions. If an architecture implementation is wrong, we might accidentally set the PTE/PMD writable and allow for write access in a VMA without write permissions. The tests include reproducers for the two issues recently di...
```diff diff --git a/tools/testing/selftests/mm/Makefile b/tools/testing/selftests/mm/Makefile index c31d952cff68..8235dddbbbc6 100644 --- a/tools/testing/selftests/mm/Makefile +++ b/tools/testing/selftests/mm/Makefile @@ -47,6 +47,7 @@ TEST_GEN_FILES += map_hugetlb TEST_GEN_FILES += map_populate TEST_GEN_FILES += me...
4e3c87b9421df497d849ae61aab9762de7f66afb
Analyze and fix the following issue in the Linux kernel code: zram: fix synchronous reads
Problem Details: Currently nothing waits for the synchronous reads before accessing the data. Switch them to an on-stack bio and submit_bio_wait to make sure the I/O has actually completed when the work item has been flushed. This also removes the call to page_endio that would unlock a page that has never been locked...
```diff diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 24b31957d9e8..a2b98100cbda 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -55,7 +55,7 @@ static const struct block_device_operations zram_devops; static void zram_free_page(struct zram *zram, s...
a70aae12502b130b0c30dda44dff09e575c1aaeb
Analyze and fix the following issue in the Linux kernel code: zram: always compile read_from_bdev_sync
Problem Details: Patch series "zram I/O path cleanups and fixups", v3. This series cleans up the zram I/O path, and fixes the handling of synchronous I/O to the underlying device in the writeback_store function or for > 4K PAGE_SIZE systems. The fixes are at the end, as I could not fully reason about them being safe ...
```diff diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index aa490da3cef2..57787cbdf1f7 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -148,6 +148,7 @@ static inline bool is_partial_io(struct bio_vec *bvec) { return bvec->bv_len != PAGE_SIZE; } +#define...
fb20e99a74f8f08c53061e0186d0c26d546dc843
Analyze and fix the following issue in the Linux kernel code: maple_tree: use correct variable type in sizeof
Problem Details: The type of variable pointed to by pivs is unsigned long, but the type used in sizeof is a pointer type. Change it to unsigned long. This change has no runtime effect, as sizeof(ul) == sizeof(ul *). Link: https://lkml.kernel.org/r/20230411023513.15227-1-zhangpeng.00@bytedance.com Fixes: 54a611b60590...
```diff diff --git a/lib/maple_tree.c b/lib/maple_tree.c index f475bac9d914..9172bcee94b4 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -3258,7 +3258,7 @@ static inline void mas_destroy_rebalance(struct ma_state *mas, unsigned char end if (tmp < max_p) memset(pivs + tmp, 0, - sizeof(unsigned...