id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
95f610e36adc74f3972e31c28567d66777ce37f3
Analyze and fix the following issue in the Linux kernel code: rtc: pcf85063: scope pcf85063_config structures
Problem Details: Fix possible warning: >> drivers/rtc/rtc-pcf85063.c:566:37: warning: unused variable 'config_rv8063' [-Wunused-const-variable] 566 | static const struct pcf85063_config config_rv8063 = { | ^~~~~~~~~~~~~ Reported-by: kernel test robot <lkp@intel.com> Cl...
```diff diff --git a/drivers/rtc/rtc-pcf85063.c b/drivers/rtc/rtc-pcf85063.c index d9b67b959d18..e3b58cdb1eda 100644 --- a/drivers/rtc/rtc-pcf85063.c +++ b/drivers/rtc/rtc-pcf85063.c @@ -528,53 +528,6 @@ static struct clk *pcf85063_clkout_register_clk(struct pcf85063 *pcf85063) } #endif -static const struct pcf8506...
2656a75ca140710b7cc78f3c495dd9660f78a2c3
Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: add missing files to page alloc section
Problem Details: There are a couple of mm/-specific header files that were accidentally missed previously, and some page ref debug code also that ought to live here. Link: https://lkml.kernel.org/r/20250722174143.147143-1-lorenzo.stoakes@oracle.com Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Acked-by: ...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index 421e1c68cfd4..3d0e66d5385d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -15880,6 +15880,7 @@ F: include/linux/gfp.h F: include/linux/page-isolation.h F: mm/compaction.c F: mm/debug_page_alloc.c +F: mm/debug_page_ref.c F: mm/fail_page_alloc.c F: mm/page_alloc.c ...
6da5e2961f3a1f350ec974b0c56374015b1c8fc1
Analyze and fix the following issue in the Linux kernel code: selftests/damon/_damon_sysfs: support DAMOS watermarks setup
Problem Details: Patch series "selftests/damon/sysfs.py: test all parameters". sysfs.py tests if DAMON sysfs interface is passing the user-requested parameters to DAMON as expected. But only the default (minimum) parameters are being tested. This is partially because _damon_sysfs.py, which is the library for making ...
```diff diff --git a/tools/testing/selftests/damon/_damon_sysfs.py b/tools/testing/selftests/damon/_damon_sysfs.py index f587e117472e..d81aa11e3d32 100644 --- a/tools/testing/selftests/damon/_damon_sysfs.py +++ b/tools/testing/selftests/damon/_damon_sysfs.py @@ -165,6 +165,42 @@ class DamosQuota: retur...
cf20cb9ad1eb3bf59ede1f93a0640f06e6b9d028
Analyze and fix the following issue in the Linux kernel code: selftests/damon/sysfs.py: stop DAMON for dumping failures
Problem Details: Commit 4ece01897627 ("selftests/damon: add python and drgn-based DAMON sysfs test") in mm-stable tree introduced sysfs.py that runs drgn for dumping DAMON status. When the DAMON status dumping fails for reasons including drgn uninstalled environment, the test fails without stopping DAMON. Following D...
```diff diff --git a/tools/testing/selftests/damon/sysfs.py b/tools/testing/selftests/damon/sysfs.py index e67008fd055d..fdc04f12be54 100755 --- a/tools/testing/selftests/damon/sysfs.py +++ b/tools/testing/selftests/damon/sysfs.py @@ -8,6 +8,10 @@ import subprocess import _damon_sysfs def dump_damon_status_dict(pid...
32e42ab9fc88a884435c27527a433f61c4d2b61b
Analyze and fix the following issue in the Linux kernel code: sched/task_stack: Add missing const qualifier to end_of_stack()
Problem Details: Add missing const qualifier to the non-CONFIG_THREAD_INFO_IN_TASK version of end_of_stack() to match the CONFIG_THREAD_INFO_IN_TASK version. Fixes a warning with CONFIG_KSTACK_ERASE=y on archs that don't select THREAD_INFO_IN_TASK (such as LoongArch): error: passing 'const struct task_struct *' to p...
```diff diff --git a/include/linux/sched/task_stack.h b/include/linux/sched/task_stack.h index 85c5a6392e02..1fab7e9043a3 100644 --- a/include/linux/sched/task_stack.h +++ b/include/linux/sched/task_stack.h @@ -53,7 +53,7 @@ static inline void setup_thread_stack(struct task_struct *p, struct task_struct * When the st...
6c17a882d3804dce1c66e1fec25f96d39a184067
Analyze and fix the following issue in the Linux kernel code: bpf, arm64: JIT support for private stack
Problem Details: The private stack is allocated in bpf_int_jit_compile() with 16-byte alignment. It includes additional guard regions to detect stack overflows and underflows at runtime. Memory layout: +------------------------------------------------------+ | ...
```diff diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c index 97ab651c0bd5..97dfd5432809 100644 --- a/arch/arm64/net/bpf_jit_comp.c +++ b/arch/arm64/net/bpf_jit_comp.c @@ -30,6 +30,7 @@ #define TMP_REG_2 (MAX_BPF_JIT_REG + 1) #define TCCNT_PTR (MAX_BPF_JIT_REG + 2) #define TMP_REG_3 (MAX_B...
b114fcee766d5101eada1aca7bb5fd0a86c89b35
Analyze and fix the following issue in the Linux kernel code: bpf, arm64: Fix fp initialization for exception boundary
Problem Details: In the ARM64 BPF JIT when prog->aux->exception_boundary is set for a BPF program, find_used_callee_regs() is not called because for a program acting as exception boundary, all callee saved registers are saved. find_used_callee_regs() sets `ctx->fp_used = true;` when it sees FP being used in any of the ...
```diff diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c index 89b1b8c248c6..97ab651c0bd5 100644 --- a/arch/arm64/net/bpf_jit_comp.c +++ b/arch/arm64/net/bpf_jit_comp.c @@ -412,6 +412,7 @@ static void push_callee_regs(struct jit_ctx *ctx) emit(A64_PUSH(A64_R(23), A64_R(24), A64_SP), ctx); ...
fa582ca7e187a15e772e6a72fe035f649b387a60
Analyze and fix the following issue in the Linux kernel code: dpll: zl3073x: Fix build failure
Problem Details: If CONFIG_ZL3073X is enabled but both CONFIG_ZL3073X_I2C and CONFIG_ZL3073X_SPI are disabled, the compilation may fail because CONFIG_REGMAP is not enabled. Fix the issue by selecting CONFIG_REGMAP when CONFIG_ZL3073X is enabled. Fixes: 2df8e64e01c10 ("dpll: Add basic Microchip ZL3073x support") Sign...
```diff diff --git a/drivers/dpll/zl3073x/Kconfig b/drivers/dpll/zl3073x/Kconfig index 41fa6a8f96ab..7db262ab8458 100644 --- a/drivers/dpll/zl3073x/Kconfig +++ b/drivers/dpll/zl3073x/Kconfig @@ -5,6 +5,7 @@ config ZL3073X depends on NET select DPLL select NET_DEVLINK + select REGMAP help This driver support...
38b74b212a34c37c3157ba6c3af7025fb9447458
Analyze and fix the following issue in the Linux kernel code: selftests: bpf: fix legacy netfilter options
Problem Details: Recent commit to add NETFILTER_XTABLES_LEGACY missed setting a couple of configs to y. They are still enabled but as modules which appears to have upset BPF CI, e.g.: test_bpf_nf_ct:FAIL:iptables-legacy -t raw -A PREROUTING -j CONNMARK --set-mark 42/0 unexpected error: 768 (errno 0) Fixes: 3c3ab65...
```diff diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config index 521836776733..e8c6c77b96cb 100644 --- a/tools/testing/selftests/bpf/config +++ b/tools/testing/selftests/bpf/config @@ -97,6 +97,8 @@ CONFIG_NF_TABLES_NETDEV=y CONFIG_NF_TABLES_IPV4=y CONFIG_NF_TABLES_IPV6=y CONFIG_NET...
2b03164eee20eac7ce0fe3aa4fbda7efc1e5427a
Analyze and fix the following issue in the Linux kernel code: bpf/preload: Don't select USERMODE_DRIVER
Problem Details: The usermode driver framework is not used anymore by the BPF preload code. Fixes: cb80ddc67152 ("bpf: Convert bpf_preload.ko to use light skeleton.") Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Reviewed-by: Christoph Hellwig <...
```diff diff --git a/kernel/bpf/preload/Kconfig b/kernel/bpf/preload/Kconfig index c9d45c9d6918..f9b11d01c3b5 100644 --- a/kernel/bpf/preload/Kconfig +++ b/kernel/bpf/preload/Kconfig @@ -10,7 +10,6 @@ menuconfig BPF_PRELOAD # The dependency on !COMPILE_TEST prevents it from being enabled # in allmodconfig or allyes...
31d7d67ba1274f42494256d52e86da80ed09f3cb
Analyze and fix the following issue in the Linux kernel code: ipv6: annotate data-races around rt->fib6_nsiblings
Problem Details: rt->fib6_nsiblings can be read locklessly, add corresponding READ_ONCE() and WRITE_ONCE() annotations. Fixes: 66f5d6ce53e6 ("ipv6: replace rwlock with rcu and spinlock in fib6_table") Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20250725140725.3626540-5-edumazet@goo...
```diff diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index af7db69d9eac..4d68bd853dba 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c @@ -445,15 +445,17 @@ struct fib6_dump_arg { static int fib6_rt_dump(struct fib6_info *rt, struct fib6_dump_arg *arg) { enum fib_event_type fib_event = FIB_EVENT_ENT...
f8d8ce1b515a0a6af72b30502670a406cfb75073
Analyze and fix the following issue in the Linux kernel code: ipv6: fix possible infinite loop in fib6_info_uses_dev()
Problem Details: fib6_info_uses_dev() seems to rely on RCU without an explicit protection. Like the prior fix in rt6_nlmsg_size(), we need to make sure fib6_del_route() or fib6_add_rt2node() have not removed the anchor from the list, or we risk an infinite loop. Fixes: d9ccb18f83ea ("ipv6: Fix soft lockups in fib6_se...
```diff diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 6d4e147ae46b..04f2b860ca61 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -5958,16 +5958,21 @@ static bool fib6_info_uses_dev(const struct fib6_info *f6i, if (f6i->fib6_nh->fib_nh_dev == dev) return true; - if (f6i->fib6_nsiblings) { - stru...
54e6fe9dd3b0e7c481c2228782c9494d653546da
Analyze and fix the following issue in the Linux kernel code: ipv6: prevent infinite loop in rt6_nlmsg_size()
Problem Details: While testing prior patch, I was able to trigger an infinite loop in rt6_nlmsg_size() in the following place: list_for_each_entry_rcu(sibling, &f6i->fib6_siblings, fib6_siblings) { rt6_nh_nlmsg_size(sibling->fib6_nh, &nexthop_len); } This is because fib6_del_route() and fib6_add_rt2node() uses li...
```diff diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 93578b2ec35f..af7db69d9eac 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c @@ -1265,7 +1265,7 @@ add: &rt->fib6_siblings, fib6_siblings) sibling->fib6_nsiblings--; - rt->fib6_nsiblings = 0; + WRITE_ONCE(rt->fib6_ns...
ea2f921db7a483a526058c5b5b8162edd88dabe5
Analyze and fix the following issue in the Linux kernel code: ipv6: add a retry logic in net6_rt_notify()
Problem Details: inet6_rt_notify() can be called under RCU protection only. This means the route could be changed concurrently and rt6_fill_node() could return -EMSGSIZE. Re-size the skb when this happens and retry, removing one WARN_ON() that syzbot was able to trigger: WARNING: CPU: 3 PID: 6291 at net/ipv6/route.c:...
```diff diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 79c8f1acf8a3..9f92129efa05 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -6321,8 +6321,9 @@ errout: void inet6_rt_notify(int event, struct fib6_info *rt, struct nl_info *info, unsigned int nlm_flags) { - struct sk_buff *skb; struct net...
f388f807eca1de9e6e70f9ffb1a573c3811c4215
Analyze and fix the following issue in the Linux kernel code: vrf: Drop existing dst reference in vrf_ip6_input_dst
Problem Details: Commit ff3fbcdd4724 ("selftests: tc: Add generic erspan_opts matching support for tc-flower") started triggering the following kmemleak warning: unreferenced object 0xffff888015fb0e00 (size 512): comm "softirq", pid 0, jiffies 4294679065 hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 40 d2...
```diff diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c index 9a4beea6ee0c..3ccd649913b5 100644 --- a/drivers/net/vrf.c +++ b/drivers/net/vrf.c @@ -1302,6 +1302,8 @@ static void vrf_ip6_input_dst(struct sk_buff *skb, struct net_device *vrf_dev, struct net *net = dev_net(vrf_dev); struct rt6_info *rt6; + skb_ds...
5b32321fdaf3fd1a92ec726af18765e225b0ee2b
Analyze and fix the following issue in the Linux kernel code: selftests: rtnetlink.sh: remove esp4_offload after test
Problem Details: The esp4_offload module, loaded during IPsec offload tests, should be reset to its default settings after testing. Otherwise, leaving it enabled could unintentionally affect subsequence test cases by keeping offload active. Without this fix: $ lsmod | grep offload; ./rtnetlink.sh -t kci_test_ipsec_off...
```diff diff --git a/tools/testing/selftests/net/rtnetlink.sh b/tools/testing/selftests/net/rtnetlink.sh index 7020f988f659..d6c00efeb664 100755 --- a/tools/testing/selftests/net/rtnetlink.sh +++ b/tools/testing/selftests/net/rtnetlink.sh @@ -720,6 +720,11 @@ kci_test_ipsec_offload() sysfsf=$sysfsd/ipsec sysfsnet=/...
3b7c13dfdcc26a78756cc17a23cdf4310c5a24a9
Analyze and fix the following issue in the Linux kernel code: igb: xsk: solve negative overflow of nb_pkts in zerocopy mode
Problem Details: There is no break time in the while() loop, so every time at the end of igb_xmit_zc(), negative overflow of nb_pkts will occur, which renders the return value always false. But theoretically, the result should be set after calling xsk_tx_peek_release_desc_batch(). We can take i40e_xmit_zc() as a good e...
```diff diff --git a/drivers/net/ethernet/intel/igb/igb_xsk.c b/drivers/net/ethernet/intel/igb/igb_xsk.c index 5cf67ba29269..30ce5fbb5b77 100644 --- a/drivers/net/ethernet/intel/igb/igb_xsk.c +++ b/drivers/net/ethernet/intel/igb/igb_xsk.c @@ -482,7 +482,7 @@ bool igb_xmit_zc(struct igb_ring *tx_ring, struct xsk_buff_po...
2764ab51d5f0e8c7d3b7043af426b1883e3bde1d
Analyze and fix the following issue in the Linux kernel code: stmmac: xsk: fix negative overflow of budget in zerocopy mode
Problem Details: A negative overflow can happen when the budget number of descs are consumed. as long as the budget is decreased to zero, it will again go into while (budget-- > 0) statement and get decreased by one, so the overflow issue can happen. It will lead to returning true whereas the expected value should be f...
```diff diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index b948df1bff9a..e0fb06af1f94 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -2596,7 +2596,7 @@ static bool stmmac_xdp_...
82221a4e66f044a5fe1d0acce10112a821655e8e
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Disambiguate support for vSGIs v. vLPIs
Problem Details: vgic_supports_direct_msis() is a bit of a misnomer, as it returns true if either vSGIs or vLPIs are supported. Pick it apart into a few predicates and replace some open-coded checks for vSGIs, including an opportunistic fix to always check if the CPUIF is capable of handling vSGIs. Reviewed-by: Marc Z...
```diff diff --git a/arch/arm64/kvm/vgic/vgic-init.c b/arch/arm64/kvm/vgic/vgic-init.c index eb1205654ac8..0d8bc2ac627a 100644 --- a/arch/arm64/kvm/vgic/vgic-init.c +++ b/arch/arm64/kvm/vgic/vgic-init.c @@ -391,11 +391,10 @@ int vgic_init(struct kvm *kvm) goto out; /* - * If we have GICv4.1 enabled, uncondition...
0f3046c8f68c00a2e4db31e21a7f14aa20913524
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: vgic-v3: Fix ordering of ICH_HCR_EL2
Problem Details: The sysreg tables are supposed to be sorted so that a binary search can easily find them. However, ICH_HCR_EL2 is obviously at the wrong spot. Move it where it belongs. Fixes: 9fe9663e47e21 ("KVM: arm64: Expose GICv3 EL2 registers via KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS") Signed-off-by: Marc Zyngier <ma...
```diff diff --git a/arch/arm64/kvm/vgic-sys-reg-v3.c b/arch/arm64/kvm/vgic-sys-reg-v3.c index 75aee0148936..1850f1727eb9 100644 --- a/arch/arm64/kvm/vgic-sys-reg-v3.c +++ b/arch/arm64/kvm/vgic-sys-reg-v3.c @@ -421,8 +421,8 @@ static const struct sys_reg_desc gic_v3_icc_reg_descs[] = { EL2_REG(ICH_AP1R1_EL2, ich_apr)...
c32969d0362a790fbc6117e0b6a737a7e510b843
Analyze and fix the following issue in the Linux kernel code: sh: Do not use hyphen in exported variable name
Problem Details: arch/sh/Makefile defines and exports ld-bfd to be used by arch/sh/boot/compressed/Makefile and arch/sh/boot/romimage/Makefile. However some shells, including dash, will not pass through environment variables whose name includes a hyphen. Usually GNU make does not use a shell to recurse, but if e.g. $(...
```diff diff --git a/arch/sh/Makefile b/arch/sh/Makefile index cab2f9c011a8..7b420424b6d7 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile @@ -103,16 +103,16 @@ UTS_MACHINE := sh LDFLAGS_vmlinux += -e _stext ifdef CONFIG_CPU_LITTLE_ENDIAN -ld-bfd := elf32-sh-linux -LDFLAGS_vmlinux += --defsym jiffies=jiffi...
15a5ae3b0976d1190728044920cf6337a218ae62
Analyze and fix the following issue in the Linux kernel code: kconfig: gconf: Fix Back button behavior
Problem Details: Clicking the Back button may navigate to a non-menu hierarchy level. [Example] menu "menu1" config A bool "A" default y config B bool "B" depends on A default y menu "menu2" depends on B config C bool "C" de...
```diff diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c index c67b35807e8e..d9ea71664412 100644 --- a/scripts/kconfig/gconf.c +++ b/scripts/kconfig/gconf.c @@ -553,12 +553,8 @@ static void on_license1_activate(GtkMenuItem *menuitem, gpointer user_data) /* toolbar handlers */ static void on_back_clicked...
6d4d44254e43157bb760aa16367a394c2ab299b8
Analyze and fix the following issue in the Linux kernel code: kconfig: gconf: fix single view to display dependent symbols correctly
Problem Details: In the following example, the symbol C was never displayed in Single view. Fix the recursion logic so that all symbols are shown. menu "menu" config A bool "A" config B bool "B" depends on A config C bool "C" depends on B endmenu Signed-...
```diff diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c index 7725d2c9d92a..c67b35807e8e 100644 --- a/scripts/kconfig/gconf.c +++ b/scripts/kconfig/gconf.c @@ -914,9 +914,7 @@ static gboolean on_treeview1_button_press_event(GtkWidget *widget, static void _display_tree(GtkTreeStore *tree, struct menu *me...
a2a2a6fc2469524caa713036297c542746d148dc
Analyze and fix the following issue in the Linux kernel code: PCI: pnv_php: Fix surprise plug detection and recovery
Problem Details: The existing PowerNV hotplug code did not handle surprise plug events correctly, leading to a complete failure of the hotplug system after device removal and a required reboot to detect new devices. This comes down to two issues: 1) When a device is surprise removed, often the bridge upstream po...
```diff diff --git a/arch/powerpc/kernel/pci-hotplug.c b/arch/powerpc/kernel/pci-hotplug.c index 9ea74973d78d..6f444d0822d8 100644 --- a/arch/powerpc/kernel/pci-hotplug.c +++ b/arch/powerpc/kernel/pci-hotplug.c @@ -141,6 +141,9 @@ void pci_hp_add_devices(struct pci_bus *bus) struct pci_controller *phb; struct devic...
1010b4c012b0d78dfb9d3132b49aa2ef024a07a7
Analyze and fix the following issue in the Linux kernel code: powerpc/eeh: Make EEH driver device hotplug safe
Problem Details: Multiple race conditions existed between the PCIe hotplug driver and the EEH driver, leading to a variety of kernel oopses of the same general nature: <pcie device unplug> <eeh driver trigger> <hotplug removal trigger> <pcie tree reconfiguration> <eeh recovery next step> <oops in EEH driver bus iterat...
```diff diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c index 10ce6b3bd3b7..48ad0116f359 100644 --- a/arch/powerpc/kernel/eeh_driver.c +++ b/arch/powerpc/kernel/eeh_driver.c @@ -257,13 +257,12 @@ static void eeh_pe_report_edev(struct eeh_dev *edev, eeh_report_fn fn, struct pci_driver ...
4668619092554e1b95c9a5ac2941ca47ba6d548a
Analyze and fix the following issue in the Linux kernel code: PCI: pnv_php: Clean up allocated IRQs on unplug
Problem Details: When the root of a nested PCIe bridge configuration is unplugged, the pnv_php driver leaked the allocated IRQ resources for the child bridges' hotplug event notifications, resulting in a panic. Fix this by walking all child buses and deallocating all its IRQ resources before calling pci_hp_remove_devi...
```diff diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci/hotplug/pnv_php.c index 573a41869c15..1304329ca6f7 100644 --- a/drivers/pci/hotplug/pnv_php.c +++ b/drivers/pci/hotplug/pnv_php.c @@ -3,6 +3,7 @@ * PCI Hotplug Driver for PowerPC PowerNV platform. * * Copyright Gavin Shan, IBM Corporation 2016. + * ...
721bfe583c52ba1ea74b3736a31a9dcfe6dd6d95
Analyze and fix the following issue in the Linux kernel code: kconfig: qconf: fix ConfigList::updateListAllforAll()
Problem Details: ConfigList::updateListForAll() and ConfigList::updateListAllforAll() are identical. Commit f9b918fae678 ("kconfig: qconf: move ConfigView::updateList(All) to ConfigList class") was a misconversion. Fixes: f9b918fae678 ("kconfig: qconf: move ConfigView::updateList(All) to ConfigList class") Signed-off...
```diff diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index dc056b0a8fde..a7c98bbbd8ac 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -486,7 +486,7 @@ void ConfigList::updateListAllForAll() while (it.hasNext()) { ConfigList *list = it.next(); - list->updateList(); + ...
d6f0b652d9b54af5a9cf3e926ecfba81c28e1fc4
Analyze and fix the following issue in the Linux kernel code: kconfig: gconf: replace GdkColor with GdkRGBA
Problem Details: GdkColor is deprecated with GTK 3.14. [1] Use GdkRGBA instead. This fixes warnings such as: scripts/kconfig/gconf.c: In function ‘set_node’: scripts/kconfig/gconf.c:138:9: warning: ‘gdk_color_parse’ is deprecated: Use 'gdk_rgba_parse' instead [-Wdeprecated-declarations] 138 | gdk_color_par...
```diff diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c index 313250d4fc53..f4c2b07e0207 100644 --- a/scripts/kconfig/gconf.c +++ b/scripts/kconfig/gconf.c @@ -176,7 +176,7 @@ static void set_node(GtkTreeStore *tree, GtkTreeIter *node, struct menu *menu) const gchar *_mod = ""; const gchar *_yes = ""...
0c82f50a06aa13e6fc29e17081094489d57745fd
Analyze and fix the following issue in the Linux kernel code: kconfig: gconf: fix behavior of a menu under a symbol in split view
Problem Details: A menu can be created under a symbol. [Example] menu "outer menu" config A bool "A" menu "inner menu" depends on A config B bool "B" endmenu endmenu After being re-parented by menu_finalize(), the menu tree is structured like follows: menu "outer men...
```diff diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c index 28c4b5b37448..7397a51641a7 100644 --- a/scripts/kconfig/gconf.c +++ b/scripts/kconfig/gconf.c @@ -803,7 +803,7 @@ static gboolean on_treeview2_button_press_event(GtkWidget *widget, enum prop_type ptype; ptype = menu->prompt ? menu->promp...
f468992936894c9ce3b1659cf38c230d33b77a16
Analyze and fix the following issue in the Linux kernel code: kconfig: nconf: Ensure null termination where strncpy is used
Problem Details: strncpy() does not guarantee null-termination if the source string is longer than the destination buffer. Ensure the buffer is explicitly null-terminated to prevent potential string overflows or undefined behavior. Signed-off-by: Shankari Anand <shankari.ak0208@gmail.com> Signed-off-by: Masahiro Yama...
```diff diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c index c0b2dabf6c89..ae1fe5f60327 100644 --- a/scripts/kconfig/nconf.c +++ b/scripts/kconfig/nconf.c @@ -593,6 +593,8 @@ static void item_add_str(const char *fmt, ...) tmp_str, sizeof(k_menu_items[index].str)); + k_menu_items[index].str[sizeo...
4a5dcb337395db24976090e84f52d48e597697f9
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Fix test dynptr/test_dynptr_memset_xdp_chunks failure
Problem Details: For arm64 64K page size, the xdp data size was set to be more than 64K in one of previous patches. This will cause failure for bpf_dynptr_memset(). Since the failure of bpf_dynptr_memset() is expected with 64K page size, return success. Signed-off-by: Yonghong Song <yonghong.song@linux.dev> Signed-off...
```diff diff --git a/tools/testing/selftests/bpf/progs/dynptr_success.c b/tools/testing/selftests/bpf/progs/dynptr_success.c index 3094a1e4ee91..8315273cb900 100644 --- a/tools/testing/selftests/bpf/progs/dynptr_success.c +++ b/tools/testing/selftests/bpf/progs/dynptr_success.c @@ -9,6 +9,8 @@ #include "bpf_misc.h" #...
90f791a975af80964b1ae6a370598c5bb8f565a3
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Fix test dynptr/test_dynptr_copy_xdp failure
Problem Details: For arm64 64K page size, the bpf_dynptr_copy() in test dynptr/test_dynptr_copy_xdp will succeed, but the test will failure with 4K page size. This patch made a change so the test will fail expectedly for both 4K and 64K page sizes. Signed-off-by: Yonghong Song <yonghong.song@linux.dev> Signed-off-by: ...
```diff diff --git a/tools/testing/selftests/bpf/progs/dynptr_success.c b/tools/testing/selftests/bpf/progs/dynptr_success.c index 7d7081d05d47..3094a1e4ee91 100644 --- a/tools/testing/selftests/bpf/progs/dynptr_success.c +++ b/tools/testing/selftests/bpf/progs/dynptr_success.c @@ -611,11 +611,12 @@ int test_dynptr_cop...
84c47bfc5b3b40b50b798b6b6c15e8a1442d936d
Analyze and fix the following issue in the Linux kernel code: net: dsa: microchip: Add KSZ8463 switch support to KSZ DSA driver
Problem Details: KSZ8463 switch is a 3-port switch based from KSZ8863. Its major difference from other KSZ SPI switches is its register access is not a simple continual 8-bit transfer with automatic address increase but uses a byte-enable mechanism specifying 8-bit, 16-bit, or 32-bit access. Its registers are also de...
```diff diff --git a/drivers/net/dsa/microchip/ksz8.c b/drivers/net/dsa/microchip/ksz8.c index be433b4e2b1c..3761a81a7320 100644 --- a/drivers/net/dsa/microchip/ksz8.c +++ b/drivers/net/dsa/microchip/ksz8.c @@ -3,6 +3,7 @@ * Microchip KSZ8XXX series switch driver * * It supports the following switches: + * - KSZ8...
bf3c032bfe16489abe38986e2c05fb5f9073319f
Analyze and fix the following issue in the Linux kernel code: net/sched: Add precise drop reason for pfifo_fast queue overflows
Problem Details: Currently, packets dropped by pfifo_fast due to queue overflow are marked with a generic SKB_DROP_REASON_QDISC_DROP in __dev_xmit_skb(). This patch adds explicit drop reason SKB_DROP_REASON_QDISC_OVERLIMIT for queue-full cases, providing better distinction from other qdisc drops. Signed-off-by: Fan Y...
```diff diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 16afb834fe4a..1e008a228ebd 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c @@ -740,6 +740,8 @@ static int pfifo_fast_enqueue(struct sk_buff *skb, struct Qdisc *qdisc, err = skb_array_produce(q, skb); if (unlikely(err))...
736a0516a16268995f4898eded49bfef077af709
Analyze and fix the following issue in the Linux kernel code: hfs: fix general protection fault in hfs_find_init()
Problem Details: The hfs_find_init() method can trigger the crash if tree pointer is NULL: [ 45.746290][ T9787] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000008: 0000 [#1] SMP KAI [ 45.747287][ T9787] KASAN: null-ptr-deref in range [0x0000000000000040-0x0000000000000047] [ 45...
```diff diff --git a/fs/hfs/bfind.c b/fs/hfs/bfind.c index ef9498a6e88a..34e9804e0f36 100644 --- a/fs/hfs/bfind.c +++ b/fs/hfs/bfind.c @@ -16,6 +16,9 @@ int hfs_find_init(struct hfs_btree *tree, struct hfs_find_data *fd) { void *ptr; + if (!tree || !fd) + return -EINVAL; + fd->tree = tree; fd->bnode = NULL; ...
a431930c9bac518bf99d6b1da526a7f37ddee8d8
Analyze and fix the following issue in the Linux kernel code: hfs: fix slab-out-of-bounds in hfs_bnode_read()
Problem Details: This patch introduces is_bnode_offset_valid() method that checks the requested offset value. Also, it introduces check_and_correct_requested_length() method that checks and correct the requested length (if it is necessary). These methods are used in hfs_bnode_read(), hfs_bnode_write(), hfs_bnode_clear(...
```diff diff --git a/fs/hfs/bnode.c b/fs/hfs/bnode.c index 50ed4c855364..e8cd1a31f247 100644 --- a/fs/hfs/bnode.c +++ b/fs/hfs/bnode.c @@ -15,6 +15,48 @@ #include "btree.h" +static inline +bool is_bnode_offset_valid(struct hfs_bnode *node, int off) +{ + bool is_valid = off < node->tree->node_size; + + if (!is_vali...
c80aa2aaaa5e69d5219c6af8ef7e754114bd08d2
Analyze and fix the following issue in the Linux kernel code: hfsplus: fix slab-out-of-bounds in hfsplus_bnode_read()
Problem Details: The hfsplus_bnode_read() method can trigger the issue: [ 174.852007][ T9784] ================================================================== [ 174.852709][ T9784] BUG: KASAN: slab-out-of-bounds in hfsplus_bnode_read+0x2f4/0x360 [ 174.853412][ T9784] Read of size 8 at addr ffff88810b5fc6c0 by tas...
```diff diff --git a/fs/hfsplus/bnode.c b/fs/hfsplus/bnode.c index 079ea80534f7..14f4995588ff 100644 --- a/fs/hfsplus/bnode.c +++ b/fs/hfsplus/bnode.c @@ -18,12 +18,68 @@ #include "hfsplus_fs.h" #include "hfsplus_raw.h" +static inline +bool is_bnode_offset_valid(struct hfs_bnode *node, int off) +{ + bool is_valid =...
94458781aee6045bd3d0ad4b80b02886b9e2219b
Analyze and fix the following issue in the Linux kernel code: hfsplus: fix slab-out-of-bounds read in hfsplus_uni2asc()
Problem Details: The hfsplus_readdir() method is capable to crash by calling hfsplus_uni2asc(): [ 667.121659][ T9805] ================================================================== [ 667.122651][ T9805] BUG: KASAN: slab-out-of-bounds in hfsplus_uni2asc+0x902/0xa10 [ 667.123627][ T9805] Read of size 2 at addr ff...
```diff diff --git a/fs/hfsplus/unicode.c b/fs/hfsplus/unicode.c index 73342c925a4b..36b6cf2a3abb 100644 --- a/fs/hfsplus/unicode.c +++ b/fs/hfsplus/unicode.c @@ -132,7 +132,14 @@ int hfsplus_uni2asc(struct super_block *sb, op = astr; ip = ustr->unicode; + ustrlen = be16_to_cpu(ustr->length); + if (ustrlen > HF...
c7c6363ca186747ebc2df10c8a1a51e66e0e32d9
Analyze and fix the following issue in the Linux kernel code: hfsplus: don't use BUG_ON() in hfsplus_create_attributes_file()
Problem Details: When the volume header contains erroneous values that do not reflect the actual state of the filesystem, hfsplus_fill_super() assumes that the attributes file is not yet created, which later results in hitting BUG_ON() when hfsplus_create_attributes_file() is called. Replace this BUG_ON() with -EIO err...
```diff diff --git a/fs/hfsplus/xattr.c b/fs/hfsplus/xattr.c index 9a1a93e3888b..18dc3d254d21 100644 --- a/fs/hfsplus/xattr.c +++ b/fs/hfsplus/xattr.c @@ -172,7 +172,11 @@ check_attr_tree_state_again: return PTR_ERR(attr_file); } - BUG_ON(i_size_read(attr_file) != 0); + if (i_size_read(attr_file) != 0) { + err ...
1ffcf8b8ae8a786b61350ee082b6c82846a31e53
Analyze and fix the following issue in the Linux kernel code: drm/xe: Support for mmap-ing mmio regions
Problem Details: Allow the driver to expose hardware register spaces to userspace through GEM objects with fake mmap offsets. This can be useful for userspace-firmware communication, debugging, etc. v2: Minor doc fix (CI) v3: Enforce MAP_SHARED (Tejas) Add fault handler with dummy page (Tejas, Matt Auld) Store...
```diff diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile index 7eaf4054c99e..42c6ca5b3f76 100644 --- a/drivers/gpu/drm/xe/Makefile +++ b/drivers/gpu/drm/xe/Makefile @@ -87,6 +87,7 @@ xe-y += xe_bb.o \ xe_lrc.o \ xe_migrate.o \ xe_mmio.o \ + xe_mmio_gem.o \ xe_mocs.o \ xe_module.o \ xe_...
89f686a0fb6e473a876a9a60a13aec67a62b9a7e
Analyze and fix the following issue in the Linux kernel code: parisc: Revise __get_user() to probe user read access
Problem Details: Because of the way read access support is implemented, read access interruptions are only triggered at privilege levels 2 and 3. The kernel executes at privilege level 0, so __get_user() never triggers a read access interruption (code 26). Thus, it is currently possible for user code to access a read p...
```diff diff --git a/arch/parisc/include/asm/uaccess.h b/arch/parisc/include/asm/uaccess.h index 88d0ae5769dd..6c531d2c847e 100644 --- a/arch/parisc/include/asm/uaccess.h +++ b/arch/parisc/include/asm/uaccess.h @@ -42,9 +42,24 @@ __gu_err; \ }) -#define __get_user(val, ptr) \ -({ \ - __get_user_intern...
f6334f4ae9a4e962ba74b026e1d965dfdf8cbef8
Analyze and fix the following issue in the Linux kernel code: parisc: Revise gateway LWS calls to probe user read access
Problem Details: We use load and stbys,e instructions to trigger memory reference interruptions without writing to memory. Because of the way read access support is implemented, read access interruptions are only triggered at privilege levels 2 and 3. The kernel and gateway page execute at privilege level 0, so this co...
```diff diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S index 0fa81bf1466b..f58c4bccfbce 100644 --- a/arch/parisc/kernel/syscall.S +++ b/arch/parisc/kernel/syscall.S @@ -613,6 +613,9 @@ lws_compare_and_swap32: lws_compare_and_swap: /* Trigger memory reference interruptions without writing to...
963f1b20a8d2a098954606b9725cd54336a2a86c
Analyze and fix the following issue in the Linux kernel code: parisc: Makefile: fix a typo in palo.conf
Problem Details: Correct "objree" to "objtree". "objree" is not defined. Fixes: 75dd47472b92 ("kbuild: remove src and obj from the top Makefile") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com> Cc: Helge D...
```diff diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile index 21b8166a6883..9cd9aa3d16f2 100644 --- a/arch/parisc/Makefile +++ b/arch/parisc/Makefile @@ -139,7 +139,7 @@ palo lifimage: vmlinuz fi @if test ! -f "$(PALOCONF)"; then \ cp $(srctree)/arch/parisc/defpalo.conf $(objtree)/palo.conf; \ - echo '...
8d933d5c89e80a818019fa5e0c060387bd145216
Analyze and fix the following issue in the Linux kernel code: rtla/timerlat: Add continue action
Problem Details: Introduce option to resume tracing after a latency threshold overflow. The option is implemented as an action named "continue". Example: $ rtla timerlat top -q -T 200 -d 1s --on-threshold \ exec,command="echo Threshold" --on-threshold continue Threshold Threshold Threshold ...
```diff diff --git a/tools/tracing/rtla/src/actions.c b/tools/tracing/rtla/src/actions.c index 63bee5bdabfd..aaf0808125d7 100644 --- a/tools/tracing/rtla/src/actions.c +++ b/tools/tracing/rtla/src/actions.c @@ -17,6 +17,7 @@ actions_init(struct actions *self) self->size = action_default_size; self->list = calloc(se...
49db61c27c4bbd24364086dc0892bd3e14c1502e
Analyze and fix the following issue in the Linux kernel code: net: phy: micrel: fix KSZ8081/KSZ8091 cable test
Problem Details: Commit 21b688dabecb ("net: phy: micrel: Cable Diag feature for lan8814 phy") introduced cable_test support for the LAN8814 that reuses parts of the KSZ886x logic and introduced the cable_diag_reg and pair_mask parameters to account for differences between those chips. However, it did not update the ks...
```diff diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index 64aa03aed770..50c6a4e8cfa1 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -472,6 +472,8 @@ static const struct kszphy_type ksz8051_type = { static const struct kszphy_type ksz8081_type = { .led_mode_reg = MII_K...
1bbb76a899486827394530916f01214d049931b3
Analyze and fix the following issue in the Linux kernel code: neighbour: Fix null-ptr-deref in neigh_flush_dev().
Problem Details: kernel test robot reported null-ptr-deref in neigh_flush_dev(). [0] The cited commit introduced per-netdev neighbour list and converted neigh_flush_dev() to use it instead of the global hash table. One thing we missed is that neigh_table_clear() calls neigh_ifdown() with NULL dev. Let's restore the ...
```diff diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 49dce9a82295..a8dc72eda202 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -368,6 +368,43 @@ static void pneigh_queue_purge(struct sk_buff_head *list, struct net *net, } } +static void neigh_flush_one(struct neighbour *n) +{ + h...
165a7f5db919ab68a45ae755cceb751e067273ef
Analyze and fix the following issue in the Linux kernel code: net: dsa: microchip: Fix wrong rx drop MIB counter for KSZ8863
Problem Details: When KSZ8863 support was first added to KSZ driver the RX drop MIB counter was somehow defined as 0x105. The TX drop MIB counter starts at 0x100 for port 1, 0x101 for port 2, and 0x102 for port 3, so the RX drop MIB counter should start at 0x103 for port 1, 0x104 for port 2, and 0x105 for port 3. The...
```diff diff --git a/drivers/net/dsa/microchip/ksz8.c b/drivers/net/dsa/microchip/ksz8.c index be433b4e2b1c..8f55be89f8bf 100644 --- a/drivers/net/dsa/microchip/ksz8.c +++ b/drivers/net/dsa/microchip/ksz8.c @@ -371,6 +371,9 @@ static void ksz8863_r_mib_pkt(struct ksz_device *dev, int port, u16 addr, addr -= dev->info...
9312ee76490df61491fee19b5ce71f71b6de908c
Analyze and fix the following issue in the Linux kernel code: octeontx2-af: use unsigned int as iterator for unsigned values
Problem Details: The local variable i is used to iterate over unsigned values. The lower bound of the loop is set to 0. While the upper bound is cgx->lmac_count, where they lmac_count is an u8. So the theoretical upper bound is 255. As is, GCC can't see this range of values and warns that a formatted string, which inc...
```diff diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c index ab5838865c3f..4ff19a04b23e 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c @@ -1706,9 +1706,9 @@ static int cgx_lmac_init(struct...
0349659fd72f662c054ff20d432559bfaa228ce4
Analyze and fix the following issue in the Linux kernel code: macsec: set IFF_UNICAST_FLT priv flag
Problem Details: Cosmin reports the following locking issue: # BUG: sleeping function called from invalid context at kernel/locking/mutex.c:275 # dump_stack_lvl+0x4f/0x60 # __might_resched+0xeb/0x140 # mutex_lock+0x1a/0x40 # dev_set_promiscuity+0x26/0x90 # __dev_set_promiscuity+0x85/0x170 # ...
```diff diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c index 7edbe76b5455..4c75d1fea552 100644 --- a/drivers/net/macsec.c +++ b/drivers/net/macsec.c @@ -3868,7 +3868,7 @@ static void macsec_setup(struct net_device *dev) ether_setup(dev); dev->min_mtu = 0; dev->max_mtu = ETH_MAX_MTU; - dev->priv_flags |=...
0d9cfc9b8cb17dbc29a98792d36ec39a1cf1395f
Analyze and fix the following issue in the Linux kernel code: net: usbnet: Avoid potential RCU stall on LINK_CHANGE event
Problem Details: The Gemalto Cinterion PLS83-W modem (cdc_ether) is emitting confusing link up and down events when the WWAN interface is activated on the modem-side. Interrupt URBs will in consecutive polls grab: * Link Connected * Link Disconnected * Link Connected Where the last Connected is then a stable link sta...
```diff diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index c04e715a4c2a..bc1d8631ffe0 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -1122,6 +1122,9 @@ static void __handle_link_change(struct usbnet *dev) * tx queue is stopped by netcore after link becomes off */ }...
e80d65561571db5024fbdd5ec3f5472cfc485d21
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Fix potential deadlock by deferring RX timeout recovery
Problem Details: mlx5e_reporter_rx_timeout() is currently invoked synchronously in the driver's open error flow. This causes the thread holding priv->state_lock to attempt acquiring the devlink lock, which can result in a circular dependency with other devlink operations. For example: - Devlink health diagnose flow: ...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h index 5b0d03b3efe8..48bcd6813aff 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h @@ -728,6 +728,7 @@ struct mlx5e_rq { struct xsk_buff_pool *xs...
6d19c44b5c6dd72f9a357d0399604ec16a77de3c
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Remove skb secpath if xfrm state is not found
Problem Details: Hardware returns a unique identifier for a decrypted packet's xfrm state, this state is looked up in an xarray. However, the state might have been freed by the time of this lookup. Currently, if the state is not found, only a counter is incremented. The secpath (sp) extension on the skb is not removed...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c index 727fa7c18523..6056106edcc6 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx...
fd4b97246a23c1149479b88490946bcfbd28de63
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Clear Read-Only port buffer size in PBMC before update
Problem Details: When updating the PBMC register, we read its current value, modify desired fields, then write it back. The port_buffer_size field within PBMC is Read-Only (RO). If this RO field contains a non-zero value when read, attempting to write it back will cause the entire PBMC register update to fail. This c...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.c b/drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.c index 8e25f4ef5ccc..5ae787656a7c 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.c @@ -331,6 +331,9 ...
2d442a0c781403702de27ccfbc4bb233721585f5
Analyze and fix the following issue in the Linux kernel code: spi: SPISG: Fix less than zero comparison on a u32 variable
Problem Details: The check for ns < 0 is always false because variable ns is a u32 which is not a signed type. Fix this by making ns a s32 type. Fixes: cef9991e04ae ("spi: Add Amlogic SPISG driver") Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://patch.msgid.link/20250725171701.839927-1-colin.i.ki...
```diff diff --git a/drivers/spi/spi-amlogic-spisg.c b/drivers/spi/spi-amlogic-spisg.c index 48a5325b4db7..2ab8bdf2a676 100644 --- a/drivers/spi/spi-amlogic-spisg.c +++ b/drivers/spi/spi-amlogic-spisg.c @@ -163,7 +163,7 @@ struct spisg_device { static int spi_delay_to_sclk(u32 slck_speed_hz, struct spi_delay *delay)...
8b4a1a46e84a17f5d6fde5c506cc6bb141a24772
Analyze and fix the following issue in the Linux kernel code: selftests: netfilter: ipvs.sh: Explicity disable rp_filter on interface tunl0
Problem Details: Although setup_ns() set net.ipv4.conf.default.rp_filter=0, loading certain module such as ipip will automatically create a tunl0 interface in all netns including new created ones. In the script, this is before than default.rp_filter=0 applied, as a result tunl0.rp_filter remains set to 1 which causes t...
```diff diff --git a/tools/testing/selftests/net/netfilter/ipvs.sh b/tools/testing/selftests/net/netfilter/ipvs.sh index 6af2ea3ad6b8..9c9d5b38ab71 100755 --- a/tools/testing/selftests/net/netfilter/ipvs.sh +++ b/tools/testing/selftests/net/netfilter/ipvs.sh @@ -151,7 +151,7 @@ test_nat() { test_tun() { ip netns exe...
8d1c91850d064944ab214b2fbfffb7fc08a11d65
Analyze and fix the following issue in the Linux kernel code: selftests: netfilter: Ignore tainted kernels in interface stress test
Problem Details: Complain about kernel taint value only if it wasn't set at start already. Fixes: 73db1b5dab6f ("selftests: netfilter: Torture nftables netdev hooks") Signed-off-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
```diff diff --git a/tools/testing/selftests/net/netfilter/nft_interface_stress.sh b/tools/testing/selftests/net/netfilter/nft_interface_stress.sh index 5ff7be9daeee..c0fffaa6dbd9 100755 --- a/tools/testing/selftests/net/netfilter/nft_interface_stress.sh +++ b/tools/testing/selftests/net/netfilter/nft_interface_stress....
bf58e667af7d96c8eb9411f926a0a0955f41ce21
Analyze and fix the following issue in the Linux kernel code: netfilter: xt_nfacct: don't assume acct name is null-terminated
Problem Details: BUG: KASAN: slab-out-of-bounds in .. lib/vsprintf.c:721 Read of size 1 at addr ffff88801eac95c8 by task syz-executor183/5851 [..] string+0x231/0x2b0 lib/vsprintf.c:721 vsnprintf+0x739/0xf00 lib/vsprintf.c:2874 [..] nfacct_mt_checkentry+0xd2/0xe0 net/netfilter/xt_nfacct.c:41 xt_check_match+0x3d1/0x...
```diff diff --git a/net/netfilter/xt_nfacct.c b/net/netfilter/xt_nfacct.c index 7c6bf1c16813..0ca1cdfc4095 100644 --- a/net/netfilter/xt_nfacct.c +++ b/net/netfilter/xt_nfacct.c @@ -38,8 +38,8 @@ nfacct_mt_checkentry(const struct xt_mtchk_param *par) nfacct = nfnl_acct_find_get(par->net, info->name); if (nfacct ...
bfabc4f70ee72809f1de662e971ac55648981a31
Analyze and fix the following issue in the Linux kernel code: ipvs: Rename del_timer in comment in ip_vs_conn_expire_now()
Problem Details: Commit 8fa7292fee5c ("treewide: Switch/rename to timer_delete[_sync]()") switched del_timer to timer_delete, but did not modify the comment for ip_vs_conn_expire_now(). Now fix it. Signed-off-by: WangYuli <wangyuli@uniontech.com> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Pablo Neira Ayuso ...
```diff diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c index 44b2ad695c15..965f3c8e5089 100644 --- a/net/netfilter/ipvs/ip_vs_conn.c +++ b/net/netfilter/ipvs/ip_vs_conn.c @@ -926,7 +926,7 @@ static void ip_vs_conn_expire(struct timer_list *t) void ip_vs_conn_expire_now(struct ip_vs_conn...
a7352c849492a30b5d8491fcb9314ab376a3942f
Analyze and fix the following issue in the Linux kernel code: dt-bindings: npu: rockchip,rknn: Add bindings
Problem Details: Add the bindings for the Neural Processing Unit IP from Rockchip. v2: - Adapt to new node structure (one node per core, each with its own IOMMU) - Several misc. fixes from Sebastian Reichel v3: - Split register block in its constituent subblocks, and only require the ones that the kernel would ev...
```diff diff --git a/Documentation/devicetree/bindings/npu/rockchip,rk3588-rknn-core.yaml b/Documentation/devicetree/bindings/npu/rockchip,rk3588-rknn-core.yaml new file mode 100644 index 000000000000..caca2a4903cd --- /dev/null +++ b/Documentation/devicetree/bindings/npu/rockchip,rk3588-rknn-core.yaml @@ -0,0 +1,112 @...
525ad89dd90434d529b76a87b1c653a69fedc416
Analyze and fix the following issue in the Linux kernel code: accel/rocket: Add IOCTLs for synchronizing memory accesses
Problem Details: The NPU cores have their own access to the memory bus, and this isn't cache coherent with the CPUs. Add IOCTLs so userspace can mark when the caches need to be flushed, and also when a writer job needs to be waited for before the buffer can be accessed from the CPU. Initially based on the same IOCTLs...
```diff diff --git a/drivers/accel/rocket/rocket_drv.c b/drivers/accel/rocket/rocket_drv.c index a21aa9aa189b..5c0b63f0a8f0 100644 --- a/drivers/accel/rocket/rocket_drv.c +++ b/drivers/accel/rocket/rocket_drv.c @@ -134,6 +134,8 @@ static const struct drm_ioctl_desc rocket_drm_driver_ioctls[] = { ROCKET_IOCTL(CREATE...
0810d5ad88a18f1e6d549853a388ad0316f74e36
Analyze and fix the following issue in the Linux kernel code: accel/rocket: Add job submission IOCTL
Problem Details: Using the DRM GPU scheduler infrastructure, with a scheduler for each core. Userspace can decide for a series of tasks to be executed sequentially in the same core, so SRAM locality can be taken advantage of. The job submission code was initially based on Panfrost. v2: - Remove hardcoded number of c...
```diff diff --git a/drivers/accel/rocket/Makefile b/drivers/accel/rocket/Makefile index 4deef267f9e1..3713dfe223d6 100644 --- a/drivers/accel/rocket/Makefile +++ b/drivers/accel/rocket/Makefile @@ -6,4 +6,5 @@ rocket-y := \ rocket_core.o \ rocket_device.o \ rocket_drv.o \ - rocket_gem.o + rocket_gem.o \ + rocket...
280eba332b3623f7a716de8b244c54c66fbb97f0
Analyze and fix the following issue in the Linux kernel code: can: kvaser_usb: Store the different firmware version components in a struct
Problem Details: Store firmware version in kvaser_usb_fw_version struct, specifying the different components of the version number. And drop debug prinout of firmware version, since later patches will expose it via the devlink interface. Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Signed-off-by: Jimmy As...
```diff diff --git a/drivers/net/can/usb/kvaser_usb/kvaser_usb.h b/drivers/net/can/usb/kvaser_usb/kvaser_usb.h index fba972e7220d..a36d86494113 100644 --- a/drivers/net/can/usb/kvaser_usb/kvaser_usb.h +++ b/drivers/net/can/usb/kvaser_usb/kvaser_usb.h @@ -47,6 +47,10 @@ #define KVASER_USB_CAP_EXT_CAP 0x02 #define KV...
c151b06a087a61c7a1790b75ee2f1d6edb6a8a45
Analyze and fix the following issue in the Linux kernel code: can: kvaser_usb: Assign netdev.dev_port based on device channel index
Problem Details: Assign netdev.dev_port based on the device channel index, to indicate the port number of the network device. While this driver already uses netdev.dev_id for that purpose, dev_port is more appropriate. However, retain dev_id to avoid potential regressions. Fixes: 3e66d0138c05 ("can: populate netdev::d...
```diff diff --git a/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c b/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c index c74875f978c4..7be8604bf760 100644 --- a/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c +++ b/drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c @@ -878,6 +878,7 @@ static int kvaser_usb_init_on...
ed98261b41687323ffa02ca20fef1e60b38fd1aa
Analyze and fix the following issue in the Linux kernel code: accel/rocket: Add a new driver for Rockchip's NPU
Problem Details: This initial version supports the NPU as shipped in the RK3588 SoC and described in the first part of its TRM, in Chapter 36. This NPU contains 3 independent cores that the driver can submit jobs to. This commit adds just hardware initialization and power management. v2: - Split cores and IOMMUs as ...
```diff diff --git a/Documentation/accel/index.rst b/Documentation/accel/index.rst index bc85f26533d8..d8fa332d60a8 100644 --- a/Documentation/accel/index.rst +++ b/Documentation/accel/index.rst @@ -10,6 +10,7 @@ Compute Accelerators introduction amdxdna/index qaic/index + rocket/index .. only:: subpr...
0d1b337b6d6c515555d6abba546e39138f36b111
Analyze and fix the following issue in the Linux kernel code: can: kvaser_pciefd: Add devlink support
Problem Details: Add devlink support at device level. Example output: $ devlink dev pci/0000:07:00.0 pci/0000:08:00.0 pci/0000:09:00.0 $ devlink dev info pci/0000:07:00.0: driver kvaser_pciefd pci/0000:08:00.0: driver kvaser_pciefd pci/0000:09:00.0: driver kvaser_pciefd Reviewed-by: Vince...
```diff diff --git a/drivers/net/can/Kconfig b/drivers/net/can/Kconfig index d58fab0161b3..d43d56694667 100644 --- a/drivers/net/can/Kconfig +++ b/drivers/net/can/Kconfig @@ -154,6 +154,7 @@ config CAN_JANZ_ICAN3 config CAN_KVASER_PCIEFD depends on PCI tristate "Kvaser PCIe FD cards" + select NET_DEVLINK help ...
d54b16b40ddadb7d0a77fff48af7b319a0cd6aae
Analyze and fix the following issue in the Linux kernel code: can: kvaser_pciefd: Store device channel index
Problem Details: Store device channel index in netdev.dev_port. Fixes: 26ad340e582d ("can: kvaser_pciefd: Add driver for Kvaser PCIEcan devices") Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Signed-off-by: Jimmy Assarsson <extja@kvaser.com> Link: https://patch.msgid.link/20250725123230.8-6-extja@kvaser.co...
```diff diff --git a/drivers/net/can/kvaser_pciefd.c b/drivers/net/can/kvaser_pciefd.c index 7153b9ea0d3d..8dcb1d1c67e4 100644 --- a/drivers/net/can/kvaser_pciefd.c +++ b/drivers/net/can/kvaser_pciefd.c @@ -1028,6 +1028,7 @@ static int kvaser_pciefd_setup_can_ctrls(struct kvaser_pciefd *pcie) can->completed_tx_bytes...
5131f18ffa97b50953ab38f464fdaa179e4bcdf7
Analyze and fix the following issue in the Linux kernel code: can: kvaser_pciefd: Store the different firmware version components in a struct
Problem Details: Store firmware version in kvaser_pciefd_fw_version struct, specifying the different components of the version number. And drop debug prinout of firmware version, since later patches will expose it via the devlink interface. Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Signed-off-by: Jimmy...
```diff diff --git a/drivers/net/can/kvaser_pciefd.c b/drivers/net/can/kvaser_pciefd.c index 4bdb1132ecf9..7153b9ea0d3d 100644 --- a/drivers/net/can/kvaser_pciefd.c +++ b/drivers/net/can/kvaser_pciefd.c @@ -325,6 +325,12 @@ struct kvaser_pciefd_driver_data { const struct kvaser_pciefd_dev_ops *ops; }; +struct kvas...
c143db7dba1d3a4edce36c89c50e54dd856d7c41
Analyze and fix the following issue in the Linux kernel code: drm/i915/dp: Fix disabling training pattern at end of UHBR link training
Problem Details: The Fixed: commit below overlooked the fact that intel_dp_link_train_all_phys() is only used for non-UHBR link rates, but intel_dp_stop_link_train() is used for both non-UHBR and UHBR link rates. Hence, after removing the disabling of the training pattern from intel_dp_stop_link_train(), the commit mis...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.c b/drivers/gpu/drm/i915/display/intel_dp_link_training.c index 344b74109a83..9d14b4e59545 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c +++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c @@ -1609,6 +1609,8 @@ out: ...
53e7e1fb81cc8ba2da1cb31f8917ef397caafe91
Analyze and fix the following issue in the Linux kernel code: ARM: 9450/1: Fix allowing linker DCE with binutils < 2.36
Problem Details: Commit e7607f7d6d81 ("ARM: 9443/1: Require linker to support KEEP within OVERLAY for DCE") accidentally broke the binutils version restriction that was added in commit 0d437918fb64 ("ARM: 9414/1: Fix build issue with LD_DEAD_CODE_DATA_ELIMINATION"), reintroducing the segmentation fault addressed by tha...
```diff diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 3072731fe09c..962451e54fdd 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -121,7 +121,7 @@ config ARM select HAVE_KERNEL_XZ select HAVE_KPROBES if !XIP_KERNEL && !CPU_ENDIAN_BE32 && !CPU_V7M select HAVE_KRETPROBES if HAVE_KPROBES - select HAV...
87c4e1459e80bf65066f864c762ef4dc932fad4b
Analyze and fix the following issue in the Linux kernel code: ARM: 9448/1: Use an absolute path to unified.h in KBUILD_AFLAGS
Problem Details: After commit d5c8d6e0fa61 ("kbuild: Update assembler calls to use proper flags and language target"), which updated as-instr to use the 'assembler-with-cpp' language option, the Kbuild version of as-instr always fails internally for arch/arm with <command-line>: fatal error: asm/unified.h: No such f...
```diff diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 4808d3ed98e4..e31e95ffd33f 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -149,7 +149,7 @@ endif # Need -Uarm for gcc < 3.x KBUILD_CPPFLAGS +=$(cpp-y) KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-l...
099b847ccc6c1ad2f805d13cfbcc83f5b6d4bc42
Analyze and fix the following issue in the Linux kernel code: ext4: do not BUG when INLINE_DATA_FL lacks system.data xattr
Problem Details: A syzbot fuzzed image triggered a BUG_ON in ext4_update_inline_data() when an inode had the INLINE_DATA_FL flag set but was missing the system.data extended attribute. Since this can happen due to a maiciouly fuzzed file system, we shouldn't BUG, but rather, report it as a corrupted file system. Add ...
```diff diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c index 640133adef38..1b094a4f3866 100644 --- a/fs/ext4/inline.c +++ b/fs/ext4/inline.c @@ -303,7 +303,11 @@ static int ext4_create_inline_data(handle_t *handle, if (error) goto out; - BUG_ON(!is.s.not_found); + if (!is.s.not_found) { + EXT4_ERROR_INODE(ino...
f7eaacbb4e54f8a6c6674c16eff54f703ea63d5e
Analyze and fix the following issue in the Linux kernel code: ext4: convert free groups order lists to xarrays
Problem Details: While traversing the list, holding a spin_lock prevents load_buddy, making direct use of ext4_try_lock_group impossible. This can lead to a bouncing scenario where spin_is_locked(grp_A) succeeds, but ext4_try_lock_group() fails, forcing the list traversal to repeatedly restart from grp_A. In contrast,...
```diff diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 21507f399942..c5e5efa374ff 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -1608,10 +1608,8 @@ struct ext4_sb_info { struct list_head s_discard_list; struct work_struct s_discard_work; atomic_t s_retry_alloc_pending; - struct list_head *s_mb_avg_fragm...
7d345aa1fac4c2ec9584fbd6f389f2c2368671d5
Analyze and fix the following issue in the Linux kernel code: ext4: fix largest free orders lists corruption on mb_optimize_scan switch
Problem Details: The grp->bb_largest_free_order is updated regardless of whether mb_optimize_scan is enabled. This can lead to inconsistencies between grp->bb_largest_free_order and the actual s_mb_largest_free_orders list index when mb_optimize_scan is repeatedly enabled and disabled via remount. For example, if mb_o...
```diff diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 72b20fc52bbf..fada0d1b3fdb 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -1152,33 +1152,28 @@ static void mb_set_largest_free_order(struct super_block *sb, struct ext4_group_info *grp) { struct ext4_sb_info *sbi = EXT4_SB(sb); - int i; + i...
1c320d8e92925bb7615f83a7b6e3f402a5c2ca63
Analyze and fix the following issue in the Linux kernel code: ext4: fix zombie groups in average fragment size lists
Problem Details: Groups with no free blocks shouldn't be in any average fragment size list. However, when all blocks in a group are allocated(i.e., bb_fragments or bb_free is 0), we currently skip updating the average fragment size, which means the group isn't removed from its previous s_mb_avg_fragment_size[old] list....
```diff diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 6d98f2a5afc4..72b20fc52bbf 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -841,30 +841,30 @@ static void mb_update_avg_fragment_size(struct super_block *sb, struct ext4_group_info *grp) { struct ext4_sb_info *sbi = EXT4_SB(sb); - int new_or...
9a0ed1698191a143588a9bfb46ed76a4ee094931
Analyze and fix the following issue in the Linux kernel code: ext4: fix typo in CR_GOAL_LEN_SLOW comment
Problem Details: Remove the superfluous "find_". Signed-off-by: Baokun Li <libaokun1@huawei.com> Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Zhang Yi <yi.zhang@huawei.com> Link: https://patch.msgid.link/20250714130327.1830534-8-libaokun1@huawei.com Signed-off-by...
```diff diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 6dc6fabf0228..c65aefa19a99 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -157,7 +157,7 @@ enum criteria { /* * Reads each block group sequentially, performing disk IO if - * necessary, to find find_suitable block group. Tries to + * necessary, to...
82e6381e23f1ea7a14f418215068aaa2ca046c84
Analyze and fix the following issue in the Linux kernel code: ext4: initialize superblock fields in the kballoc-test.c kunit tests
Problem Details: Various changes in the "ext4: better scalability for ext4 block allocation" patch series have resulted in kunit test failures, most notably in the test_new_blocks_simple and the test_mb_mark_used tests. The root cause of these failures is that various in-memory ext4 data structures were not getting ini...
```diff diff --git a/fs/ext4/mballoc-test.c b/fs/ext4/mballoc-test.c index d634c12f1984..f018bc8424c7 100644 --- a/fs/ext4/mballoc-test.c +++ b/fs/ext4/mballoc-test.c @@ -155,6 +155,7 @@ static struct super_block *mbt_ext4_alloc_super_block(void) bgl_lock_init(sbi->s_blockgroup_lock); sbi->s_es = &fsb->es; + sbi-...
3d3c376118b5f7ed7723c2b4fd7a0a1c1893d63e
Analyze and fix the following issue in the Linux kernel code: rv: Merge struct rv_reactor_def into struct rv_reactor
Problem Details: Each struct rv_reactor has a unique struct rv_reactor_def associated with it. struct rv_reactor is statically allocated, while struct rv_reactor_def is dynamically allocated. This makes the code more complicated than it should be: - Lookup is required to get the associated rv_reactor_def from rv_re...
```diff diff --git a/include/linux/rv.h b/include/linux/rv.h index dba53aecdfab..c22c9b8c1567 100644 --- a/include/linux/rv.h +++ b/include/linux/rv.h @@ -90,6 +90,9 @@ struct rv_reactor { const char *name; const char *description; __printf(1, 2) void (*react)(const char *msg, ...); + struct list_head list; + /...
24cbfe18d55a6866bc2e27fda74306f4a1b5cb01
Analyze and fix the following issue in the Linux kernel code: rv: Merge struct rv_monitor_def into struct rv_monitor
Problem Details: Each struct rv_monitor has a unique struct rv_monitor_def associated with it. struct rv_monitor is statically allocated, while struct rv_monitor_def is dynamically allocated. This makes the code more complicated than it should be: - Lookup is required to get the associated rv_monitor_def from rv_mo...
```diff diff --git a/include/linux/rv.h b/include/linux/rv.h index 97baf58d88b2..dba53aecdfab 100644 --- a/include/linux/rv.h +++ b/include/linux/rv.h @@ -7,6 +7,9 @@ #ifndef _LINUX_RV_H #define _LINUX_RV_H +#include <linux/types.h> +#include <linux/list.h> + #define MAX_DA_NAME_LEN 32 #ifdef CONFIG_RV @@ -98,8...
8e48727c26c4d839ff9b4b73d1cae486bea7fe19
Analyze and fix the following issue in the Linux kernel code: scsi: sd: Make sd shutdown issue START STOP UNIT appropriately
Problem Details: Commit aa3998dbeb3a ("ata: libata-scsi: Disable scsi device manage_system_start_stop") enabled libata EH to manage device power mode trasitions for system suspend/resume and removed the flag from ata_scsi_dev_config. However, since the sd_shutdown() function still relies on the manage_system_start_stop...
```diff diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index daddef2e9e87..9e9b905b2881 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -4168,7 +4168,9 @@ static void sd_shutdown(struct device *dev) if ((system_state != SYSTEM_RESTART && sdkp->device->manage_system_start_stop) || (system_st...
0bdd05c2a82bbf2419415d012fd4f5faeca7f1af
Analyze and fix the following issue in the Linux kernel code: drm/xe/configfs: Fix pci_dev reference leak
Problem Details: We are using pci_get_domain_bus_and_slot() function to verify if the given config directory name matches any existing PCI device, but we missed to call matching pci_dev_put() to release reference. While around, also change error code in case of no device match, to make it more specific than generic fo...
```diff diff --git a/drivers/gpu/drm/xe/xe_configfs.c b/drivers/gpu/drm/xe/xe_configfs.c index 8ec1ff1e4e80..e9b46a2d0019 100644 --- a/drivers/gpu/drm/xe/xe_configfs.c +++ b/drivers/gpu/drm/xe/xe_configfs.c @@ -267,7 +267,8 @@ static struct config_group *xe_config_make_device_group(struct config_group *gro pdev = p...
5989bfe6ac6bf230c2c84e118c786be0ed4be3f4
Analyze and fix the following issue in the Linux kernel code: block: restore two stage elevator switch while running nr_hw_queue update
Problem Details: The kmemleak reports memory leaks related to elevator resources that were originally allocated in the ->init_hctx() method. The following leak traces are observed after running blktests block/040: unreferenced object 0xffff8881b82f7400 (size 512): comm "check", pid 68454, jiffies 4310588881 hex du...
```diff diff --git a/block/blk-mq.c b/block/blk-mq.c index b1d81839679f..9692fa4c3ef2 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -4970,6 +4970,60 @@ int blk_mq_update_nr_requests(struct request_queue *q, unsigned int nr) return ret; } +/* + * Switch back to the elevator type stored in the xarray. + */ +st...
a6b87bfc2ab5bccb7ad953693c85d9062aef3fdd
Analyze and fix the following issue in the Linux kernel code: HID: core: Harden s32ton() against conversion to 0 bits
Problem Details: Testing by the syzbot fuzzer showed that the HID core gets a shift-out-of-bounds exception when it tries to convert a 32-bit quantity to a 0-bit quantity. Ideally this should never occur, but there are buggy devices and some might have a report field with size set to zero; we shouldn't reject the repo...
```diff diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index ef1f79951d9b..f7d4efcae603 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -66,8 +66,12 @@ static s32 snto32(__u32 value, unsigned int n) static u32 s32ton(__s32 value, unsigned int n) { - s32 a = value >> (n - 1); + s32 ...
2db7a52ca9ed89cd0f762b21f79266f02d613fae
Analyze and fix the following issue in the Linux kernel code: docs: Fix kernel-doc error in CAN driver
Problem Details: Fix kernel-doc formatting issue causing unexpected indentation error in ctucanfd driver documentation build. Convert main return values to bullet list format while preserving numbered sub-list in order to correct indentation error and visual structure in rendered html. Signed-off-by: Luis Felipe Herna...
```diff diff --git a/drivers/net/can/ctucanfd/ctucanfd_base.c b/drivers/net/can/ctucanfd/ctucanfd_base.c index bf6398772960..8bd3f0fc385c 100644 --- a/drivers/net/can/ctucanfd/ctucanfd_base.c +++ b/drivers/net/can/ctucanfd/ctucanfd_base.c @@ -506,11 +506,12 @@ static bool ctucan_is_txt_buf_writable(struct ctucan_priv *...
b7d012e59627c1d1bb2ad5d71efc69a070ef767d
Analyze and fix the following issue in the Linux kernel code: can: tscan1: CAN_TSCAN1 can depend on PC104
Problem Details: Add a dependency on PC104 to limit (restrict) this driver kconfig prompt to kernel configs that have PC104 set. Add COMPILE_TEST as a possibility for more complete build coverage. I tested this build config on x86_64 5 times without problems. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Review...
```diff diff --git a/drivers/net/can/sja1000/Kconfig b/drivers/net/can/sja1000/Kconfig index ba16d7bc09ef..e061e35769bf 100644 --- a/drivers/net/can/sja1000/Kconfig +++ b/drivers/net/can/sja1000/Kconfig @@ -105,7 +105,7 @@ config CAN_SJA1000_PLATFORM config CAN_TSCAN1 tristate "TS-CAN1 PC104 boards" - depends on I...
788199b73b6efe4ee2ade4d7457b50bb45493488
Analyze and fix the following issue in the Linux kernel code: can: peak_usb: fix USB FD devices potential malfunction
Problem Details: The latest firmware versions of USB CAN FD interfaces export the EP numbers to be used to dialog with the device via the "type" field of a response to a vendor request structure, particularly when its value is greater than or equal to 2. Correct the driver's test of this field. Fixes: 4f232482467a ("...
```diff diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_fd.c b/drivers/net/can/usb/peak_usb/pcan_usb_fd.c index 4d85b29a17b7..ebefc274b50a 100644 --- a/drivers/net/can/usb/peak_usb/pcan_usb_fd.c +++ b/drivers/net/can/usb/peak_usb/pcan_usb_fd.c @@ -49,7 +49,7 @@ struct __packed pcan_ufd_fw_info { __le32 ser_no; /*...
1473e9e7679bd4f5a62d1abccae894fb86de280f
Analyze and fix the following issue in the Linux kernel code: usb: musb: omap2430: fix device leak at unbind
Problem Details: Make sure to drop the reference to the control device taken by of_find_device_by_node() during probe when the driver is unbound. Fixes: 8934d3e4d0e7 ("usb: musb: omap2430: Don't use omap_get_control_dev()") Cc: stable@vger.kernel.org # 3.13 Cc: Roger Quadros <rogerq@kernel.org> Signed-off-by: Johan Ho...
```diff diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 2970967a4fd2..36f756f9b7f6 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -400,7 +400,7 @@ static int omap2430_probe(struct platform_device *pdev) ret = platform_device_add_resources(musb, pdev->resourc...
868837b0a94c6b1b1fdbc04d3ba218ca83432393
Analyze and fix the following issue in the Linux kernel code: usb: gadget: udc: renesas_usb3: fix device leak at unbind
Problem Details: Make sure to drop the reference to the companion device taken during probe when the driver is unbound. Fixes: 39facfa01c9f ("usb: gadget: udc: renesas_usb3: Add register of usb role switch") Cc: stable@vger.kernel.org # 4.19 Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Johan...
```diff diff --git a/drivers/usb/gadget/udc/renesas_usb3.c b/drivers/usb/gadget/udc/renesas_usb3.c index b93c1903d26a..7cdcc9d16b8b 100644 --- a/drivers/usb/gadget/udc/renesas_usb3.c +++ b/drivers/usb/gadget/udc/renesas_usb3.c @@ -2657,6 +2657,7 @@ static void renesas_usb3_remove(struct platform_device *pdev) struct ...
93b400f4951404d040197943a25d6fef9f8ccabb
Analyze and fix the following issue in the Linux kernel code: usb: dwc3: meson-g12a: fix device leaks at unbind
Problem Details: Make sure to drop the references taken to the child devices by of_find_device_by_node() during probe on driver unbind. Fixes: c99993376f72 ("usb: dwc3: Add Amlogic G12A DWC3 glue") Cc: stable@vger.kernel.org # 5.2 Cc: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Johan Hovold <johan@kernel...
```diff diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c index 7d80bf7b18b0..55e144ba8cfc 100644 --- a/drivers/usb/dwc3/dwc3-meson-g12a.c +++ b/drivers/usb/dwc3/dwc3-meson-g12a.c @@ -837,6 +837,9 @@ static void dwc3_meson_g12a_remove(struct platform_device *pdev) usb_role_switch_...
086a0e516f7b3844e6328a5c69e2708b66b0ce18
Analyze and fix the following issue in the Linux kernel code: usb: dwc3: imx8mp: fix device leak at unbind
Problem Details: Make sure to drop the reference to the dwc3 device taken by of_find_device_by_node() on probe errors and on driver unbind. Fixes: 6dd2565989b4 ("usb: dwc3: add imx8mp dwc3 glue layer driver") Cc: stable@vger.kernel.org # 5.12 Cc: Li Jun <jun.li@nxp.com> Signed-off-by: Johan Hovold <johan@kernel.org> L...
```diff diff --git a/drivers/usb/dwc3/dwc3-imx8mp.c b/drivers/usb/dwc3/dwc3-imx8mp.c index 3edc5aca76f9..bce6af82f54c 100644 --- a/drivers/usb/dwc3/dwc3-imx8mp.c +++ b/drivers/usb/dwc3/dwc3-imx8mp.c @@ -244,7 +244,7 @@ static int dwc3_imx8mp_probe(struct platform_device *pdev) IRQF_ONESHOT, dev_name(dev), dwc3_im...
7919407eca2ef562fa6c98c41cfdf6f6cdd69d92
Analyze and fix the following issue in the Linux kernel code: usb: xhci: print xhci->xhc_state when queue_command failed
Problem Details: When encounters some errors like these: xhci_hcd 0000:4a:00.2: xHCI dying or halted, can't queue_command xhci_hcd 0000:4a:00.2: FIXME: allocate a command ring segment usb usb5-port6: couldn't allocate usb_device It's hard to know whether xhc_state is dying or halted. So it's better to print xhc_state'...
```diff diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 2b7415dd4170..ecd757d482c5 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -4375,7 +4375,8 @@ static int queue_command(struct xhci_hcd *xhci, struct xhci_command *cmd, if ((xhci->xhc_state & XHCI_S...
16d2a92e7ec8c7828069f86a0aa7974acafb7e57
Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix selecting CONFIG_DRM_KUNIT_TEST in debug builds
Problem Details: Selecting an option which depends on other options only works if the dependencies are guaranteed to be selected (as these dependencies will not be automatically selected). CONFIG_DRM_KUNIT_TEST depends on DRM, MMU and KUNIT the first two of which are guaranteed to be selected for i915, but the last one...
```diff diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug index b15b1cecb3aa..3562a02ef7ad 100644 --- a/drivers/gpu/drm/i915/Kconfig.debug +++ b/drivers/gpu/drm/i915/Kconfig.debug @@ -50,7 +50,7 @@ config DRM_I915_DEBUG select DRM_VGEM # used by igt/prime_vgem (dmabuf interop checks...
672820a070ea5e6ae114f6109726a4e18313a527
Analyze and fix the following issue in the Linux kernel code: ovl: properly print correct variable
Problem Details: In case of ovl_lookup_temp() failure, we currently print `err` which is actually not initialized at all. Instead, properly print PTR_ERR(whiteout) which is where the actual error really is. Address-Coverity-ID: 1647983 ("Uninitialized variables (UNINIT)") Fixes: 8afa0a7367138 ("ovl: narrow locking i...
```diff diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c index 30619777f0f6..70b8687dc45e 100644 --- a/fs/overlayfs/dir.c +++ b/fs/overlayfs/dir.c @@ -117,8 +117,9 @@ static struct dentry *ovl_whiteout(struct ovl_fs *ofs) if (!IS_ERR(whiteout)) return whiteout; if (PTR_ERR(whiteout) != -EMLINK) { - pr_w...
4740e1e2f320061c2f0dbadc0dd3dfb58df986d5
Analyze and fix the following issue in the Linux kernel code: gpio: virtio: Fix config space reading.
Problem Details: Quote from the virtio specification chapter 4.2.2.2: "For the device-specific configuration space, the driver MUST use 8 bit wide accesses for 8 bit wide fields, 16 bit wide and aligned accesses for 16 bit wide fields and 32 bit wide and aligned accesses for 32 and 64 bit wide fields." Signed-off-by:...
```diff diff --git a/drivers/gpio/gpio-virtio.c b/drivers/gpio/gpio-virtio.c index 92b456475d89..07552611da98 100644 --- a/drivers/gpio/gpio-virtio.c +++ b/drivers/gpio/gpio-virtio.c @@ -527,7 +527,6 @@ static const char **virtio_gpio_get_names(struct virtio_gpio *vgpio, static int virtio_gpio_probe(struct virtio_de...
f98de826b418885a21ece67f0f5b921ae759b7bf
Analyze and fix the following issue in the Linux kernel code: drm/xe/hw_engine_group: Avoid call kfree() for drmm_kzalloc()
Problem Details: Memory allocated with drmm_kzalloc() should not be freed using kfree(), as it is managed by the DRM subsystem. The memory will be automatically freed when the associated drm_device is released. These 3 group pointers are allocated using drmm_kzalloc() in hw_engine_group_alloc(), so they don't require m...
```diff diff --git a/drivers/gpu/drm/xe/xe_hw_engine_group.c b/drivers/gpu/drm/xe/xe_hw_engine_group.c index 87a6dcb1b4b5..c926f840c87b 100644 --- a/drivers/gpu/drm/xe/xe_hw_engine_group.c +++ b/drivers/gpu/drm/xe/xe_hw_engine_group.c @@ -75,25 +75,18 @@ int xe_hw_engine_setup_groups(struct xe_gt *gt) enum xe_hw_engi...
4f8ff9486fd94b9d6a4932f2aefb9f2fc3bd0cf6
Analyze and fix the following issue in the Linux kernel code: ksmbd: fix corrupted mtime and ctime in smb2_open
Problem Details: If STATX_BASIC_STATS flags are not given as an argument to vfs_getattr, It can not get ctime and mtime in kstat. This causes a problem showing mtime and ctime outdated from cifs.ko. File: /xfstest.test/foo Size: 4096 Blocks: 8 IO Block: 1048576 regular file Device: 0,65 Inode: 2...
```diff diff --git a/fs/smb/server/vfs.c b/fs/smb/server/vfs.c index 05ac2b14a7b1..2bd8cc20215a 100644 --- a/fs/smb/server/vfs.c +++ b/fs/smb/server/vfs.c @@ -553,7 +553,8 @@ int ksmbd_vfs_getattr(const struct path *path, struct kstat *stat) { int err; - err = vfs_getattr(path, stat, STATX_BTIME, AT_STATX_SYNC_AS_...
44a3059c4c8cc635a1fb2afd692d0730ca1ba4b6
Analyze and fix the following issue in the Linux kernel code: ksmbd: fix Preauh_HashValue race condition
Problem Details: If client send multiple session setup requests to ksmbd, Preauh_HashValue race condition could happen. There is no need to free sess->Preauh_HashValue at session setup phase. It can be freed together with session at connection termination phase. Cc: stable@vger.kernel.org Reported-by: zdi-disclosures@...
```diff diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c index b46fbc8087e0..6fc6ad63d004 100644 --- a/fs/smb/server/smb2pdu.c +++ b/fs/smb/server/smb2pdu.c @@ -1852,8 +1852,6 @@ int smb2_sess_setup(struct ksmbd_work *work) ksmbd_conn_set_good(conn); sess->state = SMB2_SESSION_VALID; } - k...
9b493ab6f35178afd8d619800df9071992f715de
Analyze and fix the following issue in the Linux kernel code: ksmbd: fix null pointer dereference error in generate_encryptionkey
Problem Details: If client send two session setups with krb5 authenticate to ksmbd, null pointer dereference error in generate_encryptionkey could happen. sess->Preauth_HashValue is set to NULL if session is valid. So this patch skip generate encryption key if session is valid. Cc: stable@vger.kernel.org Reported-by: ...
```diff diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c index 929d62768f64..0caf30fb1df1 100644 --- a/fs/smb/server/smb2pdu.c +++ b/fs/smb/server/smb2pdu.c @@ -1621,11 +1621,24 @@ static int krb5_authenticate(struct ksmbd_work *work, rsp->SecurityBufferLength = cpu_to_le16(out_len); - if ((conn->si...
c37495fe3531647db4ae5787a80699ae1438d7cf
Analyze and fix the following issue in the Linux kernel code: bcachefs: Add missing snapshots_seen_add_inorder()
Problem Details: This fixes an infinite loop when repairing "extent past end of inode", when the extent is an older snapshot than the inode that needs repair. Without the snaphsots_seen_add_inorder() we keep trying to delete the same extent, even though it's no longer visible in the inode's snapshot. Fixes: 63d6e9311...
```diff diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c index 856eb2b41896..15c1e890d299 100644 --- a/fs/bcachefs/fsck.c +++ b/fs/bcachefs/fsck.c @@ -1920,11 +1920,12 @@ static int check_extent(struct btree_trans *trans, struct btree_iter *iter, "extent type past end of inode %llu:%u, i_size %llu\n%s", ...
1831840c2bc502c98c21df2ea0fa419b2ed0a6ec
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix write buffer flushing from open journal entry
Problem Details: When flushing the btree write buffer, we pull write buffer keys directly from the journal instead of letting the journal write path copy them to the write buffer. When flushing from the currently open journal buffer, we have to block new reservations and wait for outstanding reservations to complete. ...
```diff diff --git a/fs/bcachefs/journal.c b/fs/bcachefs/journal.c index f22b05e02c1e..ddfeb0dafc9d 100644 --- a/fs/bcachefs/journal.c +++ b/fs/bcachefs/journal.c @@ -1082,6 +1082,7 @@ static struct journal_buf *__bch2_next_write_buffer_flush_journal_buf(struct jou if (open && !*blocked) { __bch2_journal_blo...
794ff7a0a6e76af93c5ec09a49b86fe73373ca59
Analyze and fix the following issue in the Linux kernel code: scsi: dt-bindings: mediatek,ufs: Add ufs-disable-mcq flag for UFS host
Problem Details: Add the 'mediatek,ufs-disable-mcq' property to the UFS device-tree bindings. This flag corresponds to the UFS_MTK_CAP_DISABLE_MCQ host capability recently introduced in the UFS host driver, allowing it to disable the Multiple Circular Queue (MCQ) feature when present. The binding schema has also been ...
```diff diff --git a/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml b/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml index 32fd535a514a..20f341d25ebc 100644 --- a/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml +++ b/Documentation/devicetree/bindings/ufs/mediatek,ufs.yaml @@ -33,6 +33,10 @@ pr...