id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
bf809a0aab2f3a3a97264f217f2dbee0913b2ed7
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Fix documentation for vgic_its_iter_next()
Problem Details: As reported by the build robot, the documentation for vgic_its_iter_next() contains a typo. Fix it. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202505221421.KAuWlmSr-lkp@intel.com/ Signed-off-by: Marc Zyngier <maz@kernel.org>
```diff diff --git a/arch/arm64/kvm/vgic/vgic-debug.c b/arch/arm64/kvm/vgic/vgic-debug.c index 48b9c47d8c11..f8425f381de9 100644 --- a/arch/arm64/kvm/vgic/vgic-debug.c +++ b/arch/arm64/kvm/vgic/vgic-debug.c @@ -352,7 +352,7 @@ static inline bool end_of_iter(struct vgic_its_iter *iter) } /** - * vigc_its_iter_next -...
f4b18ff2c147d3b56384fcc8adb30bf733bf2300
Analyze and fix the following issue in the Linux kernel code: perf/uapi: Fix PERF_RECORD_SAMPLE comments in <uapi/linux/perf_event.h>
Problem Details: AAUX data for PERF_SAMPLE_AUX appears last. PERF_SAMPLE_CGROUP is missing from the comment. This makes the <uapi/linux/perf_event.h> comment match that in the perf_event_open man page. Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Adrian Hunter <adri...
```diff diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index 5fc753c23734..b2722dae6f1e 100644 --- a/include/uapi/linux/perf_event.h +++ b/include/uapi/linux/perf_event.h @@ -1035,10 +1035,11 @@ enum perf_event_type { * { u64 abi; # enum perf_sample_regs_abi * u64 regs[weight...
8b8ef309093ff196967a21ee51a9cdb404a13bf6
Analyze and fix the following issue in the Linux kernel code: gpio: timberdale: select GPIOLIB_IRQCHIP
Problem Details: This driver uses gpiochip_irq_reqres() and gpiochip_irq_relres() which are only built with GPIOLIB_IRQCHIP=y. Add the missing Kconfig select. Fixes: 2993d2dd8ff4 ("gpio: timberdale: Make irq_chip immutable") Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://lore.kernel.org/r/20250522-gpio-fix-v...
```diff diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index c75fc8fc7bb2..44f922e10db2 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -1557,6 +1557,7 @@ config GPIO_TC3589X config GPIO_TIMBERDALE bool "Support for timberdale GPIO IP" depends on MFD_TIMBERDALE + select GPIOLIB_IRQCHIP ...
01e4397d0c1c9ae434c574f45359ad0c226a864b
Analyze and fix the following issue in the Linux kernel code: gpio: lpc18xx: select GPIOLIB_IRQCHIP
Problem Details: This driver uses gpiochip_irq_reqres() and gpiochip_irq_relres() which are only built with GPIOLIB_IRQCHIP=y. Add the missing Kconfig select. Fixes: 289e42df1358 ("gpio: lpc18xx: Make irq_chip immutable") Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://lore.kernel.org/r/20250522-gpio-fix-v1-3...
```diff diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 2ff53b00cf7c..c75fc8fc7bb2 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -438,6 +438,7 @@ config GPIO_LPC18XX default y if ARCH_LPC18XX depends on OF_GPIO && (ARCH_LPC18XX || COMPILE_TEST) select IRQ_DOMAIN_HIERARCHY + select...
3dff3563cc11e90f046902f0b2be40e82f5ee251
Analyze and fix the following issue in the Linux kernel code: gpio: grgpio: select GPIOLIB_IRQCHIP
Problem Details: This driver uses gpiochip_irq_reqres() and gpiochip_irq_relres() which are only built with GPIOLIB_IRQCHIP=y. Add the missing Kconfig select. Fixes: a30be40bf1d4 ("gpio: grgpio: Make irq_chip immutable") Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://lore.kernel.org/r/20250522-gpio-fix-v1-2-...
```diff diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index ac0c646451a5..2ff53b00cf7c 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -354,7 +354,7 @@ config GPIO_GRGPIO tristate "Aeroflex Gaisler GRGPIO support" depends on OF || COMPILE_TEST select GPIO_GENERIC - select IRQ_DOMAIN + s...
86fabf1b174069465ea12b4140cb35543fd0c738
Analyze and fix the following issue in the Linux kernel code: gpio: bcm-kona: select GPIOLIB_IRQCHIP
Problem Details: This driver uses gpiochip_irq_reqres() and gpiochip_irq_relres() which are only built with GPIOLIB_IRQCHIP=y. Add the missing Kconfig select. Fixes: 7b04f98027af ("gpio: bcm-kona: make irq_chip immutable") Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://lore.kernel.org/r/20250522-gpio-fix-v1-...
```diff diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index c3465fd82b08..ac0c646451a5 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -201,6 +201,7 @@ config GPIO_RASPBERRYPI_EXP config GPIO_BCM_KONA bool "Broadcom Kona GPIO" depends on ARCH_BCM_MOBILE || COMPILE_TEST + select GPIOLIB_I...
bdcea7e396916c1cc4a7611c33554e5ecf93a54f
Analyze and fix the following issue in the Linux kernel code: iommu/mediatek: Fix compatible typo for mediatek,mt6893-iommu-mm
Problem Details: Fix the "mediatek.mt6893-iommu-mm" compatible string typo, as the dot was actually meant to be a comma: "mediatek,mt6893-iommu-mm". Fixes: f6a1e89ab6e3 ("iommu/mediatek: Add support for Dimensity 1200 MT6893 MM IOMMU") Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>...
```diff diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index 0a54c6521bf5..cb95fecf6016 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -1791,7 +1791,7 @@ static const struct of_device_id mtk_iommu_of_ids[] = { { .compatible = "mediatek,mt2712-m4u", .data = &mt2712_data},...
91793971f3b6db17f234d875e70ebf921901dee4
Analyze and fix the following issue in the Linux kernel code: gfs2: Minor comments fix
Problem Details: Commit 40829760096df ("gfs2: Convert gfs2_find_jhead() to use a folio") replaced grab_cache_page() by filemap_grab_folio(), but the comments were still referring to grab_cache_page(). Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
```diff diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index a1022635abc9..ba97e97d3eee 100644 --- a/fs/gfs2/lops.c +++ b/fs/gfs2/lops.c @@ -451,7 +451,7 @@ static bool gfs2_jhead_folio_search(struct gfs2_jdesc *jd, * Find the folio with 'index' in the journal's mapping. Search the folio for * the journal head if req...
5a90f8d499225512a385585ffe3e28f687263d47
Analyze and fix the following issue in the Linux kernel code: gfs2: Don't start unnecessary transactions during log flush
Problem Details: Commit 8d391972ae2d ("gfs2: Remove __gfs2_writepage()") changed the log flush code in gfs2_ail1_start_one() to call aops->writepages() instead of aops->writepage(). For jdata inodes, this means that we will now try to reserve log space and start a transaction before we can determine that the pages in ...
```diff diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c index 1a3a420316fa..14f204cd5a82 100644 --- a/fs/gfs2/aops.c +++ b/fs/gfs2/aops.c @@ -117,6 +117,37 @@ static int __gfs2_jdata_write_folio(struct folio *folio, return gfs2_write_jdata_folio(folio, wbc); } +/** + * gfs2_jdata_writeback - Write jdata folios to the...
b3f6fcd8404f9f92262303369bb877ec5d188a81
Analyze and fix the following issue in the Linux kernel code: iommu: Skip PASID validation for devices without PASID capability
Problem Details: Generally PASID support requires ACS settings that usually create single device groups, but there are some niche cases where we can get multi-device groups and still have working PASID support. The primary issue is that PCI switches are not required to treat PASID tagged TLPs specially so appropriate A...
```diff diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 4f91a740c15f..9d728800a862 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -3366,10 +3366,12 @@ static int __iommu_set_group_pasid(struct iommu_domain *domain, int ret; for_each_group_device(group, device) { - ret = domain...
f4c7baa0699b69edb6887a992283b389761e0e81
Analyze and fix the following issue in the Linux kernel code: drm/i915/display: Add check for alloc_ordered_workqueue() and alloc_workqueue()
Problem Details: Add check for the return value of alloc_ordered_workqueue() and alloc_workqueue(). Furthermore, if some allocations fail, cleanup works are added to avoid potential memory leak problem. Fixes: 40053823baad ("drm/i915/display: move modeset probe/remove functions to intel_display_driver.c") Cc: stable@v...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c index 5c74ab5fd1aa..411fe7b918a7 100644 --- a/drivers/gpu/drm/i915/display/intel_display_driver.c +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c @@ -244,31 +244,45 @@ int intel_displ...
9cb15478916e849d62a6ec44b10c593b9663328c
Analyze and fix the following issue in the Linux kernel code: drm/i915/dp_mst: Work around Thunderbolt sink disconnect after SINK_COUNT_ESI read
Problem Details: Due to a problem in the iTBT DP-in adapter's firmware the sink on a TBT link may get disconnected inadvertently if the SINK_COUNT_ESI and the DP_LINK_SERVICE_IRQ_VECTOR_ESI0 registers are read in a single AUX transaction. Work around the issue by reading these registers in separate transactions. The i...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index ad1e4fc9c7fe..640c43bf62d4 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -4532,6 +4532,23 @@ intel_dp_mst_disconnect(struct intel_dp *intel_dp) static boo...
b495021a973e2468497689bd3e29b736747b896f
Analyze and fix the following issue in the Linux kernel code: tty: serial: 8250_omap: fix TX with DMA for am33xx
Problem Details: Commit 1788cf6a91d9 ("tty: serial: switch from circ_buf to kfifo") introduced an error in the TX DMA handling for 8250_omap. When the OMAP_DMA_TX_KICK flag is set, the "skip_byte" is pulled from the kfifo and emitted directly in order to start the DMA. While the kfifo is updated, dma->tx_size is not d...
```diff diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c index 2a0ce11f405d..72ae08d6204f 100644 --- a/drivers/tty/serial/8250/8250_omap.c +++ b/drivers/tty/serial/8250/8250_omap.c @@ -1173,16 +1173,6 @@ static int omap_8250_tx_dma(struct uart_8250_port *p) return 0; } - sg_...
0b6e452caf03da63aeb2e84475771d6fb6d6cd99
Analyze and fix the following issue in the Linux kernel code: net/mlx5: HWS, fix typo - 'nope' to 'nop'
Problem Details: Fix typo - rename 'nope_locations' to 'nop_locations', which describes the locations of 'nop' actions. To shorten the lines, this renaming also required some refactoring. Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Tariq Toukan <tari...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/action.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/action.c index aa47a7af6f50..64d115feef2c 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/action.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/action...
b206d9ec19dfc2db706883ff6b46b259831a033d
Analyze and fix the following issue in the Linux kernel code: net/mlx5: HWS, register reformat actions with fw
Problem Details: Hardware steering handles actions differently from firmware, but for termination rules that use encapsulation the firmware needs to be aware of the action. Fix this by registering reformat actions with the firmware the first time this is needed. To do this, add a third possible owner for an action, an...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c index a81b81a3b8f0..23a7e8e7adfa 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c @@ -1839,6 +1839,8 @@ int mlx5_fs_get_packet_...
ca7690dae1269f454572c163ed5271feed060af5
Analyze and fix the following issue in the Linux kernel code: net/mlx5: SWS, fix reformat id error handling
Problem Details: The firmware reformat id is a u32 and can't safely be returned as an int. Because the functions also need a way to signal error, prefer to return the id as an output parameter and keep the return code only for success/error. While we're at it, also extract some duplicate code to fetch the reformat id ...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c index a47c29571f64..1af76da8b132 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c @@ -527,7 +527,7 @@ static int mlx5_cmd_set_fte(s...
945301db34f14eaa0be794458b67aead74ff79fa
Analyze and fix the following issue in the Linux kernel code: net: add debug checks in ____napi_schedule() and napi_poll()
Problem Details: While tracking an IDPF bug, I found that idpf_vport_splitq_napi_poll() was not following NAPI rules. It can indeed return @budget after napi_complete() has been called. Add two debug conditions in networking core to hopefully catch this kind of bugs sooner. IDPF bug will be fixed in a separate patch...
```diff diff --git a/net/core/dev.c b/net/core/dev.c index e1e37dfb3628..3eb4e945f312 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4815,6 +4815,7 @@ static inline void ____napi_schedule(struct softnet_data *sd, } use_local_napi: + DEBUG_NET_WARN_ON_ONCE(!list_empty(&napi->poll_list)); list_add_tail(&napi...
407e0efdf8baf1672876d5948b75049860a93e59
Analyze and fix the following issue in the Linux kernel code: idpf: fix idpf_vport_splitq_napi_poll()
Problem Details: idpf_vport_splitq_napi_poll() can incorrectly return @budget after napi_complete_done() has been called. This violates NAPI rules, because after napi_complete_done(), current thread lost napi ownership. Move the test against POLL_MODE before the napi_complete_done(). Fixes: c2d548cad150 ("idpf: add ...
```diff diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c b/drivers/net/ethernet/intel/idpf/idpf_txrx.c index bdf52cef3891..2d5f5c9f91ce 100644 --- a/drivers/net/ethernet/intel/idpf/idpf_txrx.c +++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.c @@ -4025,6 +4025,14 @@ static int idpf_vport_splitq_napi_poll(struct ...
bd15b2b26c982540d973b1d672c8aa37dae25a8b
Analyze and fix the following issue in the Linux kernel code: nfc: Correct Samsung "Electronics" spelling in copyright headers
Problem Details: Fix the misspelling of "Electronics" in copyright headers across: - s3fwrn5 driver - virtual_ncidev driver Signed-off-by: Sumanth Gavini <sumanth.gavini@yahoo.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20250520072119.176018-1-sumanth.gavini@ya...
```diff diff --git a/drivers/nfc/s3fwrn5/core.c b/drivers/nfc/s3fwrn5/core.c index aec356880adf..af0fa8bd970b 100644 --- a/drivers/nfc/s3fwrn5/core.c +++ b/drivers/nfc/s3fwrn5/core.c @@ -2,7 +2,7 @@ /* * NCI based driver for Samsung S3FWRN5 NFC chip * - * Copyright (C) 2015 Samsung Electrnoics + * Copyright (C) 20...
edb888d29748cee674006a52e544925dacc7728e
Analyze and fix the following issue in the Linux kernel code: emulex/benet: correct command version selection in be_cmd_get_stats()
Problem Details: Logic here always sets hdr->version to 2 if it is not a BE3 or Lancer chip, even if it is BE2. Use 'else if' to prevent multiple assignments, setting version 0 for BE2, version 1 for BE3 and Lancer, and version 2 for others. Fixes potential incorrect version setting when BE2_chip and BE3_chip/lancer_ch...
```diff diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c index adb441b36581..d730af4a50c7 100644 --- a/drivers/net/ethernet/emulex/benet/be_cmds.c +++ b/drivers/net/ethernet/emulex/benet/be_cmds.c @@ -1609,7 +1609,7 @@ int be_cmd_get_stats(struct be_adapter *adapter...
68477b5dc57108d4306c56b3842d6f80a8161f30
Analyze and fix the following issue in the Linux kernel code: ksmbd: fix rename failure
Problem Details: I found that rename fails after cifs mount due to update of lookup_one_qstr_excl(). mv a/c b/ mv: cannot move 'a/c' to 'b/c': No such file or directory In order to rename to a new name regardless of whether the dentry is negative, we need to get the dentry through lookup_one_qstr_excl(). So It will ...
```diff diff --git a/fs/smb/server/vfs.c b/fs/smb/server/vfs.c index 156ded9ac889..baf0d3031a44 100644 --- a/fs/smb/server/vfs.c +++ b/fs/smb/server/vfs.c @@ -682,7 +682,7 @@ int ksmbd_vfs_rename(struct ksmbd_work *work, const struct path *old_path, struct ksmbd_file *parent_fp; int new_type; int err, lookup_flag...
731bdd97466a280d6bdd8eceeb13d9fab6f26cbd
Analyze and fix the following issue in the Linux kernel code: cgroup: avoid per-cpu allocation of size zero rstat cpu locks
Problem Details: Subsystem rstat locks are dynamically allocated per-cpu. It was discovered that a panic can occur during this allocation when the lock size is zero. This is the case on non-smp systems, since arch_spinlock_t is defined as an empty struct. Prevent this allocation when !CONFIG_SMP by adding a pre-process...
```diff diff --git a/kernel/cgroup/rstat.c b/kernel/cgroup/rstat.c index 7dd396ae3c68..ce4752ab9e09 100644 --- a/kernel/cgroup/rstat.c +++ b/kernel/cgroup/rstat.c @@ -510,11 +510,20 @@ int __init ss_rstat_init(struct cgroup_subsys *ss) { int cpu; +#ifdef CONFIG_SMP + /* + * On uniprocessor machines, arch_spinlock...
3a08988123c868dbfdd054541b1090fb891fa49e
Analyze and fix the following issue in the Linux kernel code: io_uring/net: only retry recv bundle for a full transfer
Problem Details: If a shorter than assumed transfer was seen, a partial buffer will have been filled. For that case it isn't sane to attempt to fill more into the bundle before posting a completion, as that will cause a gap in the received data. Check if the iterator has hit zero and only allow to continue a bundle op...
```diff diff --git a/io_uring/net.c b/io_uring/net.c index 24040bc3916a..27f37fa2ef79 100644 --- a/io_uring/net.c +++ b/io_uring/net.c @@ -827,18 +827,24 @@ static inline bool io_recv_finish(struct io_kiocb *req, int *ret, cflags |= IORING_CQE_F_SOCK_NONEMPTY; if (sr->flags & IORING_RECVSEND_BUNDLE) { - cflags ...
f638b84224348dd58a348617e6f648e967e1b1ce
Analyze and fix the following issue in the Linux kernel code: bcachefs: fix bch2_inum_snapshot_to_path()
Problem Details: Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/namei.c b/fs/bcachefs/namei.c index bd093ce56ad9..a84b69d6caef 100644 --- a/fs/bcachefs/namei.c +++ b/fs/bcachefs/namei.c @@ -609,29 +609,39 @@ static inline void reverse_bytes(void *b, size_t n) } } -/* XXX: we don't yet attempt to print paths when we don't know the subvol */ -int...
2faa8ab0d03cd4e619024a257f69b7e51ac82c15
Analyze and fix the following issue in the Linux kernel code: bcachefs: fix duplicate printk
Problem Details: Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/backpointers.c b/fs/bcachefs/backpointers.c index c08bc6685078..cde7dd115267 100644 --- a/fs/bcachefs/backpointers.c +++ b/fs/bcachefs/backpointers.c @@ -123,8 +123,6 @@ static noinline int backpointer_mod_err(struct btree_trans *trans, prt_printf(&buf, "for "); bch2_bkey_val_to...
8c3fc7cca38459751489f5015f3282a64e452b7e
Analyze and fix the following issue in the Linux kernel code: bcachefs: fix bch2_debugfs_flush_buf() when tabstops are in use
Problem Details: Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/debug.c b/fs/bcachefs/debug.c index 4ee5d486b305..4fa70634c90e 100644 --- a/fs/bcachefs/debug.c +++ b/fs/bcachefs/debug.c @@ -320,6 +320,11 @@ ssize_t bch2_debugfs_flush_buf(struct dump_iter *i) i->buf.pos -= copied; memmove(i->buf.buf, i->buf.buf + copied, i->buf.pos); + if (i...
6b86da9282b0f6a3fb7aae709dca9feb4c8316b5
Analyze and fix the following issue in the Linux kernel code: bcachefs: fsck: Include loops in error messages
Problem Details: This fixes the subvol loop checking and directory loop checking to print the loop. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c index 2a7f418f3d87..9d94d31cfec9 100644 --- a/fs/bcachefs/fsck.c +++ b/fs/bcachefs/fsck.c @@ -2502,7 +2502,14 @@ static int check_subvol_path(struct btree_trans *trans, struct btree_iter *iter, u32 parent = le32_to_cpu(s.v->fs_path_parent); if (darray...
e882906929c55a9561641944d24c11dc3f338225
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix opt hooks in sysfs for non sb option
Problem Details: We weren't checking if the option changed for non-superblock options - this led to rebalance not waking up when enabling the "rebalance_enabled" option. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/sysfs.c b/fs/bcachefs/sysfs.c index 4c7d609d79fd..de7cda282a8c 100644 --- a/fs/bcachefs/sysfs.c +++ b/fs/bcachefs/sysfs.c @@ -642,7 +642,18 @@ static ssize_t sysfs_opt_store(struct bch_fs *c, if (ret < 0) goto err; - bool changed = bch2_opt_set_sb(c, ca, opt, v); + bool is_sb = o...
648c1142c9f1ad914c9fd79cedbd6b92ac788cd6
Analyze and fix the following issue in the Linux kernel code: bcachefs: fix can_write_extent()
Problem Details: Failing to check the return value of bch2_dev_rcu(): we could (technically) race with device removal. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/data_update.c b/fs/bcachefs/data_update.c index c39ea51e9e48..de096ca65b4b 100644 --- a/fs/bcachefs/data_update.c +++ b/fs/bcachefs/data_update.c @@ -744,7 +744,9 @@ static int can_write_extent(struct bch_fs *c, struct data_update *m) rcu_read_lock(); unsigned nr_replicas = 0, i; ...
c4e38894407d27742c1fc8d0d64d8145c83077d5
Analyze and fix the following issue in the Linux kernel code: bcachefs: debug_check_iterators no longer requires BCACHEFS_DEBUG
Problem Details: Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/bcachefs.h b/fs/bcachefs/bcachefs.h index ae6b743ae014..a3900fb08f92 100644 --- a/fs/bcachefs/bcachefs.h +++ b/fs/bcachefs/bcachefs.h @@ -393,8 +393,6 @@ do { \ "Disables rewriting of btree nodes during mark and sweep")\ BCH_DEBUG_PARAM(btree_shrinker_disabled, \ "Disa...
110bb6cb8b48bd6736d8e7c08a4236d443f8064a
Analyze and fix the following issue in the Linux kernel code: bcachefs: debug_check_btree_locking modparam
Problem Details: Don't put btree locking asserts behind CONFIG_BCACHEFS_DEBUG, put them behind a module parameter. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/bcachefs.h b/fs/bcachefs/bcachefs.h index 46976409f733..ae6b743ae014 100644 --- a/fs/bcachefs/bcachefs.h +++ b/fs/bcachefs/bcachefs.h @@ -393,6 +393,8 @@ do { \ "Disables rewriting of btree nodes during mark and sweep")\ BCH_DEBUG_PARAM(btree_shrinker_disabled, \ "Disa...
284251557562f6e8f0ce439cb52a6b9645b4e9a4
Analyze and fix the following issue in the Linux kernel code: bcachefs: Debug params are now static_keys
Problem Details: We'd like users to be able to debug without building custom kernels, so this will help us get rid of CONFIG_BCACHEFS_DEBUG, at least for most things. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/backpointers.c b/fs/bcachefs/backpointers.c index 631d4d24d78f..bdf524b465fa 100644 --- a/fs/bcachefs/backpointers.c +++ b/fs/bcachefs/backpointers.c @@ -182,7 +182,7 @@ err: static int bch2_backpointer_del(struct btree_trans *trans, struct bpos pos) { - return (likely(!bch2_backpoi...
970dde8271b607876bfdbb66b941ffda35e74973
Analyze and fix the following issue in the Linux kernel code: bcachefs: Add missing include
Problem Details: fix debug build in userspace Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/util.h b/fs/bcachefs/util.h index 14cb2c7dfda4..25cf61ebd40c 100644 --- a/fs/bcachefs/util.h +++ b/fs/bcachefs/util.h @@ -14,6 +14,7 @@ #include <linux/log2.h> #include <linux/percpu.h> #include <linux/preempt.h> +#include <linux/random.h> #include <linux/ratelimit.h> #include <lin...
3c97ebea61e3ebdbab5b2564296a86d601b632e6
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix inconsistent req->ec
Problem Details: There is req->ec = erasure_code above. Signed-off-by: Alan Huang <mmpgouride@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/alloc_foreground.c b/fs/bcachefs/alloc_foreground.c index e87b95f609c5..2d7f32f9499e 100644 --- a/fs/bcachefs/alloc_foreground.c +++ b/fs/bcachefs/alloc_foreground.c @@ -1255,6 +1255,9 @@ int bch2_alloc_sectors_start_trans(struct btree_trans *trans, if (unlikely(ret)) return ret; ...
8a6b883e78bfed6909e21c2afb6138b603d1ee6c
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix setting ca->name in device add
Problem Details: Device add doesn't get the devide index and attach to the filesystem until after attaching the block device, and setting the device name from the block device name - these needs some minor tweaks. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c index e89b659514b2..9381644cabee 100644 --- a/fs/bcachefs/super.c +++ b/fs/bcachefs/super.c @@ -1488,7 +1488,9 @@ static void bch2_dev_attach(struct bch_fs *c, struct bch_dev *ca, { ca->dev_idx = dev_idx; __set_bit(ca->dev_idx, ca->self.d); - scnprintf...
5ce11d9d1bd5dfd8876d35bd9e61f38f47807c42
Analyze and fix the following issue in the Linux kernel code: bcachefs: sysfs trigger_recalc_capacity
Problem Details: For bug diagnosis Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/sysfs.c b/fs/bcachefs/sysfs.c index dfae5eda7a4c..1d0c0f24a7b9 100644 --- a/fs/bcachefs/sysfs.c +++ b/fs/bcachefs/sysfs.c @@ -146,8 +146,9 @@ write_attribute(trigger_journal_flush); write_attribute(trigger_journal_writes); write_attribute(trigger_btree_cache_shrink); write_attribute(...
ae0386e111253eee0f71ae3f32635a3ba22e5a7b
Analyze and fix the following issue in the Linux kernel code: bcachefs: Avoid -Wflex-array-member-not-at-end warnings
Problem Details: -Wflex-array-member-not-at-end was introduced in GCC-14, and we are getting ready to enable it, globally. Refactor a couple of structs that contain flexible arrays in the middle by replacing them with unions. So, with these changes, fix the following warnings: fs/bcachefs/disk_accounting.c:429:51: w...
```diff diff --git a/fs/bcachefs/disk_accounting.c b/fs/bcachefs/disk_accounting.c index e399237e124a..195dc3fcec1d 100644 --- a/fs/bcachefs/disk_accounting.c +++ b/fs/bcachefs/disk_accounting.c @@ -287,7 +287,7 @@ static inline bool accounting_to_replicas(struct bch_replicas_entry_v1 *r, struc static int bch2_accou...
7677859a47a464f1c5603077809d4bc13f2d549f
Analyze and fix the following issue in the Linux kernel code: bcachefs: Run most explicit recovery passes persistent
Problem Details: If we detect an error that requires running a recovery pass, and we're not in recovery, we won't be able to fix it until the next mount - make sure we're noting in the superblock that it needs to run. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/buckets.c b/fs/bcachefs/buckets.c index 3ec33a7e9d92..596edc7bba2f 100644 --- a/fs/bcachefs/buckets.c +++ b/fs/bcachefs/buckets.c @@ -399,7 +399,7 @@ static int bucket_ref_update_err(struct btree_trans *trans, struct printbuf *buf bool print = __bch2_count_fsck_err(c, id, buf); - ...
f5241e41272858b983da45ac7f8a6ad58c4ba71f
Analyze and fix the following issue in the Linux kernel code: bcachefs: enumerated_ref.c
Problem Details: Factor out the debug code for rw filesystem refs into a small library. In release mode an enumerated ref is a normal percpu refcount, but in debug mode all enumerated users of the ref get their own atomic_long_t ref - making it much easier to chase down refcount usage bugs for when a refcount has many...
```diff diff --git a/fs/bcachefs/Makefile b/fs/bcachefs/Makefile index 9af65079374f..d2b8aec6ed8c 100644 --- a/fs/bcachefs/Makefile +++ b/fs/bcachefs/Makefile @@ -35,6 +35,7 @@ bcachefs-y := \ disk_accounting.o \ disk_groups.o \ ec.o \ + enumerated_ref.o \ errcode.o \ error.o \ extents.o \ diff --gi...
62095464e9d2a2340a6b08a90fb280ea2b091a28
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix struct with flex member ABI warning
Problem Details: This pops up when buliding in userspace. The structs aren't actually variable length, but no way to tell the compiler that... Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/disk_accounting.c b/fs/bcachefs/disk_accounting.c index 1f0422bfae35..e399237e124a 100644 --- a/fs/bcachefs/disk_accounting.c +++ b/fs/bcachefs/disk_accounting.c @@ -631,17 +631,17 @@ static int accounting_read_key(struct btree_trans *trans, struct bkey_s_c k) } static int bch2_disk...
c79eb06da4c34f29ca8bd23ddf7c1d7c1cd16121
Analyze and fix the following issue in the Linux kernel code: bcachefs: Clean up option pre/post hooks, small fixes
Problem Details: The helpers are now: - bch2_opt_hook_pre_set() - bch2_opts_hooks_pre_set() - bch2_opt_hook_post_set Fix a bug where the filesystem discard option would incorrectly be changed when setting the device option, and don't trigger rebalance scans unnecessarily (when options aren't changing). Signed-off-by:...
```diff diff --git a/fs/bcachefs/opts.c b/fs/bcachefs/opts.c index b3fcffc91d6f..386482ff8e7b 100644 --- a/fs/bcachefs/opts.c +++ b/fs/bcachefs/opts.c @@ -7,7 +7,9 @@ #include "compress.h" #include "disk_groups.h" #include "error.h" +#include "movinggc.h" #include "opts.h" +#include "rebalance.h" #include "recover...
bcaea61adc1c19094cafbf0269fe99227b2ac89c
Analyze and fix the following issue in the Linux kernel code: bcachefs: add missing include
Problem Details: Hygeine, and fix build in userspace. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/io_read.c b/fs/bcachefs/io_read.c index 751a9679d7e5..e5b3e987d7bb 100644 --- a/fs/bcachefs/io_read.c +++ b/fs/bcachefs/io_read.c @@ -25,6 +25,7 @@ #include "subvolume.h" #include "trace.h" +#include <linux/moduleparam.h> #include <linux/random.h> #include <linux/sched/mm.h> ```
ecd76c5f108eec3eea0a5b32007cda0dca6c92ac
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix bch2_dirent_create_snapshot() for casefolding
Problem Details: bch2_dirent_create_snapshot(), used in fsck, neglected to create a casefolded dirent. Just move this into dirent_create_key(). Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/dirent.c b/fs/bcachefs/dirent.c index 8a680e52c1ed..a51195088227 100644 --- a/fs/bcachefs/dirent.c +++ b/fs/bcachefs/dirent.c @@ -288,6 +288,7 @@ static void dirent_init_casefolded_name(struct bkey_i_dirent *dirent, } static struct bkey_i_dirent *dirent_create_key(struct btree_trans...
8d5ac187da10a8a5599b481588951470a2fb792b
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix casefold opt via xattr interface
Problem Details: Changing the casefold option requires extra checks/work - factor out a helper from bch2_fileattr_set() for the xattr code to use. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/fs.c b/fs/bcachefs/fs.c index 4b742e62255b..47f1a64c5c8d 100644 --- a/fs/bcachefs/fs.c +++ b/fs/bcachefs/fs.c @@ -1664,33 +1664,9 @@ static int fssetxattr_inode_update_fn(struct btree_trans *trans, return -EINVAL; if (s->casefold != bch2_inode_casefold(c, bi)) { -#ifdef CONFIG_UN...
d42d440746f8a2dd04b17102993fc85a162dc75a
Analyze and fix the following issue in the Linux kernel code: net: libwx: Fix log level
Problem Details: There is a log should be printed as info level, not error level. Fixes: 9bfd65980f8d ("net: libwx: Add sriov api for wangxun nics") Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Link: https://patch.msgid.link/67409DB57B87E2F0+20...
```diff diff --git a/drivers/net/ethernet/wangxun/libwx/wx_sriov.c b/drivers/net/ethernet/wangxun/libwx/wx_sriov.c index 52e6a6faf715..195f64baedab 100644 --- a/drivers/net/ethernet/wangxun/libwx/wx_sriov.c +++ b/drivers/net/ethernet/wangxun/libwx/wx_sriov.c @@ -76,7 +76,7 @@ static int __wx_enable_sriov(struct wx *wx,...
1b45443b84872c010b36dfc2681413bb1a10011a
Analyze and fix the following issue in the Linux kernel code: net: hibmcge: fix wrong ndo.open() after reset fail issue.
Problem Details: If the driver reset fails, it may not work properly. Therefore, the ndo.open() operation should be rejected. In this patch, the driver calls netif_device_detach() before the reset and calls netif_device_attach() after the reset succeeds. If the reset fails, netif_device_attach() is not called. Therefo...
```diff diff --git a/drivers/net/ethernet/hisilicon/hibmcge/hbg_err.c b/drivers/net/ethernet/hisilicon/hibmcge/hbg_err.c index a0bcfb5a713d..ff3295b60a69 100644 --- a/drivers/net/ethernet/hisilicon/hibmcge/hbg_err.c +++ b/drivers/net/ethernet/hisilicon/hibmcge/hbg_err.c @@ -61,6 +61,8 @@ static int hbg_reset_prepare(st...
009970506c92816c857e1705cf6db68c9147d39f
Analyze and fix the following issue in the Linux kernel code: net: hibmcge: fix incorrect statistics update issue
Problem Details: When the user dumps statistics, the hibmcge driver automatically updates all statistics. If the driver is performing the reset operation, the error data of 0xFFFFFFFF is updated. Therefore, if the driver is resetting, the hbg_update_stats_by_info() needs to return directly. Fixes: c0bf9bf31e79 ("net:...
```diff diff --git a/drivers/net/ethernet/hisilicon/hibmcge/hbg_ethtool.c b/drivers/net/ethernet/hisilicon/hibmcge/hbg_ethtool.c index 8f1107b85fbb..55520053270a 100644 --- a/drivers/net/ethernet/hisilicon/hibmcge/hbg_ethtool.c +++ b/drivers/net/ethernet/hisilicon/hibmcge/hbg_ethtool.c @@ -317,6 +317,9 @@ static void h...
a5bd029c733b8ae790d5873e2afeb88b58e3a151
Analyze and fix the following issue in the Linux kernel code: net: add skb_crc32c()
Problem Details: Add skb_crc32c(), which calculates the CRC32C of a sk_buff. It will replace __skb_checksum(), which unnecessarily supports arbitrary checksums. Compared to __skb_checksum(), skb_crc32c(): - Uses the correct type for CRC32C values (u32, not __wsum). - Does not require the caller to provide a s...
```diff diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index c7397b17bb08..7ccc6356acac 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -4203,6 +4203,7 @@ __wsum __skb_checksum(const struct sk_buff *skb, int offset, int len, __wsum csum, const struct skb_checksum_ops *ops); _...
6c9ab811871bc9a08e9cd4b96371a60667fa9ec8
Analyze and fix the following issue in the Linux kernel code: arm64: defconfig: Ensure CRYPTO_CHACHA20_NEON is selected
Problem Details: Since commit 17ec3e71ba79 ("crypto: lib/Kconfig - Hide arch options from user"), the CRYPTO_CHACHA20_NEON option is no longer selected by default due to changes in how crypto library options are exposed and selected. To restore the previous behavior and ensure CRYPTO_CHACHA20_NEON is enabled, explicit...
```diff diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 5bb8f09422a2..c4ce2c67c0e0 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -1729,12 +1729,12 @@ CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y CONFIG_SECURITY=y CONFIG_CRYPTO_USER=y +CONFIG_CRYPTO...
f1706e0e1a74b095cbc60375b9b1e6205f5f4c98
Analyze and fix the following issue in the Linux kernel code: soc: aspeed: Add NULL check in aspeed_lpc_enable_snoop()
Problem Details: devm_kasprintf() returns NULL when memory allocation fails. Currently, aspeed_lpc_enable_snoop() does not check for this case, which results in a NULL pointer dereference. Add NULL check after devm_kasprintf() to prevent this issue. Fixes: 3772e5da4454 ("drivers/misc: Aspeed LPC snoop output using mi...
```diff diff --git a/drivers/soc/aspeed/aspeed-lpc-snoop.c b/drivers/soc/aspeed/aspeed-lpc-snoop.c index 57ba855f375d..ef8f355589a5 100644 --- a/drivers/soc/aspeed/aspeed-lpc-snoop.c +++ b/drivers/soc/aspeed/aspeed-lpc-snoop.c @@ -200,11 +200,15 @@ static int aspeed_lpc_enable_snoop(struct aspeed_lpc_snoop *lpc_snoop, ...
d9f0a97e859bdcef51f9c187b1eb712eb13fd3ff
Analyze and fix the following issue in the Linux kernel code: soc: aspeed: lpc: Fix impossible judgment condition
Problem Details: smatch error: drivers/soc/aspeed/aspeed-lpc-snoop.c:169 aspeed_lpc_snoop_config_irq() warn: platform_get_irq() does not return zero platform_get_irq() return non-zero IRQ number or negative error code, change '!lpc_snoop->irq' to 'lpc_snoop->irq < 0' to fix this. Fixes: 9f4f9ae81d0a ("drivers/misc: a...
```diff diff --git a/drivers/soc/aspeed/aspeed-lpc-snoop.c b/drivers/soc/aspeed/aspeed-lpc-snoop.c index 9ab5ba9cf1d6..57ba855f375d 100644 --- a/drivers/soc/aspeed/aspeed-lpc-snoop.c +++ b/drivers/soc/aspeed/aspeed-lpc-snoop.c @@ -166,7 +166,7 @@ static int aspeed_lpc_snoop_config_irq(struct aspeed_lpc_snoop *lpc_snoop...
e4f59f873c3ffe2a0150e11115a83e2dfb671dbf
Analyze and fix the following issue in the Linux kernel code: ARM: aspeed: Don't select SRAM
Problem Details: The ASPEED devices have SRAM, but don't require it for basic function (or any function; there's no known users of the driver). Fixes: 8c2ed9bcfbeb ("arm: Add Aspeed machine") Signed-off-by: Joel Stanley <joel@jms.id.au> Link: https://patch.msgid.link/20250115103942.421429-1-joel@jms.id.au Signed-off-b...
```diff diff --git a/arch/arm/mach-aspeed/Kconfig b/arch/arm/mach-aspeed/Kconfig index 080019aa6fcd..fcf287edd0e5 100644 --- a/arch/arm/mach-aspeed/Kconfig +++ b/arch/arm/mach-aspeed/Kconfig @@ -2,7 +2,6 @@ menuconfig ARCH_ASPEED bool "Aspeed BMC architectures" depends on (CPU_LITTLE_ENDIAN && ARCH_MULTI_V5) || AR...
886bb3624e4c9914a943b63fcfdf30b8d2f2b66e
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: fix regdomain update failure when connection establishes
Problem Details: Commit 7ed3e88664e3 ("wifi: ath12k: update regulatory rules when connection established") introduced a call to ath12k_reg_handle_chan_list() upon connection to update the regulatory domain in cfg80211 based on the power type received from the AP. However, this update fails because ah->regd_updated was...
```diff diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 755546246915..88b59f3ff87a 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -5860,6 +5860,7 @@ static int ath12k_mac_handle_link_sta_state(struct ieee80211_hw *hw, ...
37e775a0a9d79a031d28d9e21480f99f448e9215
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: fix regdomain update failure when adding interface
Problem Details: Commit 4c546023d71a ("wifi: ath12k: update regulatory rules when interface added"), introduced a call to ath12k_reg_handle_chan_list() during interface addition to update the regulatory domain based on the interface type. While this works initially, subsequent updates (e.g., after an interface delete/r...
```diff diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 81ff32d2ce5a..755546246915 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -8833,6 +8833,7 @@ static int ath12k_mac_op_add_interface(struct ieee80211_hw *hw, ab =...
d662c14a51910ba0ad66afd248b601ba30b9f7f1
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: fix regdomain update failure after 11D scan completes
Problem Details: In the current implementation of ath12k_regd_update(), the ah->regd_updated flag is used to ensure that the regulatory domain is updated only once per radio. During MAC registration, this function is called to push the default regulatory domain to cfg80211. At that point, the hardware state is not on a...
```diff diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c index 72e7730c7694..60e2444fe08c 100644 --- a/drivers/net/wireless/ath/ath12k/wmi.c +++ b/drivers/net/wireless/ath/ath12k/wmi.c @@ -6125,6 +6125,7 @@ static int ath12k_reg_11d_new_cc_event(struct ath12k_base *ab, struct s...
9172dbf3a6d30fb80aa2f550003961450bb4c0bb
Analyze and fix the following issue in the Linux kernel code: ublk: handle ublk_set_auto_buf_reg() failure correctly in ublk_fetch()
Problem Details: If ublk_set_auto_buf_reg() fails, we need to unlock and return, otherwise `ub->mutex` is leaked. Fixes: 99c1e4eb6a3f ("ublk: register buffer to local io_uring with provided buf index via UBLK_F_AUTO_BUF_REG") Reported-by: Caleb Sander Mateos <csander@purestorage.com> Signed-off-by: Ming Lei <ming.lei@...
```diff diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c index 2474788ef263..7a78b735c12f 100644 --- a/drivers/block/ublk_drv.c +++ b/drivers/block/ublk_drv.c @@ -2075,7 +2075,7 @@ static int ublk_fetch(struct io_uring_cmd *cmd, struct ublk_queue *ubq, if (ublk_support_auto_buf_reg(ubq)) { ret = ub...
1da98dc52b948a6063415d8bae0c60ef89044a8c
Analyze and fix the following issue in the Linux kernel code: cpufreq: Update sscanf() to kstrtouint()
Problem Details: In store_scaling_setspeed(), sscanf is still used to read to sysfs. Newer kstrtox provide more features including overflow protection, better errorhandling and allows for other systems of numeration. It is therefore better to update sscanf() to kstrtouint(). Signed-off-by: Bowen Yu <yubowen8@huawei.co...
```diff diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index fbd09c0845ff..d7426e1d8bdd 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -917,9 +917,9 @@ static ssize_t store_scaling_setspeed(struct cpufreq_policy *policy, if (!policy->governor || !policy->governor->store_...
9c5075fc9d322670d4a82881bf41922a90fe423a
Analyze and fix the following issue in the Linux kernel code: cpufreq: Replace magic number
Problem Details: Setting the length of str_governor with a magic number could cause overflow when max length increases, it is better to use the defined macro in this case. Signed-off-by: Bowen Yu <yubowen8@huawei.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Link: https://patch.msgid.link/20250519070908.930879...
```diff diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index cb475ac5b618..fbd09c0845ff 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -806,7 +806,7 @@ static ssize_t show_scaling_governor(struct cpufreq_policy *policy, char *buf) static ssize_t store_scaling_governor(str...
8b8762eeec59b959fbca60afffe21265bce67168
Analyze and fix the following issue in the Linux kernel code: tools: ynl-gen: add makefile deps for neigh
Problem Details: Kory is reporting build issues after recent additions to YNL if the system headers are old. Link: https://lore.kernel.org/20250519164949.597d6e92@kmaincent-XPS-13-7390 Reported-by: Kory Maincent <kory.maincent@bootlin.com> Fixes: 0939a418b3b0 ("tools: ynl: submsg: reverse parse / error reporting") Tes...
```diff diff --git a/include/uapi/linux/neighbour.h b/include/uapi/linux/neighbour.h index 5e67a7eaf4a7..b851c36ad25d 100644 --- a/include/uapi/linux/neighbour.h +++ b/include/uapi/linux/neighbour.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -#ifndef __LINUX_NEIGHBOUR_H -#define __L...
21fb366b2f45761125230e89a73c0fe29d55d9cf
Analyze and fix the following issue in the Linux kernel code: perf test amd: Skip amd-ibs-period test on kernel < v6.15
Problem Details: Bunch of IBS kernel fixes went in v6.15-rc1 [1]. The amd-ibs-period test will fail without those kernel patches. Skip the test on system running kernel older than v6.15 to distinguish genuine new failures vs known failure due to old kernel. Since all the related IBS fixes went in -rc1 itself, the ">...
```diff diff --git a/tools/perf/arch/x86/tests/amd-ibs-period.c b/tools/perf/arch/x86/tests/amd-ibs-period.c index 7c77d86f369d..223e059e04de 100644 --- a/tools/perf/arch/x86/tests/amd-ibs-period.c +++ b/tools/perf/arch/x86/tests/amd-ibs-period.c @@ -3,6 +3,7 @@ #include <sys/syscall.h> #include <sys/mman.h> #includ...
6fe064491bd3433ce42b04d5b933eb368c48271e
Analyze and fix the following issue in the Linux kernel code: perf rwsem: Add clang's -Wthread-safety annotations
Problem Details: Add annotations used by clang's -Wthread-safety. Fix dsos compilation errors caused by a lock of annotations. Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.vnet.i...
```diff diff --git a/tools/perf/util/dsos.c b/tools/perf/util/dsos.c index e0998e2a7c4e..4d213017d202 100644 --- a/tools/perf/util/dsos.c +++ b/tools/perf/util/dsos.c @@ -157,6 +157,7 @@ static struct dso *__dsos__find_by_longname_id(struct dsos *dsos, const char *name, const struct dso_id *id...
c164679bed3a5f0d235723c2395d9a5122b151c4
Analyze and fix the following issue in the Linux kernel code: scripts/gdb/symbols: determine KASLR offset on s390 during early boot
Problem Details: Using lx-symbols during s390 early boot fails with: Error occurred in Python: 'utf-8' codec can't decode byte 0xcb in position 0: invalid continuation byte The reason is that s390 decompressor's startup_kernel() does not create vmcoreinfo note, and sets vmcore_info to kernel's physical base. Thi...
```diff diff --git a/scripts/gdb/linux/symbols.py b/scripts/gdb/linux/symbols.py index 0c7af712c44c..2332bd8eddf1 100644 --- a/scripts/gdb/linux/symbols.py +++ b/scripts/gdb/linux/symbols.py @@ -54,6 +54,18 @@ def get_vmcore_s390(): vmcore_info = 0x0e0c paddr_vmcoreinfo_note = gdb.parse_and_eval("*(un...
d82893c52a64dd5698362ba1d7cb232a18839c87
Analyze and fix the following issue in the Linux kernel code: fork: check charging success before zeroing stack
Problem Details: No need to do zero cached stack if memcg charge fails, so move the charging attempt before the memset operation. [linus.walleij@linaro.org: rebased] Link: https://lkml.kernel.org/r/20250509-fork-fixes-v3-3-e6c69dd356f2@linaro.org Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com> Link: https://...
```diff diff --git a/kernel/fork.c b/kernel/fork.c index 8b8457562740..d6907c49ee87 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -280,6 +280,11 @@ static int alloc_thread_stack_node(struct task_struct *tsk, int node) if (!vm_area) continue; + if (memcg_charge_kernel_stack(vm_area)) { + vfree(vm_area->a...
90eb270d8eb46c2d54a13b938643fbc9cf56eaea
Analyze and fix the following issue in the Linux kernel code: fork: clean-up naming of vm_stack/vm_struct variables in vmap stacks code
Problem Details: There are two data types: "struct vm_struct" and "struct vm_stack" that have the same local variable names: vm_stack, or vm, or s, which makes the code confusing to read. Change the code so the naming is consistent: struct vm_struct is always called vm_area struct vm_stack is always called vm_stack ...
```diff diff --git a/kernel/fork.c b/kernel/fork.c index 7b9e1ad141ba..8b8457562740 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -198,14 +198,14 @@ struct vm_stack { struct vm_struct *stack_vm_area; }; -static bool try_release_thread_stack_to_cache(struct vm_struct *vm) +static bool try_release_thread_stack_t...
85e1f758b6d770c9d9a7c7de4937e2eb2c200aea
Analyze and fix the following issue in the Linux kernel code: fork: clean-up ifdef logic around stack allocation
Problem Details: Patch series "fork: Page operation cleanups in the fork code", v3. This patchset consists of outtakes from a 1 year+ old patchset from Pasha, which all stand on their own. See: https://lore.kernel.org/all/20240311164638.2015063-1-pasha.tatashin@soleen.com/ These are good cleanups for readability so ...
```diff diff --git a/kernel/fork.c b/kernel/fork.c index c4b26cd8998b..7b9e1ad141ba 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -185,13 +185,7 @@ static inline void free_task_struct(struct task_struct *tsk) kmem_cache_free(task_struct_cachep, tsk); } -/* - * Allocate pages if THREAD_SIZE is >= PAGE_SIZE, oth...
aaf05e96e93cb9c8fc8d35fc4525715530397655
Analyze and fix the following issue in the Linux kernel code: kernel/watchdog: add /sys/kernel/{hard,soft}lockup_count
Problem Details: Patch series "sysfs: add counters for lockups and stalls", v2. Commits 9db89b411170 ("exit: Expose "oops_count" to sysfs") and 8b05aa263361 ("panic: Expose "warn_count" to sysfs") added counters for oopses and warnings to sysfs, and these two patches do the same for hard/soft lockups and RCU stalls. ...
```diff diff --git a/Documentation/ABI/testing/sysfs-kernel-hardlockup_count b/Documentation/ABI/testing/sysfs-kernel-hardlockup_count new file mode 100644 index 000000000000..dfdd4078b077 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-kernel-hardlockup_count @@ -0,0 +1,7 @@ +What: /sys/kernel/hardlockup_count +D...
e17c1f15b0ccfa4802cedbd464d00ece50a10cf1
Analyze and fix the following issue in the Linux kernel code: kmsan: enter the runtime around kmsan_internal_memmove_metadata() call
Problem Details: kmsan_internal_memmove_metadata() transitively calls stack_depot_save() (via kmsan_internal_chain_origin() and kmsan_save_stack_with_flags()), which may allocate memory. Guard it with kmsan_enter_runtime() and kmsan_leave_runtime() to avoid recursion. This bug was spotted by CONFIG_WARN_CAPABILITY_AN...
```diff diff --git a/mm/kmsan/hooks.c b/mm/kmsan/hooks.c index 05f2faa54054..97de3d6194f0 100644 --- a/mm/kmsan/hooks.c +++ b/mm/kmsan/hooks.c @@ -275,8 +275,10 @@ void kmsan_copy_to_user(void __user *to, const void *from, size_t to_copy, * Don't check anything, just copy the shadow of the copied * bytes. *...
8312ab31d362fcb6d68f1f2da4d1e89bc5d3f48c
Analyze and fix the following issue in the Linux kernel code: kmsan: fix usage of kmsan_enter_runtime() in kmsan_vmap_pages_range_noflush()
Problem Details: Only enter the runtime to call __vmap_pages_range_noflush(), so that error handling does not skip kmsan_leave_runtime(). This bug was spotted by CONFIG_WARN_CAPABILITY_ANALYSIS=y Link: https://lkml.kernel.org/r/20250507160012.3311104-2-glider@google.com Signed-off-by: Alexander Potapenko <glider@goog...
```diff diff --git a/mm/kmsan/shadow.c b/mm/kmsan/shadow.c index 6d32bfc18d6a..54f3c3c962f0 100644 --- a/mm/kmsan/shadow.c +++ b/mm/kmsan/shadow.c @@ -247,17 +247,19 @@ int kmsan_vmap_pages_range_noflush(unsigned long start, unsigned long end, kmsan_enter_runtime(); mapped = __vmap_pages_range_noflush(shadow_start,...
1c1db467068d5e57e58756666f7dc54c9dda9b2c
Analyze and fix the following issue in the Linux kernel code: kmsan: apply clang-format to files mm/kmsan/
Problem Details: KMSAN source files are expected to be formatted with clang-format, fix some nits that slipped in. No functional change. Link: https://lkml.kernel.org/r/20250507160012.3311104-1-glider@google.com Signed-off-by: Alexander Potapenko <glider@google.com> Cc: Ilya Leoshkevich <iii@linux.ibm.com> Cc: Bart v...
```diff diff --git a/mm/kmsan/core.c b/mm/kmsan/core.c index a495debf1436..a97dc90fa6a9 100644 --- a/mm/kmsan/core.c +++ b/mm/kmsan/core.c @@ -159,8 +159,8 @@ depot_stack_handle_t kmsan_internal_chain_origin(depot_stack_handle_t id) * Make sure we have enough spare bits in @id to hold the UAF bit and * the chain ...
e341f9c3c8412e57fe0042a33a2640245ecdf619
Analyze and fix the following issue in the Linux kernel code: mm/mempolicy: Weighted Interleave Auto-tuning
Problem Details: On machines with multiple memory nodes, interleaving page allocations across nodes allows for better utilization of each node's bandwidth. Previous work by Gregory Price [1] introduced weighted interleave, which allowed for pages to be allocated across nodes according to user-set ratios. Ideally, the...
```diff diff --git a/Documentation/ABI/testing/sysfs-kernel-mm-mempolicy-weighted-interleave b/Documentation/ABI/testing/sysfs-kernel-mm-mempolicy-weighted-interleave index 0b7972de04e9..649c0e9b895c 100644 --- a/Documentation/ABI/testing/sysfs-kernel-mm-mempolicy-weighted-interleave +++ b/Documentation/ABI/testing/sys...
772e50a76ee664e75581624f512df4e45582605a
Analyze and fix the following issue in the Linux kernel code: kunit: Fix wrong parameter to kunit_deactivate_static_stub()
Problem Details: kunit_deactivate_static_stub() accepts real_fn_addr instead of replacement_addr. In the case, it always passes NULL to kunit_deactivate_static_stub(). Fix it. Link: https://lore.kernel.org/r/20250520082050.2254875-1-tzungbi@kernel.org Fixes: e047c5eaa763 ("kunit: Expose 'static stub' API to redirect...
```diff diff --git a/lib/kunit/static_stub.c b/lib/kunit/static_stub.c index 92b2cccd5e76..484fd85251b4 100644 --- a/lib/kunit/static_stub.c +++ b/lib/kunit/static_stub.c @@ -96,7 +96,7 @@ void __kunit_activate_static_stub(struct kunit *test, /* If the replacement address is NULL, deactivate the stub. */ if (!rep...
a510bb87da72aa8d1504b0e4b343cfe013ee8a89
Analyze and fix the following issue in the Linux kernel code: genirq/irqdesc: Remove double locking in hwirq_show()
Problem Details: &desc->lock is acquired on 2 consecutive lines in hwirq_show(). This leads obviously to a deadlock. Drop the raw_spin_lock_irq() and keep guard(). Fixes: 5d964a9f7cd8 ("genirq/irqdesc: Switch to lock guards") Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> Signed-off-by: Thomas Gleixn...
```diff diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c index 6d006a68ff85..b64c57b44c20 100644 --- a/kernel/irq/irqdesc.c +++ b/kernel/irq/irqdesc.c @@ -281,7 +281,6 @@ static ssize_t hwirq_show(struct kobject *kobj, struct kobj_attribute *attr, cha struct irq_desc *desc = container_of(kobj, struct irq_desc...
92cd405b648605db4da866f3b9818b271ae84ef0
Analyze and fix the following issue in the Linux kernel code: USB: serial: bus: fix const issue in usb_serial_device_match()
Problem Details: usb_serial_device_match() takes a const pointer, and then decides to cast it away into a non-const one, which is not a good thing to do overall. Fix this up by properly setting the pointers to be const to preserve that attribute. Fixes: d69d80484598 ("driver core: have match() callback in struct bus_...
```diff diff --git a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c index 2fea1b1db4a2..9e2a18c0b218 100644 --- a/drivers/usb/serial/bus.c +++ b/drivers/usb/serial/bus.c @@ -17,7 +17,7 @@ static int usb_serial_device_match(struct device *dev, const struct device_driver *drv) { const struct usb_serial_po...
23205562ffc8de20f57afdd984858cab29e77968
Analyze and fix the following issue in the Linux kernel code: Bluetooth: separate CIS_LINK and BIS_LINK link types
Problem Details: Use separate link type id for unicast and broadcast ISO connections. These connection types are handled with separate HCI commands, socket API is different, and hci_conn has union fields that are different in the two cases, so they shall not be mixed up. Currently in most places it is attempted to dis...
```diff diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 2502febf4da7..82cbd54443ac 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h @@ -558,7 +558,8 @@ enum { #define ESCO_LINK 0x02 /* Low Energy links do not have defined link type. Use invented one */ #define L...
5bd5c716f7ec3e25d8d3b8a7566e192a26f9c7ce
Analyze and fix the following issue in the Linux kernel code: Bluetooth: btusb: Add new VID/PID 13d3/3630 for MT7925
Problem Details: Add VID 13d3 & PID 3630 for MediaTek MT7925 USB Bluetooth chip. The information in /sys/kernel/debug/usb/devices about the Bluetooth device is listed as the below. T: Bus=07 Lev=01 Prnt=01 Port=10 Cnt=02 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendo...
```diff diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 1dddc78e16ad..357b18dae8de 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -721,6 +721,8 @@ static const struct usb_device_id quirks_table[] = { BTUSB_WIDEBAND_SPEECH }, { USB_DEVICE(0x13d3, 0x3628),...
190377500fdefce2bda3bbd08409f4f4d813b2d1
Analyze and fix the following issue in the Linux kernel code: Bluetooth: btintel_pcie: Dump debug registers on error
Problem Details: Dumping debug registers on GP1 MSIx and error conditions, such as TX completion timeout, aiding in understanding the controller's state during errors. The register dump includes: - Boot stage - IPC control - IPC status - Mailbox registers HCI traces: = Vendor Diagnostic (len 199) 2d 2d 2d 2d 2...
```diff diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c index c23823e2a3ec..50fe17f1e1d1 100644 --- a/drivers/bluetooth/btintel_pcie.c +++ b/drivers/bluetooth/btintel_pcie.c @@ -208,6 +208,96 @@ static void btintel_pcie_prepare_tx(struct txq *txq, u16 tfd_index, memcpy(buf->data, skb-...
0a766a0affb563789a0ebaab41d68964ae94fc0e
Analyze and fix the following issue in the Linux kernel code: Bluetooth: ISO: Fix getpeername not returning sockaddr_iso_bc fields
Problem Details: If the socket is a broadcast receiver fields from sockaddr_iso_bc shall be part of the values returned to getpeername since some of these fields are updated while doing the PA and BIG sync procedures. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
```diff diff --git a/net/bluetooth/iso.c b/net/bluetooth/iso.c index 7c0012ce1b89..2f348f48e99d 100644 --- a/net/bluetooth/iso.c +++ b/net/bluetooth/iso.c @@ -1330,6 +1330,7 @@ static int iso_sock_getname(struct socket *sock, struct sockaddr *addr, { struct sockaddr_iso *sa = (struct sockaddr_iso *)addr; struct so...
e2d471b7806b09744d65a64bcf41337468f2443b
Analyze and fix the following issue in the Linux kernel code: Bluetooth: ISO: Fix not using SID from adv report
Problem Details: Up until now it has been assumed that the application would be able to enter the advertising SID in sockaddr_iso_bc.bc_sid, but userspace has no access to SID since the likes of MGMT_EV_DEVICE_FOUND cannot carry it, so it was left unset (0x00) which means it would be unable to synchronize if the broadc...
```diff diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 946d2ae551f8..c0207812f432 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -2070,6 +2070,8 @@ struct hci_conn *hci_pa_create_sync(struct hci_dev *hdev, bdaddr_t *dst, { struct hci_conn *conn; + bt_dev_dbg(hdev, "...
7d70989fcea7f79afe018a7e34d3486406c7a94e
Analyze and fix the following issue in the Linux kernel code: Bluetooth: btusb: Add HCI Drv commands for configuring altsetting
Problem Details: Although commit 75ddcd5ad40e ("Bluetooth: btusb: Configure altsetting for HCI_USER_CHANNEL") has enabled the HCI_USER_CHANNEL user to send out SCO data through USB Bluetooth chips, it's observed that with the patch HFP is flaky on most of the existing USB Bluetooth controllers: Intel chips sometimes se...
```diff diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 953b88449923..80670c845978 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -3801,12 +3801,31 @@ static ssize_t isoc_alt_store(struct device *dev, static DEVICE_ATTR_RW(isoc_alt); +#define BTUSB_HCI_DRV_OP_SUP...
04425292a62c15d1fde714522beaf8f3c2ed1de9
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Introduce HCI Driver protocol
Problem Details: Although commit 75ddcd5ad40e ("Bluetooth: btusb: Configure altsetting for HCI_USER_CHANNEL") has enabled the HCI_USER_CHANNEL user to send out SCO data through USB Bluetooth chips, it's observed that with the patch HFP is flaky on most of the existing USB Bluetooth controllers: Intel chips sometimes se...
```diff diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 47e08fa7db8f..953b88449923 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -21,6 +21,7 @@ #include <net/bluetooth/bluetooth.h> #include <net/bluetooth/hci_core.h> +#include <net/bluetooth/hci_drv.h> #includ...
c4dbb1bdada90168dd5fa2f7e4553cb0e1dad3c8
Analyze and fix the following issue in the Linux kernel code: Bluetooth: btusb: Add RTL8851BE device 0x0bda:0xb850
Problem Details: The information in /sys/kernel/debug/usb/devices about the Bluetooth device is listed as the below: T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0bda ProdID=b850 Rev= 0.00 S: Manufacturer=Realtek S: Product...
```diff diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 258aa5e23bdd..47e08fa7db8f 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -513,6 +513,7 @@ static const struct usb_device_id quirks_table[] = { BTUSB_WIDEBAND_SPEECH }, /* Realtek 8851BE Bluetooth...
bd3cb3c5aec80f70762c34fdd3068f07b212108e
Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_uart: Remove unnecessary NULL check before release_firmware()
Problem Details: release_firmware() checks for NULL pointers internally. Remove unneeded NULL check for fmw here. Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
```diff diff --git a/drivers/bluetooth/hci_aml.c b/drivers/bluetooth/hci_aml.c index dc9541e76d81..1394c575aa6d 100644 --- a/drivers/bluetooth/hci_aml.c +++ b/drivers/bluetooth/hci_aml.c @@ -313,8 +313,7 @@ static int aml_download_firmware(struct hci_dev *hdev, const char *fw_name) goto exit; exit: - if (firmware...
ee3e4209e66d44180a41d5ca7271361a2a28fccf
Analyze and fix the following issue in the Linux kernel code: Bluetooth: btmtksdio: Fix wakeup source leaks on device unbind
Problem Details: Device can be unbound or probe can fail, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
```diff diff --git a/drivers/bluetooth/btmtksdio.c b/drivers/bluetooth/btmtksdio.c index 1d26207b2ba7..c16a3518b8ff 100644 --- a/drivers/bluetooth/btmtksdio.c +++ b/drivers/bluetooth/btmtksdio.c @@ -1414,7 +1414,7 @@ static int btmtksdio_probe(struct sdio_func *func, */ pm_runtime_put_noidle(bdev->dev); - err = ...
ba6535e8b494931471df9666addf0f1e5e6efa27
Analyze and fix the following issue in the Linux kernel code: Bluetooth: btmrvl_sdio: Fix wakeup source leaks on device unbind
Problem Details: Device can be unbound or probe can fail, so driver must also release memory for the wakeup source. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
```diff diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c index 07cd308f7abf..93932a0d8625 100644 --- a/drivers/bluetooth/btmrvl_sdio.c +++ b/drivers/bluetooth/btmrvl_sdio.c @@ -100,7 +100,9 @@ static int btmrvl_sdio_probe_of(struct device *dev, } /* Configure wakeup (enabled by d...
bbf56029322c06a9227f09c2064f50278111159a
Analyze and fix the following issue in the Linux kernel code: Bluetooth: btusb: Add new VID/PID 13d3/3613 for MT7925
Problem Details: Add VID 13d3 & PID 3613 for MediaTek MT7925 USB Bluetooth chip. The information in /sys/kernel/debug/usb/devices about the Bluetooth device is listed as the below. T: Bus=01 Lev=02 Prnt=02 Port=02 Cnt=01 Dev#= 4 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendo...
```diff diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index a42dedb78e0a..258aa5e23bdd 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -716,6 +716,8 @@ static const struct usb_device_id quirks_table[] = { BTUSB_WIDEBAND_SPEECH }, { USB_DEVICE(0x13d3, 0x3608),...
582847f9702461b0a1cba3efdb2b8135bf940d53
Analyze and fix the following issue in the Linux kernel code: Makefile.kcov: apply needed compiler option unconditionally in CFLAGS_KCOV
Problem Details: Commit 852faf805539 ("gcc-plugins: remove SANCOV gcc plugin") removes the config CC_HAS_SANCOV_TRACE_PC, as all supported compilers include the compiler option '-fsanitize-coverage=trace-pc' by now. The commit however misses the important use of this config option in Makefile.kcov to add '-fsanitize-c...
```diff diff --git a/scripts/Makefile.kcov b/scripts/Makefile.kcov index 67de7942b3e7..01616472f43e 100644 --- a/scripts/Makefile.kcov +++ b/scripts/Makefile.kcov @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only -kcov-flags-$(CONFIG_CC_HAS_SANCOV_TRACE_PC) += -fsanitize-coverage=trace-pc +kcov-flags-y += -f...
3dcb524d785373fd43b129f01f32bd394fe167e0
Analyze and fix the following issue in the Linux kernel code: efi/efi_test: Fix missing pending status update in getwakeuptime
Problem Details: The pending status was not being passed to user space, leading to false test alarms when using the pending status. This patch ensures that the pending status is correctly updated and exposed to user space when calling getwakeuptime, preventing incorrect handling of the pending status. Signed-off-by: I...
```diff diff --git a/drivers/firmware/efi/test/efi_test.c b/drivers/firmware/efi/test/efi_test.c index 9e2628728aad..77b5f7ac3e20 100644 --- a/drivers/firmware/efi/test/efi_test.c +++ b/drivers/firmware/efi/test/efi_test.c @@ -361,6 +361,10 @@ static long efi_runtime_get_waketime(unsigned long arg) getwakeuptime...
869c788909b93a78ead1ca28c42b95eeb0779215
Analyze and fix the following issue in the Linux kernel code: selftests: harness: Stop using setjmp()/longjmp()
Problem Details: Usage of longjmp() was added to ensure that teardown is always run in commit 63e6b2a42342 ("selftests/harness: Run TEARDOWN for ASSERT failures") However instead of calling longjmp() to the teardown handler it is easier to just call the teardown handler directly from __bail(). Any potential duplicate t...
```diff diff --git a/tools/testing/selftests/kselftest_harness.h b/tools/testing/selftests/kselftest_harness.h index 088c875df91a..2925e47db995 100644 --- a/tools/testing/selftests/kselftest_harness.h +++ b/tools/testing/selftests/kselftest_harness.h @@ -67,7 +67,6 @@ #include <sys/types.h> #include <sys/wait.h> #in...
a6a054c8ad32b04c2e5d3cc5592fa737a2bb771f
Analyze and fix the following issue in the Linux kernel code: tools/nolibc: add target to check header usability
Problem Details: Each nolibc header should be valid for inclusion irrespective of any special ordering requirements. Add a new make target, based on the old kbuild "make header_check" target to validate this requirement. For now the check fails, but the following commits will fix the issues. Signed-off-by: Thomas We...
```diff diff --git a/tools/include/nolibc/Makefile b/tools/include/nolibc/Makefile index e05862cd0805..aa2c81d78ead 100644 --- a/tools/include/nolibc/Makefile +++ b/tools/include/nolibc/Makefile @@ -101,5 +101,14 @@ headers_standalone: headers $(Q)$(MAKE) -C $(srctree) headers $(Q)$(MAKE) -C $(srctree) headers_inst...
56764c845aa5be14cd53702fc9f2da23e25857de
Analyze and fix the following issue in the Linux kernel code: drm/i915/dp: Fix the enabling/disabling of audio SDP splitting
Problem Details: Adjust the enabling/disabling steps of the DP audio SDP splitting according to a recent Bspec update. This moves the enabling to the audio codec enable sequence after the transcoder is enabled and disables SDP splitting explicitly during the audio disable sequence. Bspec requires waiting for a vblank ...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b/drivers/gpu/drm/i915/display/intel_audio.c index 40d8bbd8107d..55af3a553c58 100644 --- a/drivers/gpu/drm/i915/display/intel_audio.c +++ b/drivers/gpu/drm/i915/display/intel_audio.c @@ -397,6 +397,19 @@ hsw_audio_config_update(struct intel_encoder *encode...
018f50909e66941916b5422ed7aee7475285b0c0
Analyze and fix the following issue in the Linux kernel code: iio: bmp280: zero-init buffer
Problem Details: Zero-initialize the buffer used with iio_push_to_buffers_with_ts(). The struct used for the buffer has holes in it, so we need to make sure that the holes are zeroed out rather than containing uninitialized data from the stack. Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore...
```diff diff --git a/drivers/iio/pressure/bmp280-core.c b/drivers/iio/pressure/bmp280-core.c index 5728cc18cced..f37f20776c89 100644 --- a/drivers/iio/pressure/bmp280-core.c +++ b/drivers/iio/pressure/bmp280-core.c @@ -1237,6 +1237,9 @@ static irqreturn_t bme280_trigger_handler(int irq, void *p) } buffer; int ret; ...
27737b8407585c0160063b9b39e888d486d86188
Analyze and fix the following issue in the Linux kernel code: HID: sensor-hub: Fix typo and improve documentation
Problem Details: Includes the following corrections - - Changed Measurment -> Measurement - Changed clode -> close - Gyro -> gyro Signed-off-by: Chelsy Ratnawat <chelsyratnawat2001@gmail.com> Reviewed-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20250507055745.4069933-1-chelsyratnawat200...
```diff diff --git a/include/linux/hid-sensor-hub.h b/include/linux/hid-sensor-hub.h index 0f9f7df865db..e71056553108 100644 --- a/include/linux/hid-sensor-hub.h +++ b/include/linux/hid-sensor-hub.h @@ -17,7 +17,7 @@ * @attrib_id: Attribute id for this attribute. * @report_id: Report id in which this information ...
805bbd3ac96dd66410d44b8ed1faa45f43ef1afb
Analyze and fix the following issue in the Linux kernel code: iio: chemical: mhz19b: Fix error code in probe()
Problem Details: Return -ENOMEM if devm_iio_device_alloc() fails. Don't return success. Fixes: 4572a70b3681 ("iio: chemical: Add support for Winsen MHZ19B CO2 sensor") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: David Lechner <dlechner@baylibre.com> Acked-by: Gyeyoung Baek <gye976@gmail.com> ...
```diff diff --git a/drivers/iio/chemical/mhz19b.c b/drivers/iio/chemical/mhz19b.c index c0052ba3ac6c..3c64154918b1 100644 --- a/drivers/iio/chemical/mhz19b.c +++ b/drivers/iio/chemical/mhz19b.c @@ -276,7 +276,7 @@ static int mhz19b_probe(struct serdev_device *serdev) indio_dev = devm_iio_device_alloc(dev, sizeof(*...
3c5dfea39a245b2dad869db24e2830aa299b1cf2
Analyze and fix the following issue in the Linux kernel code: iio: adc: ti-ads1298: Kconfig: add kfifo dependency to fix module build
Problem Details: Add dependency to Kconfig’s ti-ads1298 because compiling it as a module failed with an undefined kfifo symbol. Fixes: 00ef7708fa60 ("iio: adc: ti-ads1298: Add driver") Signed-off-by: Arthur-Prince <r2.arthur.prince@gmail.com> Co-developed-by: Mariana Valério <mariana.valerio2@hotmail.com> Signed-off-b...
```diff diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig index ad06cf556785..0fe6601e59ed 100644 --- a/drivers/iio/adc/Kconfig +++ b/drivers/iio/adc/Kconfig @@ -1562,6 +1562,7 @@ config TI_ADS1298 tristate "Texas Instruments ADS1298" depends on SPI select IIO_BUFFER + select IIO_KFIFO_BUF help ...
ce45446e520c85db022f8bcd7f0334b042ff3571
Analyze and fix the following issue in the Linux kernel code: iio: adc: ad4000: Avoid potential double data word read
Problem Details: Currently, SPI-Engine offload module always sends 32-bit data elements to DMA engine. Appropriately, when set for SPI offloading, the IIO driver uses 32 storagebits for IIO ADC channel buffer elements. However, setting SPI transfer length according to storagebits (32-bits in case of offload) can lead t...
```diff diff --git a/drivers/iio/adc/ad4000.c b/drivers/iio/adc/ad4000.c index 93ecaf401f27..5609a7845b6f 100644 --- a/drivers/iio/adc/ad4000.c +++ b/drivers/iio/adc/ad4000.c @@ -942,7 +942,7 @@ static int ad4000_prepare_3wire_mode_message(struct ad4000_state *st, xfers[0].cs_change_delay.unit = SPI_DELAY_UNIT_NSECS;...
f45a27b990a14c30e4edea7f3a427b03785b22c3
Analyze and fix the following issue in the Linux kernel code: iio: adc: mcp3911: add reset management
Problem Details: Add support for optional HW reset. If specified, a reset will be asserted during driver probe. Co-developed-by: Lukas Rauber <lukas.rauber@janitza.de> Signed-off-by: Lukas Rauber <lukas.rauber@janitza.de> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Reviewed-by: Andy Shevchenko <andriy...
```diff diff --git a/drivers/iio/adc/mcp3911.c b/drivers/iio/adc/mcp3911.c index 622d42550072..a6f21791c685 100644 --- a/drivers/iio/adc/mcp3911.c +++ b/drivers/iio/adc/mcp3911.c @@ -10,7 +10,9 @@ #include <linux/cleanup.h> #include <linux/clk.h> #include <linux/delay.h> +#include <linux/dev_printk.h> #include <lin...
94264cc9abbbec29c261bcb94aaaaa32e1535595
Analyze and fix the following issue in the Linux kernel code: dt-bindings: iio: adc: mcp3911: add reset-gpios
Problem Details: The MCP391X family provides an active low reset signal that is still not described in the bindings. Add reset-gpios to the bindings and the example. Co-developed-by: Lukas Rauber <lukas.rauber@janitza.de> Signed-off-by: Lukas Rauber <lukas.rauber@janitza.de> Signed-off-by: Marcus Folkesson <marcus.fo...
```diff diff --git a/Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml b/Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml index 06951ec5f5da..3a69ec60edb9 100644 --- a/Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml +++ b/Documentation/devicetree/bindings/iio/adc/microchi...
f62c49d8f32d6ce8871b01795498352775aa61db
Analyze and fix the following issue in the Linux kernel code: iio: adc: mcp3911: fix device dependent mappings for conversion result registers
Problem Details: The conversion result registers differs between devices. Make sure the mapping is correct by using a device dependent .get_raw() callback function. Fixes: 732ad34260d3 ("iio: adc: mcp3911: add support for the whole MCP39xx family") Co-developed-by: Lukas Rauber <lukas.rauber@janitza.de> Signed-off-by:...
```diff diff --git a/drivers/iio/adc/mcp3911.c b/drivers/iio/adc/mcp3911.c index be18635ae616..622d42550072 100644 --- a/drivers/iio/adc/mcp3911.c +++ b/drivers/iio/adc/mcp3911.c @@ -6,7 +6,7 @@ * Copyright (C) 2018 Kent Gustavsson <kent@minoris.se> */ #include <linux/bitfield.h> -#include <linux/bits.h> +#include...
7e00d74eacf77c98a60e7c754a9e5f73d8832095
Analyze and fix the following issue in the Linux kernel code: HID: sensor-hub: Fix typo and improve documentation for sensor_hub_remove_callback()
Problem Details: Fixed a typo in "registered" and improved grammar for better readability and consistency with kernel-doc standards. No functional changes. Signed-off-by: Chelsy Ratnawat <chelsyratnawat2001@gmail.com> Reviewed-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20250502003655.1943...
```diff diff --git a/include/linux/hid-sensor-hub.h b/include/linux/hid-sensor-hub.h index c27329e2a5ad..0f9f7df865db 100644 --- a/include/linux/hid-sensor-hub.h +++ b/include/linux/hid-sensor-hub.h @@ -128,12 +128,13 @@ int sensor_hub_register_callback(struct hid_sensor_hub_device *hsdev, struct hid_sensor_hub_cal...
413e1d6a95fcbbc048b6fce32c523e0a225275cb
Analyze and fix the following issue in the Linux kernel code: iio: adc: ad7606: explicit timestamp alignment
Problem Details: Use struct with aligned_s64 timestamp to make timestamp alignment explicit. Technically, what we have works because for all known architectures, IIO_DMA_MINALIGN is a multiple of __alignof__(s64). But this way, we don't have to make people read the comments to know why there are extra elements in each ...
```diff diff --git a/drivers/iio/adc/ad7606.h b/drivers/iio/adc/ad7606.h index 89d49551eaf5..441e62c521bc 100644 --- a/drivers/iio/adc/ad7606.h +++ b/drivers/iio/adc/ad7606.h @@ -155,12 +155,15 @@ struct ad7606_state { /* * DMA (thus cache coherency maintenance) may require the * transfer buffers to live in the...