id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
bb0c250e8e1132723795c1046442ceb01a5ed1b1 | Analyze and fix the following issue in the Linux kernel code: timers/migration: Temporarily disable per capacity hierarchies | Problem Details:
Some workloads with different CPU capacities consume more power with
timer migration than before. The recently introduced per capacity
hierarchies were supposed to alleviate this problem. However it appears
to also regress other types of workloads, especially when plenty of
capacities live together in ... | ```diff
diff --git a/kernel/time/timer_migration.c b/kernel/time/timer_migration.c
index 548d84955f4c..e9d96d96e251 100644
--- a/kernel/time/timer_migration.c
+++ b/kernel/time/timer_migration.c
@@ -1473,7 +1473,7 @@ static unsigned int tmigr_get_capacity(int cpu)
* timekeeper must then belong to the same hierarchy ... |
d647ebf5a5d50bf794e609b397d471e5b92a02ca | Analyze and fix the following issue in the Linux kernel code: hwmon: (pmbus/xdp720) Fix driver issues xdp720/730 | Problem Details:
Fix driver issues:
- Add the missing regulator and property files in include
- Declare XDP720_DEFAULT_RIMON as unsigned constant
- Declare struct pmbus_driver_info xdp720_info as constant
Signed-off-by: Ashish Yadav <ashish.yadav@infineon.com>
Link: https://lore.kernel.org/r/20260609072231.15486-4-Ash... | ```diff
diff --git a/drivers/hwmon/pmbus/xdp720.c b/drivers/hwmon/pmbus/xdp720.c
index 88f076e3d15b..5a162084f338 100644
--- a/drivers/hwmon/pmbus/xdp720.c
+++ b/drivers/hwmon/pmbus/xdp720.c
@@ -17,13 +17,15 @@
#include <linux/of_device.h>
#include <linux/bitops.h>
#include <linux/math64.h>
+#include <linux/property... |
7f8581c70a3bd50a932d3d2d253e99c5ec3eda74 | Analyze and fix the following issue in the Linux kernel code: hwmon: (it87) Clamp negative values to zero in set_fan() | Problem Details:
set_fan() parses user input with kstrtol() and passes the resulting
value to FAN16_TO_REG() on chips with 16-bit fan support.
Negative fan speeds are not meaningful and should be rejected before
conversion. Worst scenario, one may be able to abuse undefined
behaviour of signed overflow to possibly ind... | ```diff
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
index 5fd310662ee4..87edb1b6048b 100644
--- a/drivers/hwmon/it87.c
+++ b/drivers/hwmon/it87.c
@@ -1412,6 +1412,9 @@ static ssize_t set_fan(struct device *dev, struct device_attribute *attr,
if (kstrtol(buf, 10, &val) < 0)
return -EINVAL;
+ if (val ... |
eb0d491e2787aa359f0d930151ff6e5e5df70fb9 | Analyze and fix the following issue in the Linux kernel code: hwmon: (raspberrypi) Fix delayed-work teardown race | Problem Details:
The delayed polling work rearms itself from the work function, so use
explicit delayed-work setup and cleanup instead of
devm_delayed_work_autocancel().
Initialize the delayed work with INIT_DELAYED_WORK() and register a
devres cleanup action that calls disable_delayed_work_sync() during
teardown.
Th... | ```diff
diff --git a/drivers/hwmon/raspberrypi-hwmon.c b/drivers/hwmon/raspberrypi-hwmon.c
index a458a858b0ac..7b1d2829f012 100644
--- a/drivers/hwmon/raspberrypi-hwmon.c
+++ b/drivers/hwmon/raspberrypi-hwmon.c
@@ -8,7 +8,6 @@
* Copyright (C) 2026 Shubham Chakraborty <chakrabortyshubham66@gmail.com>
*/
#include <l... |
563d71205f86dff25c36e3911e3b5faebc9cf35f | Analyze and fix the following issue in the Linux kernel code: docs: hwmon: (coretemp) fix outdated documentation | Problem Details:
- Remove broken Intel wiki link; add Intel SDM download page link
- Fix description of tempX_max to clarify it is not Core2-only
- Correct tempX_label string for package temperature (changed in commit
2bc0e6d07ee5 ("hwmon: (coretemp) rearrange tjmax handing code"))
Signed-off-by: Roman Bakshansky <bak... | ```diff
diff --git a/Documentation/hwmon/coretemp.rst b/Documentation/hwmon/coretemp.rst
index 7a5fbb37b0f3..f63b21f24d42 100644
--- a/Documentation/hwmon/coretemp.rst
+++ b/Documentation/hwmon/coretemp.rst
@@ -22,8 +22,7 @@ Supported chips:
Intel 64 and IA-32 Architectures Software Developer's Manual
... |
6222b8aecc39c654dab1ec7b0b004ca7929cb8d9 | Analyze and fix the following issue in the Linux kernel code: Documentation: hwmon: fix typo in heading for max31730 | Problem Details:
Generated heading & link to driver doc for max31730 wrongly named
max31790 under hwmon docs. This patch fixes typo so link to max31730
is easily identifiable without confusion with max31790.
Signed-off-by: Hassan Maazu <maazudev@proton.me>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://l... | ```diff
diff --git a/Documentation/hwmon/max31730.rst b/Documentation/hwmon/max31730.rst
index 1c5a32b64187..0936ba2eac24 100644
--- a/Documentation/hwmon/max31730.rst
+++ b/Documentation/hwmon/max31730.rst
@@ -1,4 +1,4 @@
-Kernel driver max31790
+Kernel driver max31730
======================
Supported chips:
``` |
4edc7d45abc4b9bb6061818bdc1b75f2cf70f019 | Analyze and fix the following issue in the Linux kernel code: hwmon: (coretemp) fix coding style issues | Problem Details:
Address several coding style warnings reported by checkpatch.pl:
- Replace <asm/processor.h> with <linux/processor.h>
- Add missing blank lines after declarations
- Combine split quoted strings
- Reorder __initconst placement
No functional change.
Signed-off-by: Roman Bakshansky <bakshansky.lists@gma... | ```diff
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index c722b1d8e480..02b4e46d965b 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -25,7 +25,7 @@
#include <linux/moduleparam.h>
#include <linux/pci.h>
#include <asm/msr.h>
-#include <asm/processor.h>
+#include <linux/proc... |
a2b0986398e6dd952ab413f6dcd271ddf86ea9b8 | Analyze and fix the following issue in the Linux kernel code: hwmon: (ads7871) Convert to hwmon_device_register_with_info | Problem Details:
Convert the ads7871 driver from the legacy hwmon_device_register() to the
modern hwmon_device_register_with_info() API. This migration simplifies
the driver by using the structured hwmon_channel_info approach and
prepares the codebase for the transition to a shared DMA-safe buffer.
While at it, fix che... | ```diff
diff --git a/drivers/hwmon/ads7871.c b/drivers/hwmon/ads7871.c
index 9ee3ce01f130..805b3657362d 100644
--- a/drivers/hwmon/ads7871.c
+++ b/drivers/hwmon/ads7871.c
@@ -56,7 +56,6 @@
#include <linux/init.h>
#include <linux/spi/spi.h>
#include <linux/hwmon.h>
-#include <linux/hwmon-sysfs.h>
#include <linux/err... |
ee672fef23722f71d7bfa7d5a7f5822b1ca6cfa3 | Analyze and fix the following issue in the Linux kernel code: hwmon: (emc2305) Fix fan channel index handling | Problem Details:
The fan channel index is used to access per-channel data structures.
Validate the index against the number of available channels
before use to prevent out-of-bounds access if an invalid
value is provided.
The thermal registration path currently uses a sequential child index,
which may not match the va... | ```diff
diff --git a/drivers/hwmon/emc2305.c b/drivers/hwmon/emc2305.c
index 64b213e1451e..f71a0e265924 100644
--- a/drivers/hwmon/emc2305.c
+++ b/drivers/hwmon/emc2305.c
@@ -548,6 +548,12 @@ static int emc2305_of_parse_pwm_child(struct device *dev,
return ret;
}
+ if (ch >= data->pwm_num) {
+ dev_err(dev, "inv... |
c5d6cac28646b0d5d81ef632be748ae93c1f36c7 | Analyze and fix the following issue in the Linux kernel code: vfs: add FS_USERNS_DELEGATABLE flag and set it for NFS | Problem Details:
Commit e1c5ae59c0f2 ("fs: don't allow non-init s_user_ns for filesystems
without FS_USERNS_MOUNT") prevents the mount of any filesystem inside a
container that doesn't have FS_USERNS_MOUNT set.
This broke NFS mounts in our containerized environment. We have a daemon
somewhat like systemd-mountfsd runn... | ```diff
diff --git a/fs/nfs/fs_context.c b/fs/nfs/fs_context.c
index c105882edd16..1967de7d1dff 100644
--- a/fs/nfs/fs_context.c
+++ b/fs/nfs/fs_context.c
@@ -1769,7 +1769,9 @@ struct file_system_type nfs_fs_type = {
.init_fs_context = nfs_init_fs_context,
.parameters = nfs_fs_parameters,
.kill_sb = nfs_kill_su... |
2e05f3d6005d9aa3e2e423d2471f290d9ccbe3d2 | Analyze and fix the following issue in the Linux kernel code: memory: tegra186-emc: stop borrowing MC aggregate hook for EMC | Problem Details:
tegra186_emc_interconnect_init() copies the MC's ICC aggregate hook
into the EMC provider. That hook (tegra234_mc_icc_aggregate /
tegra264_mc_icc_aggregate) uses container_of() to recover 'mc',
which is only valid when the icc_provider is embedded in struct
tegra_mc. For an EMC node the provider is e... | ```diff
diff --git a/drivers/memory/tegra/tegra186-emc.c b/drivers/memory/tegra/tegra186-emc.c
index 03ebab6fbe68..f71265b303b9 100644
--- a/drivers/memory/tegra/tegra186-emc.c
+++ b/drivers/memory/tegra/tegra186-emc.c
@@ -258,15 +258,13 @@ static int tegra186_emc_icc_get_init_bw(struct icc_node *node, u32 *avg, u32 *p... |
dd0f9684d2f7d3f99aee63f5fa80562f2207b964 | Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Add BTF repeated field count overflow test | Problem Details:
Add a raw BTF test that exercises repeated special-field expansion with a
large array count. The compact element layout keeps the array byte size
representable while the repeated field count overflows the old u32 capacity
calculation in btf_repeat_fields().
Signed-off-by: Paul Moses <p@1g4.org>
Link: ... | ```diff
diff --git a/tools/testing/selftests/bpf/prog_tests/btf.c b/tools/testing/selftests/bpf/prog_tests/btf.c
index a9de328a8697..96f719a0cec9 100644
--- a/tools/testing/selftests/bpf/prog_tests/btf.c
+++ b/tools/testing/selftests/bpf/prog_tests/btf.c
@@ -4258,6 +4258,43 @@ static struct btf_raw_test raw_tests[] = {... |
b5befa80fdbe287a98480effed9564712924add5 | Analyze and fix the following issue in the Linux kernel code: fuse: re-lock request before returning from fuse_ref_folio() | Problem Details:
fuse_ref_folio() unlocks the request but does not re-lock it before
returning. fuse_chan_abort() can end the request and the async end
callback (eg fuse_writepage_free()) can free the args while the
subsequent copy chain logic after fuse_ref_folio() accesses them,
leading to use-after-free issues.
Fix... | ```diff
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 86b62a1d3746..b527d90ef74b 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -1106,7 +1106,7 @@ static int fuse_ref_folio(struct fuse_copy_state *cs, struct folio *folio,
cs->nr_segs++;
cs->len = 0;
- return 0;
+ return lock_request(cs->req);
}
/*
``` |
a078484921052d0badd827fcc2770b5cfc1d4120 | Analyze and fix the following issue in the Linux kernel code: fuse: re-lock request before replacing page cache folio | Problem Details:
fuse_try_move_folio() unlocks the request on entry but does not
re-lock it on the success path. This means fuse_chan_abort() can end the
request and free the fuse_io_args (eg fuse_readpages_end()) while the
subsequent copy chain logic after fuse_try_move_folio() accesses the
fuse_io_args, leading to us... | ```diff
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 05b6d15afe61..86b62a1d3746 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -1037,6 +1037,10 @@ static int fuse_try_move_folio(struct fuse_copy_state *cs, struct folio **foliop
if (WARN_ON(folio_test_mlocked(oldfolio)))
goto out_fallback_unlock;
+ err = l... |
60786bff19772504706d1a4034d911dc5a1f2010 | Analyze and fix the following issue in the Linux kernel code: fbdev: s3fb: Use strscpy() to copy strings into arrays | Problem Details:
Replacing strcpy() with strscpy() ensures that overflow of the target
buffer cannot happen.
Signed-off-by: David Laight <david.laight.linux@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de> | ```diff
diff --git a/drivers/video/fbdev/s3fb.c b/drivers/video/fbdev/s3fb.c
index dc1f9b627185..cecbac99c8e0 100644
--- a/drivers/video/fbdev/s3fb.c
+++ b/drivers/video/fbdev/s3fb.c
@@ -1333,7 +1333,7 @@ static int s3_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
vga_wcrt(par->state.vgabase, 0x38, c... |
d8421e09382cfe0bd2a044c8b0a822f64855dd4e | Analyze and fix the following issue in the Linux kernel code: fbdev: sm501fb: Fix buffer errors in OF binding code | Problem Details:
The code that gets the frame buffer mode from OF has 'use after free',
'buffer overrun' and memory leaks.
info->edid_data isn't free if the probe functions fail or if
pd->def_mode is set.
If both the CRT and PANEL are enabled info->edid_data is used after
being freed and is freed twice.
The string r... | ```diff
diff --git a/drivers/video/fbdev/sm501fb.c b/drivers/video/fbdev/sm501fb.c
index fee4b9f84592..ea5375ed4ea6 100644
--- a/drivers/video/fbdev/sm501fb.c
+++ b/drivers/video/fbdev/sm501fb.c
@@ -96,6 +96,7 @@ struct sm501fb_info {
void __iomem *fbmem; /* remapped framebuffer */
size_t fbmem_len; /* length ... |
470ea955a18c76eeb10ca11ffcb2fe923bfc5515 | Analyze and fix the following issue in the Linux kernel code: fbdev/arm: Export acorndata_8x8 font symbol for bootloader | Problem Details:
The text display code used in the Risc PC kernel image decompression
code uses arch/arm/boot/compressed/font.c, which includes
lib/fonts/font_acorn_8x8.c, which further includes <linux/font.h>.
Since commit 97df8960240a ("lib/fonts: Provide helpers for calculating
glyph pitch and size") <linux/font.h>... | ```diff
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index a159120d1e42..e3f550d62857 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -157,4 +157,4 @@ $(obj)/piggy_data: $(obj)/../Image FORCE
$(obj)/piggy.o: $(obj)/piggy_data
-CFLAGS_f... |
160b2ef00f2a1b066a520432282293ccec8c3b6b | Analyze and fix the following issue in the Linux kernel code: fbdev: sisfb: Replace strlen() strcpy() pair with strscpy() | Problem Details:
Use the result of strscpy() for the overflow check.
Signed-off-by: David Laight <david.laight.linux@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de> | ```diff
diff --git a/drivers/video/fbdev/sis/sis_main.c b/drivers/video/fbdev/sis/sis_main.c
index 84567d67f71d..95f976b49143 100644
--- a/drivers/video/fbdev/sis/sis_main.c
+++ b/drivers/video/fbdev/sis/sis_main.c
@@ -204,8 +204,7 @@ static void sisfb_search_mode(char *name, bool quiet)
return;
}
- if(strlen(na... |
7958e67375aa111522086286bba13cfc0816ce8d | Analyze and fix the following issue in the Linux kernel code: fbdev: omap2: fix use-after-free in omapfb_mmap | Problem Details:
omapfb_mmap() has a race condition with OMAPFB_SETUP_PLANE ioctl that
can lead to use-after-free:
The fb_mmap() entry point holds mm_lock but not lock (fb_info->lock),
while ioctl handlers like OMAPFB_SETUP_PLANE hold lock but not mm_lock.
This allows concurrent execution.
In omapfb_mmap():
1. rg = o... | ```diff
diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
index d70deb6a9150..046892682fc6 100644
--- a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
@@ -1099,7 +1099,11 @@ static int omapfb_mmap(struct fb_i... |
8f978fc45a906bb8683374d2159f0142a17d3828 | Analyze and fix the following issue in the Linux kernel code: docs: omap/dss: Fix stale modedb.c path | Problem Details:
The modedb.c file was moved from drivers/video/ to
drivers/video/fbdev/core/. Update the reference.
Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Costa Shulyupin <costa.shul@redhat.com>
Signed-off-by: Helge Deller <deller@gmx.de> | ```diff
diff --git a/Documentation/arch/arm/omap/dss.rst b/Documentation/arch/arm/omap/dss.rst
index a40c4d9c717a..9d39679235a3 100644
--- a/Documentation/arch/arm/omap/dss.rst
+++ b/Documentation/arch/arm/omap/dss.rst
@@ -314,7 +314,7 @@ Kernel boot arguments
omapfb.mode=<display>:<mode>[,...]
- Default video mod... |
7b8055831c1796d2be7eeeb00d4513f497c8390d | Analyze and fix the following issue in the Linux kernel code: fbdev: grvga: Fix CLUT register address offset in comment | Problem Details:
The comment does not match the actual address offset. According
to the GRLIB IP Library Reference Manual (p. 2119), the CLUT register
is at offset 0x28, not the value stated in the comment.
Signed-off-by: Eduardo Silva <eduardo4silva@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de> | ```diff
diff --git a/drivers/video/fbdev/grvga.c b/drivers/video/fbdev/grvga.c
index de8ab817d406..a6594bcd74e8 100644
--- a/drivers/video/fbdev/grvga.c
+++ b/drivers/video/fbdev/grvga.c
@@ -33,7 +33,7 @@ struct grvga_regs {
u32 line_length; /* 0x10 */
u32 fb_pos; /* 0x14 */
u32 clk_vector[4]; /* 0x18 */
- u32 c... |
537cd3082b9000b15a25e85152dd16967d9a1a94 | Analyze and fix the following issue in the Linux kernel code: fbdev: sunxvr2500: replace printk with device-aware logging functions | Problem Details:
Replace all printk() calls with appropriate device-aware logging
functions to properly associate log messages with the PCI device.
- Use pci_err() for errors where struct pci_dev is available
- Use pci_info() for info messages where struct pci_dev is available
Remove redundant 's3d:' prefix and pci_n... | ```diff
diff --git a/drivers/video/fbdev/sunxvr2500.c b/drivers/video/fbdev/sunxvr2500.c
index 42426d09b935..b7587ff4df85 100644
--- a/drivers/video/fbdev/sunxvr2500.c
+++ b/drivers/video/fbdev/sunxvr2500.c
@@ -38,8 +38,7 @@ static int s3d_get_props(struct s3d_info *sp)
sp->depth = of_getintprop_default(sp->of_node, ... |
5dbe5b65df0b0c0ec77492427c274b7b5011890e | Analyze and fix the following issue in the Linux kernel code: fbdev: sm712: Fix operator precedence in big_swap macro | Problem Details:
The big_swap(p) macro was intended to swap bytes within 16-bit halves
of a 32-bit value. However, because the bitwise shift operators (<<, >>)
have higher precedence than the bitwise AND operator (&), the original
code failed to perform any shifting on the masked bits.
For example, 'p & 0xff00ff00 >> ... | ```diff
diff --git a/drivers/video/fbdev/sm712.h b/drivers/video/fbdev/sm712.h
index c7ebf03b8d53..83fe25fc61f2 100644
--- a/drivers/video/fbdev/sm712.h
+++ b/drivers/video/fbdev/sm712.h
@@ -101,7 +101,7 @@ struct modeinit {
#define mmio_addr 0x00800000
#define seqw17() smtc_seqw(0x17, 0x30)
#define big_pixel_dept... |
26aad08a928901296aabfbc7a33ecb951656bb98 | Analyze and fix the following issue in the Linux kernel code: esp: fix page frag reference leak on skb_to_sgvec failure | Problem Details:
In esp_output_tail(), when esp->inplace is false, the old skb page frags
are replaced with a new page from the xfrm page_frag cache The source
scatterlist (sg) is built from the old frags before the replacement, and
esp_ssg_unref() is responsible for releasing the old page references
after the crypto o... | ```diff
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c
index 513c8215c947..dfc81ee969ae 100644
--- a/net/ipv4/esp4.c
+++ b/net/ipv4/esp4.c
@@ -96,7 +96,7 @@ static inline struct scatterlist *esp_req_sg(struct crypto_aead *aead,
__alignof__(struct scatterlist));
}
-static void esp_ssg_unref(struct xfrm_state... |
63abe299b12b317dfee5bcd09037da4668a4431a | Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: enable IEEE80211_VHT_EXT_NSS_BW_CAPABLE when NSS ratio is reported | Problem Details:
When firmware reports NSS ratio support, SUPPORTS_VHT_EXT_NSS_BW is enabled in
ath12k. However, IEEE80211_VHT_EXT_NSS_BW_CAPABLE must also be set to make the
advertisement valid.
According to IEEE Std 802.11-2024, Subclause 9.4.2.156.3 (Supported VHT-MCS and
NSS Set subfields), the VHT Extended NSS BW... | ```diff
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index a6e4b660da81..af354bef5c0d 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -8489,6 +8489,10 @@ ath12k_create_vht_cap(struct ath12k *ar, u32 rate_cap_tx_chainmask,
... |
fdea4d44e4b9c3f7021c85f8cd766e84e224472d | Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: fix EAPOL TX failure caused by stale tcl_metadata bits | Problem Details:
On WCN7850, after the following sequence:
1. load ath12k and connect to a non-MLO AP
2. disconnect and connect to an MLO AP
3. disconnect and reconnect to the non-MLO AP
the third connection always fails with a 4-Way handshake timeout. The
supplicant transmits message 2 of 4 four times in respo... | ```diff
diff --git a/drivers/net/wireless/ath/ath12k/dp.c b/drivers/net/wireless/ath/ath12k/dp.c
index 90802ed1aa59..af5f11fc1d84 100644
--- a/drivers/net/wireless/ath/ath12k/dp.c
+++ b/drivers/net/wireless/ath/ath12k/dp.c
@@ -943,11 +943,11 @@ void ath12k_dp_vdev_tx_attach(struct ath12k *ar, struct ath12k_link_vif *ar... |
898ab0f30e008e411ce93ddf81c4099abd9d4e46 | Analyze and fix the following issue in the Linux kernel code: pwm: rzg2l-gpt: Add missing newlines to dev_err_probe() messages | Problem Details:
dev_err_probe() internally calls dev_err() which uses pr_fmt() and
printk(). Kernel log messages should end with a newline character
to ensure proper log formatting. Add missing '\n' at the end of
the error strings in rzg2l_gpt_probe().
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https:... | ```diff
diff --git a/drivers/pwm/pwm-rzg2l-gpt.c b/drivers/pwm/pwm-rzg2l-gpt.c
index c9dfa59bc1ea..dfa1d11a48a8 100644
--- a/drivers/pwm/pwm-rzg2l-gpt.c
+++ b/drivers/pwm/pwm-rzg2l-gpt.c
@@ -408,14 +408,14 @@ static int rzg2l_gpt_probe(struct platform_device *pdev)
rate = clk_get_rate(clk);
if (!rate)
- return d... |
282305d7e9c0e27fd8b4df34b7cd5506a1eccdd6 | Analyze and fix the following issue in the Linux kernel code: PCI: mediatek: Fix operator precedence in PCIE_FTS_NUM_L0 macro | Problem Details:
The original PCIE_FTS_NUM_L0(x) macro was buggy due to improper operator
precedence, where ((x) & 0xff << 8) was evaluated as ((x) & 0xff00).
Instead of just fixing the parentheses, use the standard FIELD_PREP()
macro. This makes the code more robust by automatically handling masks
and shifts, while a... | ```diff
diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c
index 75722524fe74..dcfc7408340f 100644
--- a/drivers/pci/controller/pcie-mediatek.c
+++ b/drivers/pci/controller/pcie-mediatek.c
@@ -7,6 +7,7 @@
* Honghui Zhang <honghui.zhang@mediatek.com>
*/
+#include <linux... |
2b40d72de9354a76f5e3bb71230a4210eaa92849 | Analyze and fix the following issue in the Linux kernel code: pwm: rzg2l-gpt: Fix period_ticks type from u32 to u64 | Problem Details:
period_ticks is used to store PWM period values that can exceed the 32-bit
range, so change its type from u32 to u64 to prevent overflow.
Cc: stable@kernel.org
Fixes: 061f087f5d0b ("pwm: Add support for RZ/G2L GPT")
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://patch.msgid.link/20... | ```diff
diff --git a/drivers/pwm/pwm-rzg2l-gpt.c b/drivers/pwm/pwm-rzg2l-gpt.c
index 4856af080e8e..c9dfa59bc1ea 100644
--- a/drivers/pwm/pwm-rzg2l-gpt.c
+++ b/drivers/pwm/pwm-rzg2l-gpt.c
@@ -81,7 +81,7 @@ struct rzg2l_gpt_chip {
void __iomem *mmio;
struct mutex lock; /* lock to protect shared channel resources */
... |
881a3113b74964918cdd72747e3bc119c02b0c0c | Analyze and fix the following issue in the Linux kernel code: net: mctp: usb: don't fail mctp_usb_rx_queue on a deferred submission | Problem Details:
In the ndo_open path, a deferred queue open will report a failure, and
so the netdev will not be ndo_stop()ed, leaving us with the rx_retry
work potentially pending.
Don't report a deferred queue as an error, as we are still operational.
This means we use the ndo_stop() path for future cleanup, which ... | ```diff
diff --git a/drivers/net/mctp/mctp-usb.c b/drivers/net/mctp/mctp-usb.c
index cf6f6a93a451..fade65f2f269 100644
--- a/drivers/net/mctp/mctp-usb.c
+++ b/drivers/net/mctp/mctp-usb.c
@@ -154,7 +154,7 @@ err_retry:
if (!mctp_usb->rx_stopped)
schedule_delayed_work(&mctp_usb->rx_retry_work, RX_RETRY_DELAY);
spi... |
54665dce982689e2fd99b32e9a0dcc204fda8a51 | Analyze and fix the following issue in the Linux kernel code: net: mctp: usb: fix race between urb completion and rx_retry cancellation | Problem Details:
It's possible that sequencing between setting ->stopped and cancelling
the rx_retry work (in ndo_stop) could leave us with an urb queued:
T1: ndo_stop T2: rx_retry_work
------------ ----------------
LD: ->stopped => false
... | ```diff
diff --git a/drivers/net/mctp/mctp-usb.c b/drivers/net/mctp/mctp-usb.c
index 3b5dff144177..cf6f6a93a451 100644
--- a/drivers/net/mctp/mctp-usb.c
+++ b/drivers/net/mctp/mctp-usb.c
@@ -22,7 +22,6 @@
struct mctp_usb {
struct usb_device *usbdev;
struct usb_interface *intf;
- bool stopped;
struct net_device... |
a46f2e5720f5670feda145709d1f0d20be5c7263 | Analyze and fix the following issue in the Linux kernel code: gpio: mt7621: fix interrupt banks mapping on gpio chips | Problem Details:
The GPIO controller's registers are organized as sets of eight 32-bit
registers with each set controlling a bank of up to 32 pins. A single
interrupt is shared for all of the banks handled by the controller.
The driver implements this using three gpio chip instances every one
with its own irq chip. Eve... | ```diff
diff --git a/drivers/gpio/gpio-mt7621.c b/drivers/gpio/gpio-mt7621.c
index 91230be51587..a814885ccd5d 100644
--- a/drivers/gpio/gpio-mt7621.c
+++ b/drivers/gpio/gpio-mt7621.c
@@ -29,8 +29,8 @@
#define GPIO_REG_EDGE 0xA0
struct mtk_gc {
- struct irq_chip irq_chip;
struct gpio_generic_chip chip;
+ struct m... |
1c1e0fc88d6ef65bf15d517853251f75ab9d18c3 | Analyze and fix the following issue in the Linux kernel code: gpio: rockchip: fix generic IRQ chip leak on remove | Problem Details:
The driver allocates domain generic chips using
irq_alloc_domain_generic_chips() during probe. However, on driver
remove/teardown, the generic chips are not automatically freed when the
IRQ domain is removed because the domain flags do not include
IRQ_DOMAIN_FLAG_DESTROY_GC.
This causes both the domai... | ```diff
diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c
index bc97d5d5d329..9478a58f1caa 100644
--- a/drivers/gpio/gpio-rockchip.c
+++ b/drivers/gpio/gpio-rockchip.c
@@ -802,8 +802,10 @@ static void rockchip_gpio_remove(struct platform_device *pdev)
struct rockchip_pin_bank *bank = platform_g... |
3289d17b7a1321e103b8aec4ad82675c03c4764f | Analyze and fix the following issue in the Linux kernel code: ipv4: igmp: annotate data-races around timer-related fields | Problem Details:
/proc/net/igmp walks the multicast list locklessly under RCU and reads
timer-related fields (im->tm_running, im->reporter, im->timer.expires)
to print the timer state of multicast memberships. Concurrently, these
fields are modified under im->lock spinlock in timer management paths
(igmp_stop_timer(), ... | ```diff
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index fd0faf042fa6..b6337a47c141 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -220,8 +220,8 @@ static void igmp_stop_timer(struct ip_mc_list *im)
spin_lock_bh(&im->lock);
if (timer_delete(&im->timer))
refcount_dec(&im->refcnt);
- im->tm_running = 0;... |
1719841cab55d9da92b2e55b6e0c701e10201467 | Analyze and fix the following issue in the Linux kernel code: ipv4: igmp: annotate data-races around in_dev->mc_count | Problem Details:
/proc/net/igmp walks the multicast list for IPv4 interfaces locklessly
under RCU and prints state->in_dev->mc_count. Concurrently, device
init/destruction and multicast join/leave paths update the count
under the RTNL lock. Fix this intentional lockless snapshot by
annotating the read with READ_ONCE() ... | ```diff
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index f2aca659b29c..fd0faf042fa6 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -1566,7 +1566,7 @@ static void ____ip_mc_inc_group(struct in_device *in_dev, __be32 addr,
#endif
im->next_rcu = in_dev->mc_list;
- in_dev->mc_count++;
+ WRITE_ONCE(in_dev->m... |
6edb934de9bda3b7abcec856eaee6fc8b4278dd1 | Analyze and fix the following issue in the Linux kernel code: gpio: zynq: fix runtime PM leak on remove | Problem Details:
pm_runtime_get_sync() increments the runtime PM usage counter even when it
returns an error. zynq_gpio_remove() uses it to keep the controller active
while removing the GPIO chip, but never drops the usage counter again.
Balance the get with pm_runtime_put_noidle() after disabling runtime PM.
Fixes: ... | ```diff
diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c
index 571e366624d2..fafca91128b2 100644
--- a/drivers/gpio/gpio-zynq.c
+++ b/drivers/gpio/gpio-zynq.c
@@ -1014,6 +1014,7 @@ static void zynq_gpio_remove(struct platform_device *pdev)
gpiochip_remove(&gpio->chip);
device_set_wakeup_capable(&pde... |
004e9ecfe6c5384f9e0b2f6f6389d42ec22789af | Analyze and fix the following issue in the Linux kernel code: hv_netvsc: use kmap_local_page in netvsc_copy_to_send_buf | Problem Details:
netvsc_copy_to_send_buf() copies page buffer entries into the VMBus
send buffer using phys_to_virt() on the entry PFN. Entries for the
RNDIS header and the skb linear data come from kmalloc'd memory and
are always in the kernel direct map, but entries for skb fragments
reference page cache or user page... | ```diff
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index 59e95341f9b1..4d319c50955e 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -12,6 +12,7 @@
#include <linux/sched.h>
#include <linux/wait.h>
#include <linux/mm.h>
+#include <linux/highmem.h>
#include <li... |
5351cf8e96ee149c50fd19a882185907c92934df | Analyze and fix the following issue in the Linux kernel code: i2c: acpi: Return -ENOENT when no resources found in i2c_acpi_client_count() | Problem Details:
Some users want to return an error to the upper layers when
i2c_acpi_client_count() returns 0. Follow the common pattern
in such cases, i.e. return -ENOENT instead of 0.
While at it, fix the kernel-doc warning about missing return value
description.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@l... | ```diff
diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c
index 2cbd31f77667..b25e6b04e9d7 100644
--- a/drivers/i2c/i2c-core-acpi.c
+++ b/drivers/i2c/i2c-core-acpi.c
@@ -84,8 +84,11 @@ static int i2c_acpi_resource_count(struct acpi_resource *ares, void *data)
* i2c_acpi_client_count - Count the n... |
123fd13f35ccaf7d2b98f5a8cc6c8a3de378568d | Analyze and fix the following issue in the Linux kernel code: ALSA: aloop: Drop superfluous break | Problem Details:
At converting the spinlock to guard(), a break statement was put in
the scoped_guard block in loopback_jiffies_timer_function(), but it's
obviously superfluous (although it's harmless). Better to drop it for
avoiding confusion.
Fixes: 1ef2cb6b29c2 ("ALSA: aloop: Use guard() for spin locks")
Link: htt... | ```diff
diff --git a/sound/drivers/aloop.c b/sound/drivers/aloop.c
index a37a1695f51c..3f8488716a08 100644
--- a/sound/drivers/aloop.c
+++ b/sound/drivers/aloop.c
@@ -728,7 +728,6 @@ static void loopback_jiffies_timer_function(struct timer_list *t)
if (dpcm->period_update_pending) {
dpcm->period_update_pending... |
486f8298b6188ff11ef1f4be7f1d5d2e4d1b1fae | Analyze and fix the following issue in the Linux kernel code: btrfs: fix invalid pointer dereference in __btrfs_run_delayed_refs() | Problem Details:
In the beginning of the loop, we try to obtain a locked delayed ref head,
if 'locked_ref' is currently NULL, by calling btrfs_select_ref_head(),
which can return an error pointer. If the error pointer is -EAGAIN we do
a continue and go back to the beginning of the loop, which will not try
again to call... | ```diff
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index ecc1acb1e340..6030cdbdb742 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -2108,7 +2108,8 @@ static noinline int __btrfs_run_delayed_refs(struct btrfs_trans_handle *trans,
locked_ref = btrfs_select_ref_head(fs_info, dela... |
4f065ebdf8c5ad477dc7be57c76e0fcb50670a6c | Analyze and fix the following issue in the Linux kernel code: btrfs: tracepoints: add trace event for btrfs_record_new_subvolume() | Problem Details:
btrfs_record_new_subvolume() is an important operation that affects
inode logging and is called during subvolume creation. Add a trace event
for it to help debug issues.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David S... | ```diff
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 7f014e6be4b7..3f3c87f580b3 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -8024,6 +8024,8 @@ void btrfs_record_snapshot_destroy(struct btrfs_trans_handle *trans,
void btrfs_record_new_subvolume(const struct btrfs_trans_handle *trans,
... |
e1443032400a7e9d205c75730e8035e2db779231 | Analyze and fix the following issue in the Linux kernel code: btrfs: tracepoints: add trace event for btrfs_record_snapshot_destroy() | Problem Details:
btrfs_record_snapshot_destroy() is an important operation that affects
inode logging and is called during subvolume/snapshot deletion as well as
during rmdir. Add a trace event for it to help debug issues.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdman... | ```diff
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 627705faa851..7f014e6be4b7 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -8002,6 +8002,8 @@ void btrfs_record_unlink_dir(struct btrfs_trans_handle *trans,
void btrfs_record_snapshot_destroy(struct btrfs_trans_handle *trans,
st... |
bc620c48b51ef18ce9331ec0cc4301d3dc059ff3 | Analyze and fix the following issue in the Linux kernel code: btrfs: tracepoints: add trace event for btrfs_record_unlink_dir() | Problem Details:
btrfs_record_unlink_dir() is an important operation that affects inode
logging and is called during unlink and rename operations. Add a trace
event for it to help debug issues.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: ... | ```diff
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 2ed15485fe5a..627705faa851 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -7938,6 +7938,8 @@ void btrfs_record_unlink_dir(struct btrfs_trans_handle *trans,
struct btrfs_inode *dir, struct btrfs_inode *inode,
bool for_r... |
0360976d7ed5c69484d873afa34a22db4d04996f | Analyze and fix the following issue in the Linux kernel code: netconsole: close netdevice unregister window during target resume | Problem Details:
process_resume_target() removes the target from target_list before
calling resume_target() so that netpoll_setup() can run with interrupts
enabled, then re-adds it once setup completes. netpoll_setup() acquires a
net_device reference (netdev_hold()) and releases the RTNL before
returning.
While the ta... | ```diff
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 80c5393ffa1c..606e265cdfd7 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -335,6 +335,24 @@ static void process_resume_target(struct work_struct *work)
resume_target(nt);
+ /* netpoll_setup() took a net_device ... |
212a922bd54507ff18057b5872d552f4ef18ba0e | Analyze and fix the following issue in the Linux kernel code: netconsole: do not schedule skb pool refill from NMI | Problem Details:
When alloc_skb() fails in find_skb(), the fallback path dequeues an skb
from np->skb_pool and unconditionally calls schedule_work() to top the
pool back up. schedule_work() ends up taking the workqueue pool locks,
which are not NMI-safe.
netconsole_write() is registered as the nbcon write_atomic callb... | ```diff
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 8ecc2c71c699..918e4a9f4456 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -1654,6 +1654,23 @@ static struct notifier_block netconsole_netdev_notifier = {
.notifier_call = netconsole_netdev_event,
};
+/* Pop a p... |
7203abb3f8bd61e021cce076dafdda7bcfd9f2c2 | Analyze and fix the following issue in the Linux kernel code: selftests/livepatch: fix resource leak in test_klp_syscall init error path | Problem Details:
In livepatch_init(), if klp_enable_patch() fails, the previously
created kobject and sysfs file are never cleaned up, causing a
resource leak. Capture the return value and add proper cleanup
on the error path.
Signed-off-by: Rui Qi <qirui.001@bytedance.com>
Acked-by: Miroslav Benes <mbenes@suse.cz>
Re... | ```diff
diff --git a/tools/testing/selftests/livepatch/test_modules/test_klp_syscall.c b/tools/testing/selftests/livepatch/test_modules/test_klp_syscall.c
index 0630ffd9d9a1..08aacc0e14de 100644
--- a/tools/testing/selftests/livepatch/test_modules/test_klp_syscall.c
+++ b/tools/testing/selftests/livepatch/test_modules/... |
a7d35545c2ce11849de4b4397abaf664d79acd28 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7921: assert sniffer on chanctx change | Problem Details:
mt7921_change_chanctx() configures the channel for monitor vifs but
does not re-assert sniffer mode. mt7925_change_chanctx() does. Match
mt7925 by adding the missing mt7921_mcu_set_sniffer(true) call,
completing the architectural pattern from commit 914189af23b8 ("wifi:
mt76: mt7921: fix channel switch... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/main.c b/drivers/net/wireless/mediatek/mt76/mt7921/main.c
index 0e19ba2b094d..3480205d5fb9 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/main.c
@@ -1417,10 +1417,12 @@ mt7921_change_chanctx(str... |
09a5bf856aa759513afc4afd233d15bcc711b84e | Analyze and fix the following issue in the Linux kernel code: octeontx2-af: fix memory leak in rvu_setup_hw_resources() | Problem Details:
If rvu_npc_exact_init() fails in rvu_setup_hw_resources(), the function
returns directly instead of jumping to the error handling path. This
causes a resource leak for the previously initialized CGX, NPC, fwdata,
and MSI-X states.
Fix this by replacing the direct return with goto cgx_err to ensure
pro... | ```diff
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
index 3cf131508ecf..6e907ee19164 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
@@ -1160,7 +1160,7 @@ cpt:
err = rvu_npc_exact_init... |
4d8bba99d645bcb46a442b18eb42402610cba03a | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix potential tx_retries underflow | Problem Details:
When FIELD_GET returns 0 for the retry count, subtracting 1 causes
an unsigned integer underflow, resulting in tx_retries becoming a
very large value (0xFFFFFFFF for u32).
Fix by checking if count is non-zero before subtracting 1.
Fixes: 2461599f835e ("wifi: mt76: mt7996: get tx_retries and tx_failed... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
index 83e8e1e7feb4..0eebc8182ca9 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
@@ -1359,13 +1359,13 @@ next:
cur_info++;
co... |
1e1fd84571e62a2961cea44c053340ec5c99b2cb | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: fix potential tx_retries underflow | Problem Details:
When FIELD_GET returns 0 for the retry count, subtracting 1 causes
an unsigned integer underflow, resulting in tx_retries becoming a
very large value (0xFFFFFFFF for u32).
Fix by checking if count is non-zero before subtracting 1.
Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver f... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mac.c b/drivers/net/wireless/mediatek/mt76/mt7925/mac.c
index 5dd895c3f205..0641a7131d7c 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/mac.c
@@ -1149,8 +1149,9 @@ mt7925_mac_tx_free(struct mt792... |
3c5671ed81b1fff97fa868dae771690599db94f7 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7921: fix potential tx_retries underflow | Problem Details:
When FIELD_GET returns 0 for the retry count, subtracting 1 causes
an unsigned integer underflow, resulting in tx_retries becoming a
very large value (0xFFFFFFFF for u32).
Fix by checking if count is non-zero before subtracting 1.
Fixes: 9aecfa754c7f ("wifi: mt76: mt7921e: report tx retries/failed co... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
index 85434996f8e7..1c2377d0a53d 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
@@ -531,8 +531,9 @@ static void mt7921_mac_tx_free(st... |
05e72b6167970043348bfbe8f72a3b67a38a9f1c | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7915: fix potential tx_retries underflow | Problem Details:
When FIELD_GET returns 0 for the retry count, subtracting 1 causes
an unsigned integer underflow, resulting in tx_retries becoming a
very large value (0xFFFFFFFF for u32).
Fix by checking if count is non-zero before subtracting 1.
Fixes: 943e4fb96e6f ("wifi: mt76: mt7915: report tx retries/failed cou... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
index cec2c4208255..334c19ab2b22 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c
@@ -912,16 +912,16 @@ mt7915_mac_tx_free(struct mt791... |
5fa1d6a5ec2356d2107dead614437c66fa7138b1 | Analyze and fix the following issue in the Linux kernel code: isofs: bound Rock Ridge symlink components to the SL record | Problem Details:
get_symlink_chunk() and the SL handling in
parse_rock_ridge_inode_internal() walk the variable-length components of
a Rock Ridge "SL" (symbolic link) record. Each component is a two-byte
header (flags, len) followed by len bytes of text, so it occupies
slp->len + 2 bytes. Both loops read slp->len and... | ```diff
diff --git a/fs/isofs/rock.c b/fs/isofs/rock.c
index 1232fab59a4e..2628f31bd3a5 100644
--- a/fs/isofs/rock.c
+++ b/fs/isofs/rock.c
@@ -466,6 +466,9 @@ repeat:
inode->i_size = symlink_len;
while (slen > 1) {
rootflag = 0;
+ /* keep the component within the SL record */
+ if (slp->len + 2 ... |
5832743279da8c6ae72f715bad2f7141eca6f4b8 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: fix argument to ieee80211_is_first_frag() | Problem Details:
ieee80211_is_first_frag() operates on the seq_ctrl not the frame_control
header field. Pass the correct one in; otherwise the results may vary.
Sponsored by: The FreeBSD Foundation
Fixes: 30ce7f4456ae4 ("mt76: validate rx CCMP PN")
Link: https://cgit.freebsd.org/src/commit/sys/contrib/dev/mediatek/mt7... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c
index dd09ef1bd0c2..13c4e8abe281 100644
--- a/drivers/net/wireless/mediatek/mt76/mac80211.c
+++ b/drivers/net/wireless/mediatek/mt76/mac80211.c
@@ -1323,7 +1323,7 @@ mt76_check_ccmp_pn(struct sk_buff *skb)... |
5fd3385505600934f5faa9635e5b30fa38e548b9 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: limit work in set_bitrate_mask | Problem Details:
Calls to mt7996_set_bitrate_mask() would propagate work for all stations
on the ieee80211_hw regardless of the vif specified in the call. To
prevent unnecessary work in FW, limit setting the sta_rate to only the
specified vif in mt7996_sta_rate_ctrl_update().
Fixes: afff4325548f0 ("wifi: mt76: mt7996:... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/main.c b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
index b3cbf68bb53d..afbcc8c7b18b 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/main.c
@@ -1961,7 +1961,11 @@ static void mt7996_sta_rat... |
2dd78856223484895306351df1f903a4b75d213f | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: transform aspm_conf for pci_disable_link_state | Problem Details:
commit b478e162f227 ("PCI/ASPM: Consolidate link state defines") changed
PCIE_LINK_STATE_L0S (1) to (BIT(0) | BIT(1)). PCI_EXP_LNKCTL_ASPM_L0S (1)
and PCI_EXP_LNKCTL_ASPM_L1 (2) are no longer matched with
PCIE_LINK_STATE_L0S (3) and PCIE_LINK_STATE_L1 (4).
On the platform enabling ASPM L0s and L1, mt7... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/pci.c b/drivers/net/wireless/mediatek/mt76/pci.c
index 833923ab2483..11fe62aa8113 100644
--- a/drivers/net/wireless/mediatek/mt76/pci.c
+++ b/drivers/net/wireless/mediatek/mt76/pci.c
@@ -30,8 +30,14 @@ void mt76_pci_disable_aspm(struct pci_dev *pdev)
if (IS_EN... |
6b294950eaac246e6b0f42d74aa643ff36384c6e | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: remove redundant pdev->bus check in probe | Problem Details:
Drop the unnecessary pdev->bus NULL check in mt7996_pci_probe() since
the pointer is already dereferenced earlier in mt76_pci_disable_aspm(),
making the check dead code. Silences the related Smatch warning.
Fixes: 377aa17d2aed ("wifi: mt76: mt7996: Add NPU offload support to MT7996 driver")
Signed-off... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/pci.c b/drivers/net/wireless/mediatek/mt76/mt7996/pci.c
index 12523ddba630..b7d9193e042f 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/pci.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/pci.c
@@ -141,7 +141,7 @@ static int mt7996_pci_probe(struc... |
729c83a3330c0a56662cd0d8e40db96d41c00a54 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix reading zeroed info->control.flags after mt76_tx_status_skb_add() | Problem Details:
mt76_tx_status_skb_add() zeroes the mt76_tx_cb struct stored at
info->status.status_driver_data via memset(). Since info->control and
info->status are members of the same union in ieee80211_tx_info,
this overwrites info->control.flags.
In mt7996_tx_prepare_skb(), mt76_tx_status_skb_add() is called befo... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
index 2224fbe04391..44713a7a86f8 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
@@ -857,7 +857,8 @@ mt7996_mac_write_txwi_80211(struc... |
61370e6674b5253de5686813ceeceebc35a7d3e5 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: Fix possible NULL pointer dereference in mt7996_mac_write_txwi_80211() | Problem Details:
For injected frames (e.g. via radiotap), mac80211 can pass
info->control.vif = NULL, as explicitly noted in struct ieee80211_tx_info.
Check vif pointer before executing ieee80211_vif_is_mld() in
mt7996_mac_write_txwi_80211 routine in order to avoid a possible NULL
pointer dereference.
Fixes: f0b0b239b... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
index ade8706623b0..2224fbe04391 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
@@ -757,6 +757,7 @@ mt7996_mac_write_txwi_80211(struc... |
831074096d0450308357271fc0ffd3f600a2487e | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: Fix possible token leak in mt7996_tx_prepare_skb() | Problem Details:
If link_conf or link_sta lookup fails in mt7996_tx_prepare_skb routine,
mt7996 driver leaks an already allocated tx token. Fix the issue
releasing the token in case of error.
Fixes: 7ef0c7ad735b0 ("wifi: mt76: mt7996: Implement MLD address translation for EAPOL")
Signed-off-by: Lorenzo Bianconi <loren... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
index c98446057282..ade8706623b0 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
@@ -1067,11 +1067,11 @@ int mt7996_tx_prepare_skb(str... |
c7369a00860a0704461d440e7c3bf9b49bfdbaee | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: validate skb length in testmode query | Problem Details:
In mt7925_tm_query(), the response skb from mt76_mcu_send_and_get_msg()
is used in a memcpy without validating its length:
memcpy(evt_resp, skb->data + 8, MT7925_EVT_RSP_LEN);
where MT7925_EVT_RSP_LEN is 512. If the firmware returns a response
shorter than 520 bytes (8 + 512), this reads beyond the... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/testmode.c b/drivers/net/wireless/mediatek/mt76/mt7925/testmode.c
index 3d40aacfc011..22a8f1ddc321 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/testmode.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/testmode.c
@@ -105,6 +105,11 @@ mt7925_tm_qu... |
a1152244702bb31b64650e5ca8308142286c0e4a | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt792x: skip MLD header rewrite for 802.3 encap TX | Problem Details:
mt792x_tx() rewrites addr1/addr2/addr3 by treating skb->data as
an 802.11 header for MLD traffic.
That is only valid for native 802.11 frames. Direct 802.3 TX can also
reach this path with IEEE80211_TX_CTL_HW_80211_ENCAP set, where
skb->data is not an 802.11 header.
Skip the MLD header rewrite for HW... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt792x_core.c b/drivers/net/wireless/mediatek/mt76/mt792x_core.c
index 1d807abc7125..e5ef724dd2d3 100644
--- a/drivers/net/wireless/mediatek/mt76/mt792x_core.c
+++ b/drivers/net/wireless/mediatek/mt76/mt792x_core.c
@@ -105,7 +105,8 @@ void mt792x_tx(struct ieee802... |
733d8aa8d09be3068bcf2f09278446aca7921805 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: program BA state on active links | Problem Details:
With MLO, traffic for one TID can be sent on any active link. Programming
BA state only on the default link leaves the other active links out of
sync.
Program BA state on all active links instead.
Fixes: 766ea2cf5a39 ("Revert "wifi: mt76: mt7925: Update mt7925_mcu_uni_[tx,rx]_ba for MLO"")
Tested-by:... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
index 2599b738496f..c20e5316fae0 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
@@ -1410,22 +1410,22 @@ mt7925_ampdu_action(struc... |
d3c854068bad22a25db6515f12784f64c663fed2 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: keep TX BA state in the primary WCID | Problem Details:
For MLO, the same TID can run over different links. Keeping TX BA state in
a link WCID makes the state depend on which link starts aggregation first.
Store it in the primary WCID instead, so the BA state stays stable across
links.
Fixes: 44eb173bdd4f ("wifi: mt76: mt7925: add link handling in mt7925_... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mac.c b/drivers/net/wireless/mediatek/mt76/mt7925/mac.c
index d681005cc6ff..5dd895c3f205 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/mac.c
@@ -846,7 +846,6 @@ static void mt7925_tx_check_aggr(... |
9f1accf3069a0cd42c14ca6c7d44d5b17cc48a80 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: fix stale pointer comparisons in change_vif_links | Problem Details:
In the error path of mt7925_change_vif_links(), the free: label iterates
over link_ids to clean up, but compares against `mconf` and `mlink`
which hold stale values from the last loop iteration rather than the
current link_id being freed.
Use array-indexed access (mconfs[link_id] / mlinks[link_id]) to... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
index dcd2f07318fc..819fd104aa60 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
@@ -2185,9 +2185,9 @@ free:
rcu_assign_pointer... |
6794edb55b5f5ef834e03b0b241b1a8b725f82c0 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: Fix NULL pointer dereference in mt7996_init_tx_queues() | Problem Details:
When MT76_NPU and CONFIG_NET_MEDIATEK_SOC_WED are enabled and
mt76 detects properly the Airoha NPU SoC, mt7996_init_tx_queues() will
dereference a NULL WED pointer.
Fix the issue by always passing the WED pointer from mt7996_dma_init().
Fixes: cd7951f242a7 ("wifi: mt76: mt7996: Integrate MT7990 dma co... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/dma.c b/drivers/net/wireless/mediatek/mt76/mt7996/dma.c
index 8f5d297dafce..3d9353811a02 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/dma.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/dma.c
@@ -683,7 +683,7 @@ int mt7996_dma_init(struct mt7996... |
ac41612e0044fa29cf9bc45b6808dda6d87ac2da | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: add missing max_remain_on_channel_duration | Problem Details:
Having this unset breaks remain-on-channel and mgmt TX.
Move setting it to mt76 core to keep it in one place.
Fixes: 69d54ce7491d0 ("wifi: mt76: mt7996: switch to single multi-radio wiphy")
Link: https://patch.msgid.link/20260324154904.2555603-2-nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name> | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c
index 4ae5e4715a9c..dd68776ada28 100644
--- a/drivers/net/wireless/mediatek/mt76/mac80211.c
+++ b/drivers/net/wireless/mediatek/mt76/mac80211.c
@@ -449,6 +449,8 @@ mt76_phy_init(struct mt76_phy *phy, struc... |
7ec087fef32a88410488b764b0f5eef68e51175f | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7996: fix out-of-bounds array access during hardware restart | Problem Details:
During hardware restart, link_id can be IEEE80211_LINK_UNSPECIFIED,
causing an out-of-bounds array access on msta->link[].
Add mt7996_sta_link() and mt7996_sta_link_protected() helper functions
for accessing sta links with proper RCU handling and bounds checking.
Use them for any sta link RCU access.
... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c b/drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c
index 34af800964d1..ef9a9204adf5 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c
@@ -664,7 +664,7 @@ mt7996_sta_hw_que... |
2172c96a1eb495966923ebbbe5965e3158875534 | Analyze and fix the following issue in the Linux kernel code: wifi: mt7601u: drop redundant device reference | Problem Details:
Driver core holds a reference to the USB interface and its parent USB
device while the interface is bound to a driver and there is no need to
take additional references unless the structures are needed after
disconnect.
Drop the redundant device reference to reduce cargo culting, make it
easier to spo... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt7601u/usb.c b/drivers/net/wireless/mediatek/mt7601u/usb.c
index c41ae251cb95..9306870cbc91 100644
--- a/drivers/net/wireless/mediatek/mt7601u/usb.c
+++ b/drivers/net/wireless/mediatek/mt7601u/usb.c
@@ -274,7 +274,6 @@ static int mt7601u_probe(struct usb_interface *us... |
d246ff8e5958ffd407361a33fdf0021f000083ac | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt792xu: drop redundant device reference | Problem Details:
Driver core holds a reference to the USB interface and its parent USB
device while the interface is bound to a driver and there is no need to
take additional references unless the structures are needed after
disconnect.
Drop the redundant device reference to reduce cargo culting, make it
easier to spo... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/usb.c b/drivers/net/wireless/mediatek/mt76/mt7921/usb.c
index 17057e68bf21..9bfc234f306f 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/usb.c
@@ -197,7 +197,6 @@ static int mt7921u_probe(struct u... |
70a05728dbb68ab5b2917fee5bbb1f0b6c498225 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76x2u: drop redundant device reference | Problem Details:
Driver core holds a reference to the USB interface and its parent USB
device while the interface is bound to a driver and there is no need to
take additional references unless the structures are needed after
disconnect.
Drop the redundant device reference to reduce cargo culting, make it
easier to spo... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/usb.c b/drivers/net/wireless/mediatek/mt76/mt76x2/usb.c
index 01cb3b2830f3..8af360bca643 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2/usb.c
@@ -57,7 +57,6 @@ static int mt76x2u_probe(struct usb... |
7f81b0214c4ee4fb39fbc92ca5aa96dfe890d2ea | Analyze and fix the following issue in the Linux kernel code: wifi: mt76x0u: drop redundant device reference | Problem Details:
Driver core holds a reference to the USB interface and its parent USB
device while the interface is bound to a driver and there is no need to
take additional references unless the structures are needed after
disconnect.
Drop the redundant device reference to reduce cargo culting, make it
easier to spo... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c
index 90e5666c0857..2acce121fb14 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c
@@ -245,7 +245,6 @@ static int mt76x0u_probe(struct u... |
b350ad117b4266f03e22c68b8057e98035aa059a | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: drop redundant device reference | Problem Details:
Driver core holds a reference to the USB interface and its parent USB
device while the interface is bound to a driver and there is no need to
take additional references unless the structures are needed after
disconnect.
Drop the redundant device reference to reduce cargo culting, make it
easier to spo... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/usb.c b/drivers/net/wireless/mediatek/mt76/mt7615/usb.c
index d91feffadda9..bab7b91f14be 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/usb.c
@@ -151,7 +151,6 @@ static int mt7663u_probe(struct u... |
7fae097aa9a56c30febf539d72ef3773165d3aa3 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: use kfree_rcu for offchannel link in mt76_put_vif_phy_link | Problem Details:
mt76_put_vif_phy_link() frees the offchannel mlink with plain kfree()
after rcu_assign_pointer(NULL). However, rcu_assign_pointer only prevents
future RCU readers from obtaining the pointer -- it does not wait for
existing readers that already hold it via rcu_dereference.
The TX datapath (e.g. mt7996_... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/channel.c b/drivers/net/wireless/mediatek/mt76/channel.c
index 05eee64706ea..6edcb3b8f279 100644
--- a/drivers/net/wireless/mediatek/mt76/channel.c
+++ b/drivers/net/wireless/mediatek/mt76/channel.c
@@ -307,7 +307,7 @@ void mt76_put_vif_phy_link(struct mt76_phy *p... |
37d65384aa6f9cbe45f4052b13b378af1aab3e95 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: don't disable AP BSS when removing TDLS peer | Problem Details:
On a STATION vif, removing a TDLS peer takes the mt7925_mac_sta_remove
-> mt7925_mac_sta_remove_links path. The first loop in that function
calls mt7925_mcu_add_bss_info(..., enable=false) for every link of the
station being removed. For a non-MLO STATION vif there is exactly one
link, link 0, whose bs... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/main.c b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
index 30832c4bd303..dcd2f07318fc 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/main.c
@@ -1268,6 +1268,9 @@ mt7925_mac_sta_remove_links... |
5b7154f934c4c1b86e0fbfd95ad570a25bd08662 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: route TDLS-peer frames as 3-addr non-DS in HW encap | Problem Details:
With HW TX encap offload enabled, the mt76 firmware builds the 802.11
header for the 802.3 frame using the per-WCID context. For a STATION
vif the HDR_TRANS TLV currently sets ToDS=1, which makes the firmware
default to the BSSID as A1 and emit STA->AP-formatted frames
regardless of which peer the WCID... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h
index 527bef97e122..07955555f84d 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -361,6 +361,7 @@ enum mt76_wcid_flags {
MT_WCID_FLAG_PS,
MT_WCID_FLAG_... |
351dd7d2c80d23e56dcce6faa4e62bea5b0877c7 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7921/mt7925: fix NULL dereference in CSA beacon | Problem Details:
This patch is based on a BUG as reported by Bongani Hlope at
https://lore.kernel.org/all/20260502125824.425d7159@bongani-mini.home.org.za/
When a channel-switch announcement (CSA) beacon is received,
cfg80211 queues a wiphy work item that eventually calls
mt7921_channel_switch_rx_beacon(). If the stat... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/main.c b/drivers/net/wireless/mediatek/mt76/mt7921/main.c
index 3d74fabe7408..a326f4c95c7c 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/main.c
@@ -1508,6 +1508,9 @@ static void mt7921_channel_... |
346dac35b1384af9338b34b6835e82e634ea4d2c | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7921: fix resource leak in probe error path | Problem Details:
When pcim_iomap_region() or devm_kmemdup() fail, the code returns
directly without cleaning up previously allocated resources:
- mt76_device allocated by mt76_alloc_device()
- pci irq vectors allocated by pci_alloc_irq_vectors()
Fix this by jumping to the existing error cleanup path instead of
retu... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/pci.c b/drivers/net/wireless/mediatek/mt76/mt7921/pci.c
index 7a790ddf43bb..49a37185f056 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/pci.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/pci.c
@@ -343,11 +343,14 @@ static int mt7921_pci_probe(str... |
31ee1582717e220cc5a3fa8f3940d5693c5c9169 | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: fix of_get_mac_address error handling | Problem Details:
Check return value instead of is_valid_ether_addr. The latter is handled
by the former.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20260427051746.954704-1-rosenp@gmail.com
Signed-off-by: Felix Fietkau <nbd@nbd.name> | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/eeprom.c b/drivers/net/wireless/mediatek/mt76/eeprom.c
index afdb73661866..b99d7452800f 100644
--- a/drivers/net/wireless/mediatek/mt76/eeprom.c
+++ b/drivers/net/wireless/mediatek/mt76/eeprom.c
@@ -181,7 +181,7 @@ mt76_eeprom_override(struct mt76_phy *phy)
if (... |
9629f31f505d74e76ac0d7a9492fd06c0316fc5d | Analyze and fix the following issue in the Linux kernel code: wifi: mt76: mt7925: clean up DMA on probe failure | Problem Details:
mt7925_pci_probe() initializes DMA before registering the device. If
mt7925_register_device() fails, probe returns through err_free_irq without
tearing down DMA state.
That leaves the TX NAPI instance enabled and skips the DMA queue cleanup
that the normal remove path performs through mt7925e_unregist... | ```diff
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/pci.c b/drivers/net/wireless/mediatek/mt76/mt7925/pci.c
index c4161754c01d..48837723024d 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/pci.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/pci.c
@@ -415,10 +415,12 @@ static int mt7925_pci_probe(str... |
3b9f95b5a45786f1ca3feff7a736f30f60af08c7 | Analyze and fix the following issue in the Linux kernel code: platform: arm64: qcom-hamoa-ec: Fix indentation in comment tables | Problem Details:
With tab=8 (Linux Kernel coding style), there are a couple of lines
misaligned in the comment ASCII tables. Fix indentation for them.
Signed-off-by: Shawn Guo <shengchao.guo@oss.qualcomm.com>
Link: https://patch.msgid.link/20260608082348.92575-1-shengchao.guo@oss.qualcomm.com
Reviewed-by: Ilpo Järvine... | ```diff
diff --git a/drivers/platform/arm64/qcom-hamoa-ec.c b/drivers/platform/arm64/qcom-hamoa-ec.c
index a018f7bf35d2..89374ab3e600 100644
--- a/drivers/platform/arm64/qcom-hamoa-ec.c
+++ b/drivers/platform/arm64/qcom-hamoa-ec.c
@@ -149,7 +149,7 @@ static int qcom_ec_read_fw_version(struct device *dev)
* | 0x00 | ... |
56b7981c6f21670c0a1a62e6d2f9afb380e2596d | Analyze and fix the following issue in the Linux kernel code: platform/x86: hp-wmi: Add support for Omen 16-ap0xxx (8E35) | Problem Details:
The HP Omen 16-ap0xxx (board ID: 8E35) has the same WMI interface as
other Victus S boards, but requires quirks for correctly switching
thermal profile.
Add the DMI board name to victus_s_thermal_profile_boards[] table and
map it to omen_v1_legacy_thermal_params.
Testing on board 8E35 confirmed that ... | ```diff
diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index 079db53bf10c..8ba286ed8721 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -265,6 +265,10 @@ static const struct dmi_system_id victus_s_thermal_profile_boards[] __initconst
.matches ... |
f329e8325e054bd6d84d10904f8dd51137281b92 | Analyze and fix the following issue in the Linux kernel code: drm/virtio: Fix driver removal with disabled KMS | Problem Details:
DRM atomic and modesetting aren't initialized if virtio-gpu driver built
with disabled KMS, leading to access of uninitialized data on driver
removal/unbinding and crashing kernel. Fix it by skipping shutting down
atomic core with unavailable KMS.
Fixes: 72122c69d717 ("drm/virtio: Add option to disabl... | ```diff
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c b/drivers/gpu/drm/virtio/virtgpu_drv.c
index a5ce96fb8a1d..9af740bda835 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drv.c
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.c
@@ -124,7 +124,10 @@ static void virtio_gpu_remove(struct virtio_device *vdev)
struct drm_devic... |
333b6d5bb9f87827ac2639c737bf9613dbae7253 | Analyze and fix the following issue in the Linux kernel code: rxrpc: Fix the ACK parser to extract the SACK table for parsing | Problem Details:
Fix modification of the received skbuff in rxrpc_input_soft_acks() and a
potential incorrect access of the buffer in a fragmented UDP packet (the
packet would probably have to be deliberately pre-generated as fragmented)
when AF_RXRPC tries to extract the contents of the SACK table by copying
out the c... | ```diff
diff --git a/net/rxrpc/input.c b/net/rxrpc/input.c
index 24aceb183c2c..ce761466b02d 100644
--- a/net/rxrpc/input.c
+++ b/net/rxrpc/input.c
@@ -963,23 +963,34 @@ static void rxrpc_input_soft_acks(struct rxrpc_call *call,
struct rxrpc_skb_priv *sp = rxrpc_skb(skb);
struct rxrpc_txqueue *tq = call->tx_queue;
... |
ae371a58117d30a496e3be27cce8d9d13acdd740 | Analyze and fix the following issue in the Linux kernel code: ARM: configs: Drop duplicated CONFIG_EXT4_FS | Problem Details:
Remove redundant, duplicated CONFIG_EXT4_FS to fix warnings like:
axm55xx_defconfig:198:warning: override: reassigning to symbol EXT4_FS
Fixes: c065b6046b34 ("Use CONFIG_EXT4_FS instead of CONFIG_EXT3_FS in all of the defconfigs")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm... | ```diff
diff --git a/arch/arm/configs/axm55xx_defconfig b/arch/arm/configs/axm55xx_defconfig
index 22b189090e15..0952e5e94c5e 100644
--- a/arch/arm/configs/axm55xx_defconfig
+++ b/arch/arm/configs/axm55xx_defconfig
@@ -195,7 +195,6 @@ CONFIG_PL320_MBOX=y
# CONFIG_IOMMU_SUPPORT is not set
CONFIG_EXT2_FS=y
CONFIG_EXT4... |
19440600e729d4f74a42591a872099cf25c7d28a | Analyze and fix the following issue in the Linux kernel code: r8152: handle the return value of usb_reset_device() | Problem Details:
If usb_reset_device() returns a negative error code, stop the
process of probing.
Fixes: 10c3271712f5 ("r8152: disable the ECM mode")
Signed-off-by: Chih Kai Hsu <hsu.chih.kai@realtek.com>
Reviewed-by: Hayes Wang <hayeswang@realtek.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msg... | ```diff
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 1ace1d2398c9..b1268553cd70 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -9851,7 +9851,12 @@ static int rtl8152_probe_once(struct usb_interface *intf,
struct net_device *netdev;
int ret;
- usb_reset_device(udev);
... |
b9452b594fd3aecbfd4aa0a6a1f741330a37dab7 | Analyze and fix the following issue in the Linux kernel code: bpf: Validate BTF repeated field counts before expansion | Problem Details:
btf_parse_struct_metas() walks user-supplied BTF during BPF_BTF_LOAD,
and btf_repeat_fields() expands repeatable fields from array elements
into the fixed BTF_FIELDS_MAX scratch array used by btf_parse_fields().
The remaining-capacity check performs the expanded field count calculation
in u32. A malfo... | ```diff
diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
index ef4402274786..15ae7c43f594 100644
--- a/kernel/bpf/btf.c
+++ b/kernel/bpf/btf.c
@@ -3667,7 +3667,7 @@ end:
static int btf_repeat_fields(struct btf_field_info *info, int info_cnt,
u32 field_cnt, u32 repeat_cnt, u32 elem_size)
{
- u32 i, j;
+ u32 i... |
29922fdfc2a4008d66418bedd0ebf5038fc54efa | Analyze and fix the following issue in the Linux kernel code: sched/fair: Fix cpu_util runnable_avg arithmetic | Problem Details:
If we take runnable_avg in max(runnable_avg, util_avg) in cpu_util(), we
should then add or subtract task runnable_avg, but the arithmetic below
is still with task util_avg. This mixes runnable_avg with util_avg which
is incorrect.
Fix by always doing arithmetic with runnable_avg and only take
max(run... | ```diff
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index f4ed841f766f..1b23e73f48b0 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -8968,25 +8968,32 @@ static int select_idle_sibling(struct task_struct *p, int prev, int target)
static unsigned long
cpu_util(int cpu, struct task_struct *p, i... |
695fcefd4a81466ef9c529790b4e96f1ea2ba051 | Analyze and fix the following issue in the Linux kernel code: i2c: imx-lpi2c: fix resource leaks switching to devm_dma_request_chan() | Problem Details:
The LPI2C driver requests DMA channels using dma_request_chan(), but
never releases them in lpi2c_imx_remove(), resulting in DMA channel
leaks every time the driver is unloaded.
Additionally, when lpi2c_dma_init() successfully requests the TX DMA
channel but fails to request the RX DMA channel, the pr... | ```diff
diff --git a/drivers/i2c/busses/i2c-imx-lpi2c.c b/drivers/i2c/busses/i2c-imx-lpi2c.c
index a01c23696481..cd4da50c4dd9 100644
--- a/drivers/i2c/busses/i2c-imx-lpi2c.c
+++ b/drivers/i2c/busses/i2c-imx-lpi2c.c
@@ -1383,55 +1383,66 @@ static int lpi2c_imx_init_recovery_info(struct lpi2c_imx_struct *lpi2c_imx,
ret... |
9611f644302c07d21bc8af97e3e06a3d30064253 | Analyze and fix the following issue in the Linux kernel code: ntfs3: cap RESTART_TABLE free-chain walker at rt->used | Problem Details:
A crafted NTFS3 disk image triggers an in-kernel infinite loop at
mount time, hanging the mounting thread and firing the soft-lockup
watchdog within ~22s on multi-CPU hosts (panic with
kernel.softlockup_panic=1). The bug is reachable from desktop USB
auto-mount on distributions where udisks2 routes th... | ```diff
diff --git a/fs/ntfs3/fslog.c b/fs/ntfs3/fslog.c
index e1f1c6a26785..e5ff99a2e6a2 100644
--- a/fs/ntfs3/fslog.c
+++ b/fs/ntfs3/fslog.c
@@ -764,8 +764,19 @@ static bool check_rstbl(const struct RESTART_TABLE *rt, size_t bytes)
/*
* Walk through the list headed by the first entry to make
* sure none of th... |
3e127829e57f5190f612412ece4541cb96d5ec7a | Analyze and fix the following issue in the Linux kernel code: fs/ntfs3: bound NTFS_DE view.data_off in UpdateRecordData{Root,Allocation} | Problem Details:
In do_action()'s UpdateRecordDataRoot (fslog.c:3489) and
UpdateRecordDataAllocation (fslog.c:3697) cases, the memmove
destination is `Add2Ptr(e, le16_to_cpu(e->view.data_off))`,
where e->view.data_off comes from an on-disk NTFS_DE inside
an INDEX_ROOT or INDEX_BUFFER. Neither case validates
view.data_... | ```diff
diff --git a/fs/ntfs3/fslog.c b/fs/ntfs3/fslog.c
index 95e1cdb47475..e1f1c6a26785 100644
--- a/fs/ntfs3/fslog.c
+++ b/fs/ntfs3/fslog.c
@@ -3525,6 +3525,18 @@ move_data:
e = Add2Ptr(attr, le16_to_cpu(lrh->attr_off));
+ /*
+ * e->view.data_off and dlen come from the on-disk
+ * INDEX_ROOT entry / LRH.... |
0aab31d47c2e857ca05028d718d1e0d239e683ad | Analyze and fix the following issue in the Linux kernel code: platform/x86: hp-wmi: Add support for Omen 16-ap0xxx (8D26) | Problem Details:
The HP Omen 16-ap0xxx (board ID: 8D26) has the same WMI interface as
other Victus S boards, but requires quirks for correctly switching
thermal profile.
Add the DMI board name to victus_s_thermal_profile_boards[] table and
map it to omen_v1_legacy_thermal_params.
Testing on board 8D26 confirmed that ... | ```diff
diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index 5042d124dea0..079db53bf10c 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -253,6 +253,10 @@ static const struct dmi_system_id victus_s_thermal_profile_boards[] __initconst
.matches ... |
ceb8678adfd68b33d5e8a52cb2e96cfa90d81761 | Analyze and fix the following issue in the Linux kernel code: platform/x86/intel/pmc: rate-limit LTR scale-factor warning | Problem Details:
convert_ltr_scale() emits an unconditional pr_warn() whenever an LTR row
encoded by hardware has a scale-factor field of 6 or 7 (reserved values
per the PCIe LTR ECN). The function is called twice per LTR row (snoop
+ non-snoop) by pmc_core_ltr_show(), which is invoked on every read of
/sys/kernel/deb... | ```diff
diff --git a/drivers/platform/x86/intel/pmc/core.c b/drivers/platform/x86/intel/pmc/core.c
index 3adae8fe8b30..825ba5fa0bcb 100644
--- a/drivers/platform/x86/intel/pmc/core.c
+++ b/drivers/platform/x86/intel/pmc/core.c
@@ -623,7 +623,8 @@ static u32 convert_ltr_scale(u32 val)
* ------------------------------... |
a221557958e3a82d8565729d445a7385963f30b6 | Analyze and fix the following issue in the Linux kernel code: platform/x86/intel/tpmi: use cleanup helpers in mem_write() | Problem Details:
In mem_write(), the temporary array returned by
parse_int_array_user() must be released on all exit paths.
Convert the array variable to use cleanup.h scope-based
cleanup so it is freed automatically on return.
This also moves the array declaration next to
parse_int_array_user() as required by cleanup... | ```diff
diff --git a/drivers/platform/x86/intel/vsec_tpmi.c b/drivers/platform/x86/intel/vsec_tpmi.c
index 8c4e2474b30c..3b76cccb975f 100644
--- a/drivers/platform/x86/intel/vsec_tpmi.c
+++ b/drivers/platform/x86/intel/vsec_tpmi.c
@@ -50,6 +50,7 @@
#include <linux/auxiliary_bus.h>
#include <linux/bitfield.h>
#includ... |
03866d130ed33ab68cc7faaf4bf2c4abef96d42e | Analyze and fix the following issue in the Linux kernel code: xfs: fix unreachable BIGTIME check in dquot flush validation | Problem Details:
The dqp->q_id == 0 check inside the XFS_DQTYPE_BIGTIME block is
unreachable because root dquots return successfully earlier. Reject root
dquots with XFS_DQTYPE_BIGTIME before that early return, preserving the
intended validation and removing the unreachable condition.
Found by Linux Verification Cente... | ```diff
diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c
index 69e9bc588c8b..c311f61d9554 100644
--- a/fs/xfs/xfs_dquot.c
+++ b/fs/xfs/xfs_dquot.c
@@ -1216,6 +1216,14 @@ xfs_qm_dqflush_check(
type != XFS_DQTYPE_PROJ)
return __this_address;
+ /* bigtime flag should never be set on root dquots */
+ if (dqp... |
0a5213bbff62b51c7d4999ac8c7e11ea57d00d45 | Analyze and fix the following issue in the Linux kernel code: xfs: fix exchmaps reservation limit check | Problem Details:
xfs_exchmaps_estimate_overhead() adds the bmbt and rmapbt
overhead to a local resblks variable, but the final UINT_MAX
check still tests req->resblks. That is the reservation value
from before the overhead was added.
The computed value is stored back in req->resblks and later passed
to xfs_trans_allo... | ```diff
diff --git a/fs/xfs/libxfs/xfs_exchmaps.c b/fs/xfs/libxfs/xfs_exchmaps.c
index 5d28f4eac527..541e33f33167 100644
--- a/fs/xfs/libxfs/xfs_exchmaps.c
+++ b/fs/xfs/libxfs/xfs_exchmaps.c
@@ -711,7 +711,7 @@ xfs_exchmaps_estimate_overhead(
return -ENOSPC;
/* Can't actually reserve more than UINT_MAX blocks. *... |
2673cefa99ca918e7ac5b0388ff578a83656c896 | Analyze and fix the following issue in the Linux kernel code: drm/i915/edp: Check supported link rates DPCD read | Problem Details:
intel_edp_set_sink_rates() reads DP_SUPPORTED_LINK_RATES into a local
stack array and then parses the array unconditionally. If the read
fails, the array contents are not valid and may result in bogus sink
link rates being used.
Use drm_dp_dpcd_read_data() and clear the sink rate array on failure,
so ... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 6ef2a0043cda..5c3e816b0135 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -4678,10 +4678,17 @@ intel_edp_set_sink_rates(struct intel_dp *intel_dp)
if (i... |
cdf12d80250e18a9f6c9c3b85796712a95c864f7 | Analyze and fix the following issue in the Linux kernel code: i2c: bcm-kona: fix spelling mistake in timeout-check comment | Problem Details:
Fix a spelling mistake in the timeout-check comment.
No functional change.
Signed-off-by: Stepan Ionichev <sozdayvek@gmail.com>
Acked-by: Ray Jui <ray.jui@broadcom.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20260503165925.1738-1-sozdayvek@gmail.com | ```diff
diff --git a/drivers/i2c/busses/i2c-bcm-kona.c b/drivers/i2c/busses/i2c-bcm-kona.c
index 9d8838bbd938..d4f287b31fd7 100644
--- a/drivers/i2c/busses/i2c-bcm-kona.c
+++ b/drivers/i2c/busses/i2c-bcm-kona.c
@@ -427,7 +427,7 @@ static int bcm_kona_i2c_write_fifo_single(struct bcm_kona_i2c_dev *dev,
return -EREMOT... |
d9faef564438d1e4579c692c046603e7ada7bdf4 | Analyze and fix the following issue in the Linux kernel code: accel/ivpu: Fix signed integer truncation in IPC receive | Problem Details:
Fix potential buffer overflow where firmware-supplied data_size is cast
to signed int before being used in min_t(). Large unsigned values
(>= 0x80000000) become negative, causing unsigned wraparound and
oversized memcpy operations that can overflow the stack buffer.
Change min_t(int, ...) to min() as ... | ```diff
diff --git a/drivers/accel/ivpu/ivpu_ipc.c b/drivers/accel/ivpu/ivpu_ipc.c
index f47df092bb0d..9347f05a2b79 100644
--- a/drivers/accel/ivpu/ivpu_ipc.c
+++ b/drivers/accel/ivpu/ivpu_ipc.c
@@ -276,7 +276,7 @@ int ivpu_ipc_receive(struct ivpu_device *vdev, struct ivpu_ipc_consumer *cons,
if (ipc_buf)
memcpy(i... |
ee30dd2909d8b98619f4341c70ec8dc8e155ab02 | Analyze and fix the following issue in the Linux kernel code: net: openvswitch: fix possible kfree_skb of ERR_PTR | Problem Details:
After the patch in the "Fixes" tag, the allocation of the "reply" skb
can happen either before or after locking the ovs_mutex.
However, error cleanups still follow the classical reversed order,
assuming "reply" is allocated before locking: it is freed after unlocking.
If "reply" allocation happens af... | ```diff
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index bbbde50fc649..f0164817d9b7 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -1316,6 +1316,7 @@ static int ovs_flow_cmd_set(struct sk_buff *skb, struct genl_info *info)
if (IS_ERR(reply)) {
error = PTR_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.