id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
00910c4f731773276d75acdcee3bc15f19a37705 | Analyze and fix the following issue in the Linux kernel code: media: rockchip: rga: align stride to 4 bytes | Problem Details:
Add an alignment setting to rga_hw to set the desired stride alignment.
As the RGA2 register for the stride counts in word units, the code
already divides the bytesperline value by 4 when writing it into the
register. Therefore fix the alignment to a multiple of 4 to avoid
potential off by one errors d... | ```diff
diff --git a/drivers/media/platform/rockchip/rga/rga-hw.c b/drivers/media/platform/rockchip/rga/rga-hw.c
index 9881c14f908d..dac3cb6aa17d 100644
--- a/drivers/media/platform/rockchip/rga/rga-hw.c
+++ b/drivers/media/platform/rockchip/rga/rga-hw.c
@@ -580,6 +580,7 @@ const struct rga_hw rga2_hw = {
.max_width ... |
ce1b5e4239aae88e71aca0e9db1116d46be2fc0c | Analyze and fix the following issue in the Linux kernel code: media: rockchip: rga: announce and sync colorimetry | Problem Details:
Announce the capability to adjust the quantization and ycbcr_enc on the
capture side and check if the SET_CSC flag is set when the colorimetry
is changed. Furthermore copy the colorimetry from the output to the
capture side to fix the currently failing v4l2-compliance tests, which
expect exactly this b... | ```diff
diff --git a/drivers/media/platform/rockchip/rga/rga.c b/drivers/media/platform/rockchip/rga/rga.c
index ca8d8a53dc25..8c34f73d6976 100644
--- a/drivers/media/platform/rockchip/rga/rga.c
+++ b/drivers/media/platform/rockchip/rga/rga.c
@@ -437,6 +437,15 @@ static int vidioc_enum_fmt(struct file *file, void *priv... |
65017e26c065d1240b0512c15867ef1128034fd8 | Analyze and fix the following issue in the Linux kernel code: media: rockchip: rga: fix too small buffer size | Problem Details:
Fix the command buffer size being only a quarter of the actual size.
The RGA_CMDBUF_SIZE macro was potentially intended to specify the length
of the cmdbuf u32 array pointer. But as it's used to specify the size of
the allocation, which is counted in bytes. Therefore adjust the macro
size to bytes as i... | ```diff
diff --git a/drivers/media/platform/rockchip/rga/rga-hw.c b/drivers/media/platform/rockchip/rga/rga-hw.c
index 43ed742a1649..d1618bb24750 100644
--- a/drivers/media/platform/rockchip/rga/rga-hw.c
+++ b/drivers/media/platform/rockchip/rga/rga-hw.c
@@ -414,7 +414,7 @@ static void rga_cmd_set(struct rga_ctx *ctx,
... |
2c225846271fc6b4f7e2a34271ebe828ed461772 | Analyze and fix the following issue in the Linux kernel code: media: v4l2-common: add v4l2_fill_pixfmt_mp_aligned helper | Problem Details:
Add a v4l2_fill_pixfmt_mp_aligned helper which allows the user to
specify a custom stride alignment in bytes. This is necessary for
hardware like the Rockchip RGA3, which requires the stride value to be
aligned to a 16 bytes boundary.
The code makes some assumptions about the v4l2 format to simplify t... | ```diff
diff --git a/drivers/media/v4l2-core/v4l2-common.c b/drivers/media/v4l2-core/v4l2-common.c
index 3cc8b04e1ea6..65db7340ad38 100644
--- a/drivers/media/v4l2-core/v4l2-common.c
+++ b/drivers/media/v4l2-core/v4l2-common.c
@@ -432,14 +432,33 @@ static inline unsigned int v4l2_format_block_height(const struct v4l2_f... |
61fef83f239ecace1cce716135762a2d9b7b1fc6 | Analyze and fix the following issue in the Linux kernel code: gpio: aggregator: remove the software node when deactivating the aggregator | Problem Details:
The dynamic software node we create for the aggregator platform device
when using configfs is leaked when the device is deactivated. Destroy it
as the last step in the tear-down path.
Fixes: 86f162e73d2d ("gpio: aggregator: introduce basic configfs interface")
Reported-by: Geert Uytterhoeven <geert@li... | ```diff
diff --git a/drivers/gpio/gpio-aggregator.c b/drivers/gpio/gpio-aggregator.c
index b53230065f50..a9ad809708fb 100644
--- a/drivers/gpio/gpio-aggregator.c
+++ b/drivers/gpio/gpio-aggregator.c
@@ -991,11 +991,15 @@ err_remove_lookups:
static void gpio_aggregator_deactivate(struct gpio_aggregator *aggr)
{
+ st... |
30c073cab97afb31901f94de9605177b6b84367e | Analyze and fix the following issue in the Linux kernel code: gpio: aggregator: fix a potential use-after-free | Problem Details:
On error we free aggr->lookups->dev_id before removing the entry from
the lookup table. If a concurrent thread calls gpiod_find() before we
remove the entry, it could iterate over the list and call
gpiod_match_lookup_table() which unconditionally dereferences dev_id
when calling strcmp(). Reverse the o... | ```diff
diff --git a/drivers/gpio/gpio-aggregator.c b/drivers/gpio/gpio-aggregator.c
index 5915209e1e21..b53230065f50 100644
--- a/drivers/gpio/gpio-aggregator.c
+++ b/drivers/gpio/gpio-aggregator.c
@@ -979,8 +979,8 @@ static int gpio_aggregator_activate(struct gpio_aggregator *aggr)
err_unregister_pdev:
platform_de... |
3e6ccd790ed69bedd3d9626d01dd35cf9821c121 | Analyze and fix the following issue in the Linux kernel code: gpio: cdev: check if uAPI v2 config attributes are correctly zeroed | Problem Details:
We check the padding of other uAPI v2 structures but not that of line
config attributes. For used attributes: check if their padding is
zeroed, for unused: check if the entire structure is zeroed.
Fixes: 3c0d9c635ae2 ("gpiolib: cdev: support GPIO_V2_GET_LINE_IOCTL and GPIO_V2_LINE_GET_VALUES_IOCTL")
R... | ```diff
diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c
index f36b7c06996d..82f27db0b230 100644
--- a/drivers/gpio/gpiolib-cdev.c
+++ b/drivers/gpio/gpiolib-cdev.c
@@ -1184,6 +1184,7 @@ static int gpio_v2_line_flags_validate(u64 flags)
static int gpio_v2_line_config_validate(struct gpio_v2_line_... |
c2e152f7ce3208b9333d212d41a87637ec1dd170 | Analyze and fix the following issue in the Linux kernel code: net: stmmac: eswin: validate RGMII delay values | Problem Details:
Validate rx-internal-delay-ps and tx-internal-delay-ps against the
hardware capabilities of the EIC7700 MAC.
The programmable RGMII delay supports 20 ps steps and a maximum value of
2540 ps. The driver previously accepted arbitrary values and silently
truncated unsupported settings when converting the... | ```diff
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-eic7700.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-eic7700.c
index ef60cab24533..4ac979d874d6 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-eic7700.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-eic7700.c
@@ -34,7 +34,10 @@
#define EIC7700_E... |
6ffcef9bc1fc2ad8110777decd6d026e3cb468ce | Analyze and fix the following issue in the Linux kernel code: net: stmmac: eswin: correct RGMII delay granularity to 20 ps | Problem Details:
The EIC7700 MAC implements programmable RGMII delay adjustment with a
granularity of 20 ps per hardware step.
The driver previously converted rx-internal-delay-ps and
tx-internal-delay-ps values using a 100 ps step size, resulting in
incorrect delay programming.
Update the conversion to use the corre... | ```diff
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-eic7700.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-eic7700.c
index 541b279f08a1..ef60cab24533 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-eic7700.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-eic7700.c
@@ -28,8 +28,8 @@
/*
* TX/RX Clo... |
6872fb088edc1a3c36792b301f8e4a1c35dd7c35 | Analyze and fix the following issue in the Linux kernel code: net: stmmac: eswin: clear TXD and RXD delay registers during initialization | Problem Details:
Clear the TXD and RXD delay control registers during EIC7700 DWMAC
initialization.
These registers may retain values programmed by the bootloader. If left
unchanged, residual delays can alter the effective RGMII timing seen by
the MAC and override the configuration described by the device tree.
This ... | ```diff
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-eic7700.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-eic7700.c
index 63001c4acdb7..541b279f08a1 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-eic7700.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-eic7700.c
@@ -46,7 +46,11 @@ struct eic7700_qos... |
23386defe949c0db4f746bed7098fc5e06746083 | Analyze and fix the following issue in the Linux kernel code: net: stmmac: eswin: fix HSP CSR init ordering after clock enable | Problem Details:
Fix the initialization ordering of the HSP CSR configuration in the
EIC7700 DWMAC glue driver.
The HSP CSR registers control MAC-side RGMII delay behavior and must
only be accessed after the corresponding clocks are enabled. The
previous implementation could trigger register access before clock
enable... | ```diff
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-eic7700.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-eic7700.c
index bcb8e000e720..63001c4acdb7 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-eic7700.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-eic7700.c
@@ -42,6 +42,11 @@ static const char ... |
c36069c6f46c52458bb86fa8eb4803f1e0b70fb0 | Analyze and fix the following issue in the Linux kernel code: dt-bindings: ethernet: eswin: add optional TXD and RXD delay register offsets | Problem Details:
Document two optional cells in eswin,hsp-sp-csr for the TXD and RXD
delay control register offsets.
These registers are used by the driver to clear any residual delay
configuration left by the bootloader, ensuring that MAC-side RGMII delay
settings are applied solely according to the kernel configurat... | ```diff
diff --git a/Documentation/devicetree/bindings/net/eswin,eic7700-eth.yaml b/Documentation/devicetree/bindings/net/eswin,eic7700-eth.yaml
index 91e8cd1db67b..b66ae6300faf 100644
--- a/Documentation/devicetree/bindings/net/eswin,eic7700-eth.yaml
+++ b/Documentation/devicetree/bindings/net/eswin,eic7700-eth.yaml
@... |
96031b31a4b3b6ec836b9fe7be8f6e6ebcfe8d67 | Analyze and fix the following issue in the Linux kernel code: irqchip/exynos-combiner: Switch to raw_spinlock | Problem Details:
The exynos-combiner driver uses a regular spinlock to protect access to
the combiner interrupt status register in combiner_handle_cascade_irq(),
which is invoked in hard interrupt context as a chained interrupt handler.
When PREEMPT_RT is enabled on ARM, regular spinlock is converted to a
sleeping loc... | ```diff
diff --git a/drivers/irqchip/exynos-combiner.c b/drivers/irqchip/exynos-combiner.c
index 11d105457798..03cafcc5c835 100644
--- a/drivers/irqchip/exynos-combiner.c
+++ b/drivers/irqchip/exynos-combiner.c
@@ -24,7 +24,7 @@
#define IRQ_IN_COMBINER 8
-static DEFINE_SPINLOCK(irq_controller_lock);
+static DEFIN... |
9392e7340bffb406a705de755adfb44eab547d40 | Analyze and fix the following issue in the Linux kernel code: drm/rockchip: dw_hdmi: avoid direct dereference of phy->dev.of_node | Problem Details:
The dw_hdmi-rockchip driver validates pixel clock rates against the
HDMI PHY's internal clock provider on certain SoCs like RK3328.
This is currently achieved by dereferencing hdmi->phy->dev.of_node
to obtain the provider node, which violates the Generic PHY API's
encapsulation (the goal is for struct ... | ```diff
diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
index 0dc1eb5d2ae3..7abb42e486c0 100644
--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
@@ -537,21 +537,22 @@ static int dw_hdmi_rockchip_bind(struct device ... |
48f6a5356a33dd78e7144ae1faef95ffc990aae0 | Analyze and fix the following issue in the Linux kernel code: net: skbuff: propagate shared-frag marker through frag-transfer helpers | Problem Details:
Two frag-transfer helpers (__pskb_copy_fclone() and skb_shift()) fail
to propagate the SKBFL_SHARED_FRAG bit in skb_shinfo()->flags when
moving frags from source to destination. __pskb_copy_fclone() defers
the rest of the shinfo metadata to skb_copy_header() after copying
frag descriptors, but that he... | ```diff
diff --git a/net/core/gro.c b/net/core/gro.c
index 31d21de5b15a..9f8960789b2c 100644
--- a/net/core/gro.c
+++ b/net/core/gro.c
@@ -213,10 +213,12 @@ done:
p->data_len += len;
p->truesize += delta_truesize;
p->len += len;
+ skb_shinfo(p)->flags |= skbinfo->flags & SKBFL_SHARED_FRAG;
if (lp != p) {
lp-... |
ed2b7541e7db47e589be6d20d8e6e9a9620addac | Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: fix CamelCase of DelayLPSLastTimeStamp | Problem Details:
Rename CamelCase variable DelayLPSLastTimeStamp to
delay_lps_last_time_stamp across rtw_cmd.c, rtw_pwrctrl.c
and rtw_pwrctrl.h.
Signed-off-by: Ayushman Rout <ayushmanrout27@gmail.com>
Link: https://patch.msgid.link/20260512104539.18629-1-ayushmanrout27@gmail.com
Signed-off-by: Greg Kroah-Hartman <greg... | ```diff
diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index 94a0fb8a52ea..f01b0a221b6a 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -1308,7 +1308,7 @@ void lps_ctrl_wk_hdl(struct adapter *padapter, u8 lps_ctrl_... |
2014f38e4afa61e5925c0830fa00ef42be1c7adc | Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: fix line lengths in rtw_cmd.c | Problem Details:
Minor Fix in lines exceeding 100 characters
Signed-off-by: Ayushman Rout <ayushmanrout27@gmail.com>
Link: https://patch.msgid.link/20260512063135.2880-1-ayushmanrout27@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ```diff
diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index adc151326feb..94a0fb8a52ea 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -184,7 +184,8 @@ int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
return -E... |
9893f32976b5dd8ca6ed43a97794531d8d49981e | Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: fix unbalanced braces in 3 files | Problem Details:
Add missing braces to if/else statements to comply with kernel coding
style.
This fixes the following checkpatch.pl checks:
- CHECK: Unbalanced braces around else statement
- CHECK: braces {} should be used on all arms of this statement
Signed-off-by: Jennifer Guo <guojy.bj@gmail.com>
Link: https://p... | ```diff
diff --git a/drivers/staging/rtl8723bs/core/rtw_efuse.c b/drivers/staging/rtl8723bs/core/rtw_efuse.c
index 803a608b74fa..a40d6eab7249 100644
--- a/drivers/staging/rtl8723bs/core/rtw_efuse.c
+++ b/drivers/staging/rtl8723bs/core/rtw_efuse.c
@@ -76,9 +76,9 @@ u16 Address)
break;
}
return rtw_read8(Adap... |
75f9613aef20b2e4d7b2677e71ab4be0bb4ec5be | Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: fix unbalanced braces in rtw_recv.c | Problem Details:
Add missing braces to if/else statements to comply with kernel coding
style.
This fixes the following checkpatch.pl checks for rtw_recv.c:
- CHECK: Unbalanced braces around else statement
- CHECK: braces {} should be used on all arms of this statement
Signed-off-by: Jennifer Guo <guojy.bj@gmail.com>
... | ```diff
diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c
index e9ec6def7216..86c5e2c4e7dd 100644
--- a/drivers/staging/rtl8723bs/core/rtw_recv.c
+++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
@@ -115,9 +115,9 @@ union recv_frame *_rtw_alloc_recvframe(struct __queue *pf... |
9f7da7b1f29d70f33272448ba9be773421be534d | Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: remove unnecessary blank lines in rtw_security.c | Problem Details:
Remove unnecessary blank lines around braces {} to improve readability.
This fixes the following checkpatch.pl checks in rtw_security.c:
- CHECK: Blank lines aren't necessary after an open brace '{'
- CHECK: Blank lines aren't necessary before a close brace '}'
Signed-off-by: Jennifer Guo <guojy.bj@g... | ```diff
diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
index 50d8e30f7eda..0cfd7734c174 100644
--- a/drivers/staging/rtl8723bs/core/rtw_security.c
+++ b/drivers/staging/rtl8723bs/core/rtw_security.c
@@ -123,7 +123,6 @@ void rtw_wep_decrypt(struct adapter *pad... |
6602a11fdb2d9b23e0334b96ce77c0c343e9c913 | Analyze and fix the following issue in the Linux kernel code: staging: rtl8723bs: remove unnecessary blank lines in rtw_mlme_ext.c | Problem Details:
Remove unnecessary blank lines around braces {} to improve readability.
This fixes the following checkpatch.pl checks in rtw_mlme_ext.c:
- CHECK: Blank lines aren't necessary after an open brace '{'
- CHECK: Blank lines aren't necessary before a close brace '}'
Signed-off-by: Jennifer Guo <guojy.bj@g... | ```diff
diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index ba19a162896e..a86d6f97cf02 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -272,7 +272,6 @@ static void init_channel_list(struct adap... |
34808ac8ddafc3e2c2a59e84eaab0a410e7a0fdc | Analyze and fix the following issue in the Linux kernel code: regmap-i2c: fix sparse warning in regmap_smbus_word_write_reg16 | Problem Details:
i2c_smbus_write_word_data() expects a plain u16, but cpu_to_le16()
returns __le16 (a sparse-restricted endian type), causing:
drivers/base/regmap/regmap-i2c.c:340: sparse: incorrect type in
argument 3 (different base types)
expected unsigned short [usertype] value
got restricted __le16 [us... | ```diff
diff --git a/drivers/base/regmap/regmap-i2c.c b/drivers/base/regmap/regmap-i2c.c
index 31e30dfced19..51a04961faf7 100644
--- a/drivers/base/regmap/regmap-i2c.c
+++ b/drivers/base/regmap/regmap-i2c.c
@@ -337,7 +337,7 @@ static int regmap_smbus_word_write_reg16(void *context, const void *data,
val = ((u8 *)data... |
542f5248cb481073203e0dadab5bcbd28aeae308 | Analyze and fix the following issue in the Linux kernel code: comedi: comedi_test: fix check for valid scan_begin_src in waveform_ai_cmdtest() | Problem Details:
Commit 783ddaebd397 ("staging: comedi: comedi_test: support
scan_begin_src == TRIG_FOLLOW") neglected to add a test that
`scan_begin_src` has only one bit set. The allowed values are
`TRIG_FOLLOW` and `TRIG_TIMER`, but the code incorrectly also allows
`TRIG_FOLLOW | TRIG_TIMER`. Add a call to
`comedi... | ```diff
diff --git a/drivers/comedi/drivers/comedi_test.c b/drivers/comedi/drivers/comedi_test.c
index 4050f66193e5..1f430ffc7bd9 100644
--- a/drivers/comedi/drivers/comedi_test.c
+++ b/drivers/comedi/drivers/comedi_test.c
@@ -274,6 +274,7 @@ static int waveform_ai_cmdtest(struct comedi_device *dev,
/* Step 2a : make... |
8a3bee801d420be8a7a0bae4a26547b353b8fe22 | Analyze and fix the following issue in the Linux kernel code: comedi: comedi_test: Fix limiting of convert_arg in waveform_ai_cmdtest() | Problem Details:
The function checks and possibly modifies the description of an
asynchronous command to be run on the analog input subdevice of a comedi
device attached to the "comedi_test" driver, returning 0 if no
modifications were required, or a positive value that indicates which
step of the checking process it f... | ```diff
diff --git a/drivers/comedi/drivers/comedi_test.c b/drivers/comedi/drivers/comedi_test.c
index 01aafce20ef8..4050f66193e5 100644
--- a/drivers/comedi/drivers/comedi_test.c
+++ b/drivers/comedi/drivers/comedi_test.c
@@ -324,10 +324,10 @@ static int waveform_ai_cmdtest(struct comedi_device *dev,
arg = min(arg,... |
689f2facc689c8add11d7ff69fbbad17d65ee596 | Analyze and fix the following issue in the Linux kernel code: USB: serial: option: add missing RSVD(5) flag for Rolling RW135R-GL | Problem Details:
The RW135R-GL entry added in commit 01e8d0f74222 ("USB: serial: option:
add support for Rolling Wireless RW135R-GL") was missing the
.driver_info = RSVD(5) flag used by other Rolling Wireless MBIM laptop
modules (e.g. RW135-GL and RW350-GL).
Without this flag, the option driver incorrectly binds to th... | ```diff
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 92c2feda3e3d..48ae0188f2e9 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -2476,7 +2476,8 @@ static const struct usb_device_id option_ids[] = {
{ USB_DEVICE_INTERFACE_CLASS(0x33f8, 0x0302, 0xff) }, /*... |
30beced6ec4931db201b77493d41d0df7d7eb5aa | Analyze and fix the following issue in the Linux kernel code: iov_iter: use kmemdup_array for dup_iter to harden against overflow | Problem Details:
While auditing the Linux 7.0-rc2 kernel, I identified a potential security
vulnerability in the iov_iter framework's memory allocation logic.
The dup_iter() function, which is exported via EXPORT_SYMBOL, currently
uses kmemdup() with a raw multiplication to allocate the duplicate iovec array:
new->io... | ```diff
diff --git a/lib/iov_iter.c b/lib/iov_iter.c
index 243662af1af7..273919b16161 100644
--- a/lib/iov_iter.c
+++ b/lib/iov_iter.c
@@ -1224,13 +1224,13 @@ const void *dup_iter(struct iov_iter *new, struct iov_iter *old, gfp_t flags)
{
*new = *old;
if (iov_iter_is_bvec(new))
- return new->bvec = kmemdup(new->b... |
19868f7034a1c5a548d70f20a35ad3562ac69e2c | Analyze and fix the following issue in the Linux kernel code: initramfs_test: test header fields with 0x hex prefix | Problem Details:
cpio header fields are 8-byte hex strings, but one "interesting"
side-effect of our historic simple_str[n]toul() use means that a "0x"
(or "0X") prefixed header field will be successfully processed when
coupled alongside a 6-byte hex remainder string.
"0x" prefix support is contrary to the initramfs s... | ```diff
diff --git a/init/initramfs_test.c b/init/initramfs_test.c
index 6fe1c44a74a5..b9f83dc194aa 100644
--- a/init/initramfs_test.c
+++ b/init/initramfs_test.c
@@ -316,7 +316,7 @@ static void __init initramfs_test_hardlink(struct kunit *test)
{
char *err, *cpio_srcbuf;
size_t len;
- struct kstat st0, st1;
+ str... |
5eb54da3f874b44149556542d949909898865e29 | Analyze and fix the following issue in the Linux kernel code: media: nxp: imx8-isi: Fix scale factor calculation for hardware rounding | Problem Details:
The ISI hardware rounds the actual output size up to an integer, as
described in i.MX93 Reference Manual section 57.7.8 (Channel 0 Scale
Factor). The scale factor must be calculated to ensure the theoretical
output value rounds up to exactly the desired size.
Fixes: cf21f328fcaf ("media: nxp: Add i.MX... | ```diff
diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-hw.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-hw.c
index 0187d4ab97e8..16b20ea2d1db 100644
--- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-hw.c
+++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-hw.c
@@ -112,7 +112,14 @@ static u32 mxc_isi_chann... |
57a7ec5c9f38ce6c4d6209c4b75c8e57e1fea6cf | Analyze and fix the following issue in the Linux kernel code: media: nxp: imx8-isi: Fix potential out-of-bounds issues | Problem Details:
The maximum downscaling factor supported by ISI can be up to 16. Add
minimum value constraint before applying the setting to hardware.
Otherwise, the process will not respond even when Ctrl+C is executed.
Fixes: cf21f328fcaf ("media: nxp: Add i.MX8 ISI driver")
Cc: stable@vger.kernel.org
Reviewed-by: ... | ```diff
diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h
index 14d63ec36416..7547a6559d4c 100644
--- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h
+++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h
@@ -11,6 +11,7 @@
#define __MXC_ISI_... |
d970b27cc48ec42f8a72bc3a4a4ad2e5c7a36395 | Analyze and fix the following issue in the Linux kernel code: media: nxp: imx8-isi: Clean up already-initialized pipes on probe failure | Problem Details:
When mxc_isi_pipe_init() fails partway through the channel loop or
when mxc_isi_v4l2_init() fails, the already initialized pipes are
not cleaned up.
Fix this by calling mxc_isi_pipe_cleanup() for each already-initialized
pipe in the err_xbar error path.
Fixes: cf21f328fcaf ("media: nxp: Add i.MX8 ISI... | ```diff
diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
index 2d639b789910..e8545761b5ff 100644
--- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
+++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
@@ -538,6 +538,8 @@ static int mxc_is... |
8262de0663318124824aaafd97ddb5d7bb53bd77 | Analyze and fix the following issue in the Linux kernel code: media: nxp: imx8-isi: Fix missing v4l2_subdev_cleanup() in pipe init error path | Problem Details:
After v4l2_subdev_init_finalize() succeeds in mxc_isi_pipe_init(), if
platform_get_irq() or devm_request_irq() fails, the error path jumps to
a label that only calls media_entity_cleanup() and mutex_destroy(),
missing the v4l2_subdev_cleanup() call needed to free the subdev active
state allocated by v4... | ```diff
diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
index cb50af2270f6..a59b9456b590 100644
--- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
+++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c
@@ -796,18 +796,20 @@ int mxc_isi_pip... |
567418eedd25b3d86d489807682030b4b98b73d9 | Analyze and fix the following issue in the Linux kernel code: media: nxp: imx8-isi: Add missing v4l2_subdev_cleanup() in crossbar and pipe | Problem Details:
Both mxc_isi_crossbar_init() and mxc_isi_pipe_init() call
v4l2_subdev_init_finalize() which allocates the subdev active state,
but neither mxc_isi_crossbar_cleanup() nor mxc_isi_pipe_cleanup()
calls v4l2_subdev_cleanup() to free it.
This causes a memory leak on every rmmod, reported by kmemleak:
un... | ```diff
diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
index 605a45124103..c580c831972e 100644
--- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
+++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c
@@ -491,6 +491,7 @@ e... |
b670bf89824ede5d07d20bb9bfbafb754846081d | Analyze and fix the following issue in the Linux kernel code: media: nxp: imx8-isi: Fix use-after-free on remove | Problem Details:
KASAN reports a slab-use-after-free in __media_entity_remove_link()
during rmmod of imx8_isi:
BUG: KASAN: slab-use-after-free in __media_entity_remove_link+0x608/0x650
Read of size 2 at addr ffff0000d47cb02a by task rmmod/724
Call trace:
__media_entity_remove_link+0x608/0x650
__media_enti... | ```diff
diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
index 4bf8570e1b9e..2d639b789910 100644
--- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
+++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
@@ -556,8 +556,8 @@ static void mxc_i... |
c4c01c4fd4a3916ffdfb35ad9f511c48e289f51c | Analyze and fix the following issue in the Linux kernel code: media: uapi: rkisp: Correct name version enum | Problem Details:
The name of the enum to hold the mapping of parameter buffer versions
have a typo in the name, correct it. While this is a uAPI header the
impact should be minimal as the enum is only used as a collection for
the one version number supported.
Fixes: e9d05e9d5db1 ("media: uapi: rkisp1-config: Add exten... | ```diff
diff --git a/include/uapi/linux/rkisp1-config.h b/include/uapi/linux/rkisp1-config.h
index b2d2a71f7baf..7638b2220600 100644
--- a/include/uapi/linux/rkisp1-config.h
+++ b/include/uapi/linux/rkisp1-config.h
@@ -1535,11 +1535,11 @@ struct rkisp1_ext_params_wdr_config {
sizeof(struct rkisp1_ext_params_wdr_confi... |
b3a035a02213c0409ce5f14bcbb0a435a6eca085 | Analyze and fix the following issue in the Linux kernel code: media: mc-entity: Fix documentation typo in function name | Problem Details:
The media_entity_pads_init() function name is misspelled. Fix it.
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Link: https://patch.msgid.link/20260506165438.1767378-1-laurent.pinchart@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pincha... | ```diff
diff --git a/include/media/media-entity.h b/include/media/media-entity.h
index b91ff6f8c3bb..904f61c14dc1 100644
--- a/include/media/media-entity.h
+++ b/include/media/media-entity.h
@@ -726,7 +726,7 @@ int media_entity_pads_init(struct media_entity *entity, u16 num_pads,
* the entity (currently, it does noth... |
f42d01aadcedd7bbf4f9a466cabe25c1781dedad | Analyze and fix the following issue in the Linux kernel code: tools/bootconfig: Fix buf leaks in apply_xbc | Problem Details:
If data calloc failed, free the buf before return.
Link: https://lore.kernel.org/all/20260520030126.147782-1-lihongtao@kylinos.cn/
Fixes: 950313ebf79c ("tools: bootconfig: Add bootconfig command")
Signed-off-by: Hongtao Lee <lihongtao@kylinos.cn>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@ker... | ```diff
diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c
index 643f707b8f1d..ddabde20585f 100644
--- a/tools/bootconfig/main.c
+++ b/tools/bootconfig/main.c
@@ -390,8 +390,10 @@ static int apply_xbc(const char *path, const char *xbc_path)
/* Backup the bootconfig data */
data = calloc(size + BOOTCON... |
1bbf0ced1d9db73ac7893c2187f3459288603e0d | Analyze and fix the following issue in the Linux kernel code: tcp: fix stale per-CPU tcp_tw_isn leak enabling ISN prediction | Problem Details:
Blamed commit moved the TIME_WAIT-derived ISN from the skb control
block to a per-CPU variable, assuming the value would always be consumed
by tcp_conn_request() for the same packet that wrote it. That assumption
is violated by multiple drop paths between the producer
(__this_cpu_write(tcp_tw_isn, isn)... | ```diff
diff --git a/include/net/tcp.h b/include/net/tcp.h
index ecbadcb3a744..98848db62894 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -65,8 +65,6 @@ static inline void tcp_orphan_count_dec(void)
this_cpu_dec(tcp_orphan_count);
}
-DECLARE_PER_CPU(u32, tcp_tw_isn);
-
void tcp_time_wait(struct sock *... |
567dbca22b373b05be0aa46eb2e64ee92d4f4790 | Analyze and fix the following issue in the Linux kernel code: geneve: Remove synchronize_net() in geneve_unquiesce(). | Problem Details:
When changing the geneve config, geneve_changelink() sandwiches
the config memcpy() between geneve_quiesce() and geneve_unquiesce().
geneve_quiesce() temporarily clears geneve->sock[46] and their
sk_user_data, and then calls synchronize_net() to wait for inflight
fast paths to finish.
geneve_unquiesc... | ```diff
diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
index 4e5d0a09a82d..e8ff03ed87dc 100644
--- a/drivers/net/geneve.c
+++ b/drivers/net/geneve.c
@@ -2206,7 +2206,6 @@ static void geneve_unquiesce(struct geneve_dev *geneve, struct geneve_sock *gs4,
if (gs6)
rcu_assign_sk_user_data(gs6->sk, gs6);
#end... |
99e22ddf4edb63dc8382bc028af928056d3450cf | Analyze and fix the following issue in the Linux kernel code: vsock/vmci: fix UAF when peer resets connection during handshake | Problem Details:
vmci_transport_recv_connecting_server() returned err = 0 for a peer
RST in its default switch arm:
err = pkt->type == VMCI_TRANSPORT_PACKET_TYPE_RST ? 0 : -EINVAL;
That made vmci_transport_recv_listen() skip vsock_remove_pending(),
leaving the pending socket on the listener's pending_links with
sk_s... | ```diff
diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c
index 4296ca1183f1..d2579380f51e 100644
--- a/net/vmw_vsock/vmci_transport.c
+++ b/net/vmw_vsock/vmci_transport.c
@@ -1164,7 +1164,7 @@ vmci_transport_recv_connecting_server(struct sock *listener,
/* Close and cleanup the connection... |
25ae123db10ba9ab890b56bcdb0a4363aee8529a | Analyze and fix the following issue in the Linux kernel code: net: bridge: remove stale rcu_barrier() in br_multicast_dev_del() | Problem Details:
This rcu_barrier() came from a time call_rcu() calls were used in
net/bridge/br_multicast.c.
Now kfree_rcu() is there, we can remove this problematic rcu_barrier()
which causes extreme RTNL pressure in many syzbot reports.
INFO: task syz-executor:77945 is blocked on a mutex likely owned by task kwork... | ```diff
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 49ceea3ff974..8efa3add5d47 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -4453,8 +4453,6 @@ void br_multicast_dev_del(struct net_bridge *br)
br_multicast_ctx_deinit(&br->multicast_ctx);
br_multicast_gc(&dele... |
c67b104fd7982162885c5e43057ca761006748e2 | Analyze and fix the following issue in the Linux kernel code: net/sched: sch_drr: annotate data-races around cl->deficit | Problem Details:
drr_dump_class_stats() runs without qdisc spinlock held.
Add missing READ_ONCE()/WRITE_ONCE() annotations around cl->deficit.
Fixes: edb09eb17ed8 ("net: sched: do not acquire qdisc spinlock in qdisc/class stats dump")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20... | ```diff
diff --git a/net/sched/sch_drr.c b/net/sched/sch_drr.c
index 3f6687fa9666..7da8c7c8421b 100644
--- a/net/sched/sch_drr.c
+++ b/net/sched/sch_drr.c
@@ -270,7 +270,7 @@ static int drr_dump_class_stats(struct Qdisc *sch, unsigned long arg,
memset(&xstats, 0, sizeof(xstats));
if (qlen)
- xstats.deficit = cl-... |
fa997ddef508b1b37b2fe4d2dad7c4b70958335e | Analyze and fix the following issue in the Linux kernel code: dpll: zl3073x: fix memory leak on pin registration failure | Problem Details:
If zl3073x_dpll_pin_register() fails, the allocated pin is not yet
added to zldpll->pins list. The error path calls
zl3073x_dpll_pins_unregister() which only iterates pins on the list,
so the current pin is leaked. Free the pin before jumping to the error
label.
Additionally move the pin->dpll_pin = N... | ```diff
diff --git a/drivers/dpll/zl3073x/dpll.c b/drivers/dpll/zl3073x/dpll.c
index c95e93ef3ab0..64b4e9e3e8fe 100644
--- a/drivers/dpll/zl3073x/dpll.c
+++ b/drivers/dpll/zl3073x/dpll.c
@@ -1394,8 +1394,8 @@ zl3073x_dpll_pin_register(struct zl3073x_dpll_pin *pin, u32 index)
err_register:
dpll_pin_put(pin->dpll_pi... |
e4bdef4d320b2fe73b8ebfc0cc0507fa9dc4a3b7 | Analyze and fix the following issue in the Linux kernel code: ipv4: use WARN_ON_ONCE() in ip_rt_bug() | Problem Details:
It turns out ip_rt_bug() can be called more than expected.
syzbot will still panic (because of panic_on_warn=1), but non debug
kernels will no longer die while repeating stack traces on the console.
Fixes: c378a9c019cf ("ipv4: Give backtrace in ip_rt_bug().")
Signed-off-by: Eric Dumazet <edumazet@goo... | ```diff
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index bc1296f0ea69..3d62d45d84bd 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1272,7 +1272,7 @@ static int ip_rt_bug(struct net *net, struct sock *sk, struct sk_buff *skb)
__func__, &ip_hdr(skb)->saddr, &ip_hdr(skb)->daddr,
skb->dev ? skb->dev... |
7eb72c1e3984150c45f77aa4299f7c2598a68e9b | Analyze and fix the following issue in the Linux kernel code: ipv4: icmp: reject broadcast/multicast routes | Problem Details:
syzbot was able to trigger ip_rt_bug() in a loop, using an IPv4 packet
with a crafted IPOPT_SSRR option:
options: ipv4_options {
options: array[ipv4_option] {
union ipv4_option {
ssrr: ipv4_option_route[IPOPT_SSRR] {
type: const = 0x89 (1 bytes)
length: len = 0x7 ... | ```diff
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index 7eeff658b467..23e921d313b3 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -961,6 +961,9 @@ void __icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info,
if (IS_ERR(rt))
goto out_unlock;
+ if (rt->rt_flags & (RTCF_BROADCAST | RTCF_MUL... |
4eb82ba543421e9e38cc14e4e82058b78850df50 | Analyze and fix the following issue in the Linux kernel code: net: devmem: reject dma-buf bind with non-page-aligned size or SG length | Problem Details:
net_devmem_bind_dmabuf() trusts dmabuf->size and sg_dma_len() to be
PAGE_SIZE multiples without checking:
- tx_vec is sized dmabuf->size / PAGE_SIZE, and
net_devmem_get_niov_at() only bounds-checks virt_addr < dmabuf->size
before indexing tx_vec[virt_addr / PAGE_SIZE]. With size =
N*PAGE... | ```diff
diff --git a/net/core/devmem.c b/net/core/devmem.c
index 468344739db2..4f71de44c0fb 100644
--- a/net/core/devmem.c
+++ b/net/core/devmem.c
@@ -241,6 +241,11 @@ net_devmem_bind_dmabuf(struct net_device *dev,
}
if (direction == DMA_TO_DEVICE) {
+ if (!IS_ALIGNED(dmabuf->size, PAGE_SIZE)) {
+ err = -EINVA... |
fd948c3f96b18ff9ba7d3e8eae13d196593e1aaf | Analyze and fix the following issue in the Linux kernel code: virt: sev-guest: Explicitly leak pages in unknown state | Problem Details:
When set_memory_{encrypted,decrypted}() fail, the user cannot know at which
point the function failed, meaning that the pages are left in an unknown state
from the point of view of the caller.
Since the pages may be left in an unencrypted state, they are not suitable for
general use, and cannot be ret... | ```diff
diff --git a/drivers/virt/coco/sev-guest/sev-guest.c b/drivers/virt/coco/sev-guest/sev-guest.c
index 910a1de0d5a7..d186ae55cf63 100644
--- a/drivers/virt/coco/sev-guest/sev-guest.c
+++ b/drivers/virt/coco/sev-guest/sev-guest.c
@@ -176,6 +176,7 @@ static int get_ext_report(struct snp_guest_dev *snp_dev, struct s... |
33644bd38aec24fe043e78ce5dca38e7156f8328 | Analyze and fix the following issue in the Linux kernel code: selftests/bpf: add regression test for ktls+sockmap verdict UAF | Problem Details:
Test the scenario where a socket is inserted into a sockmap with a
BPF_SK_SKB_VERDICT program before TLS RX is configured. Previously
sk_psock_verdict_data_ready() would call tcp_read_skb() and drain the
receive queue without advancing copied_seq, causing tls_decrypt_sg()
to walk a dangling frag_list ... | ```diff
diff --git a/tools/testing/selftests/bpf/prog_tests/sockmap_ktls.c b/tools/testing/selftests/bpf/prog_tests/sockmap_ktls.c
index b87e7f39e15a..6ed8e149e3d5 100644
--- a/tools/testing/selftests/bpf/prog_tests/sockmap_ktls.c
+++ b/tools/testing/selftests/bpf/prog_tests/sockmap_ktls.c
@@ -417,6 +417,107 @@ static ... |
ddf8029623a1af20e984c040e89ff918158397ab | Analyze and fix the following issue in the Linux kernel code: bpf, skmsg: fix verdict sk_data_ready racing with ktls rx | Problem Details:
sk_psock_strp_data_ready() already checks tls_sw_has_ctx_rx() and
defers to psock->saved_data_ready when a TLS RX context is present,
avoiding a conflict with the TLS strparser's ownership of the receive
queue (commit e91de6afa81c, "bpf: Fix running sk_skb program types
with ktls").
sk_psock_verdict_d... | ```diff
diff --git a/net/core/skmsg.c b/net/core/skmsg.c
index 6187a83bd741..e1850caf1a71 100644
--- a/net/core/skmsg.c
+++ b/net/core/skmsg.c
@@ -1268,12 +1268,19 @@ out:
static void sk_psock_verdict_data_ready(struct sock *sk)
{
const struct proto_ops *ops = NULL;
+ struct sk_psock *psock;
struct socket *sock;
... |
0c4d043f61f9bd37817ad51d36e11adf77cd461a | Analyze and fix the following issue in the Linux kernel code: selftests: rds: Handle errors in netns_socket | Problem Details:
Sockets created by child processes in netns_socket may raise
exceptions that are currently not handled by the parent. If for
example a namespace didn't exist or the rds module didn't load. Because
these exceptions occur with in a child thread, the child thread exits,
but the parent does not check the ... | ```diff
diff --git a/tools/testing/selftests/net/rds/test.py b/tools/testing/selftests/net/rds/test.py
index f7d0dba85131..2188221ee780 100755
--- a/tools/testing/selftests/net/rds/test.py
+++ b/tools/testing/selftests/net/rds/test.py
@@ -56,27 +56,28 @@ def netns_socket(netns, *sock_args):
child = os.fork()
... |
16f48efaeb6991193fb7775c577f06f5b20b0c90 | Analyze and fix the following issue in the Linux kernel code: net/rds: Don't sleep inside rds_ib_conn_path_shutdown | Problem Details:
New rds rdma self tests exposed a hang when tearing down
the ib network configs. This is caused by the shutdown worker
thread sleeping on the wait_event call, which blocks other work
items in the queue. Fix this by changing wait_event to
wait_event timeout, and looping until the wait check succeeds.
... | ```diff
diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c
index 0c64c504f79d..6b40345ba44d 100644
--- a/net/rds/ib_cm.c
+++ b/net/rds/ib_cm.c
@@ -1038,6 +1038,19 @@ out:
return ret;
}
+static unsigned long rds_ib_conn_path_shutdown_check_wait(struct rds_conn_path *cp)
+{
+ struct rds_connection *conn = cp->cp_conn;
+... |
7b67ade89ba1730780e6d4d286a35716871954bd | Analyze and fix the following issue in the Linux kernel code: drm/i915/casf: fix comment typos | Problem Details:
Remove superfluous whitespace character and fix the spelling.
Cc: Nemesa Garg <nemesa.garg@intel.com>
Signed-off-by: Michał Grzelak <michal.grzelak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msg... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_casf.c b/drivers/gpu/drm/i915/display/intel_casf.c
index c2d2746c5f04..9a306aee2199 100644
--- a/drivers/gpu/drm/i915/display/intel_casf.c
+++ b/drivers/gpu/drm/i915/display/intel_casf.c
@@ -162,7 +162,7 @@ static u32 casf_coeff(const struct intel_crtc_state *crtc... |
e7c70bf97e90d974cd575e4c90f8f9b07d056da3 | Analyze and fix the following issue in the Linux kernel code: net: ag71xx: check error for platform_get_irq | Problem Details:
Complete error handling for a failed platform_get_irq() call
Fixes: d51b6ce441d3 ("net: ethernet: add ag71xx driver")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
Link: https://patch.msgid.link/20260516212616.11758-1-rosenp@gmail.com
Signed-off-by... | ```diff
diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/atheros/ag71xx.c
index a5ab99474179..4e4794c4dfdc 100644
--- a/drivers/net/ethernet/atheros/ag71xx.c
+++ b/drivers/net/ethernet/atheros/ag71xx.c
@@ -1856,6 +1856,9 @@ static int ag71xx_probe(struct platform_device *pdev)
ag71xx_int_disa... |
8bfab4b6ffc2fe92da86300728fc8c3c7ebffb56 | Analyze and fix the following issue in the Linux kernel code: rxrpc: Fix RESPONSE packet verification to extract skb to a linear buffer | Problem Details:
This improves the fix for CVE-2026-43500.
Fix the verification of RESPONSE packets to avoid the problem of
overwriting a RESPONSE packet sent via splice to a local address by
extracting the contents of the UDP packet into a kmalloc'd linear buffer
rather than decrypting the data in place in the sk_buf... | ```diff
diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h
index 783367eea798..98f2165159d7 100644
--- a/net/rxrpc/ar-internal.h
+++ b/net/rxrpc/ar-internal.h
@@ -307,15 +307,16 @@ struct rxrpc_security {
struct sk_buff *challenge);
/* verify a response */
- int (*verify_response)(struct rxrpc_... |
d2bc90cf6c75cb96d2ce549be6c35efa3099d25b | Analyze and fix the following issue in the Linux kernel code: rxrpc: Fix DATA decrypt vs splice() by copying data to buffer in recvmsg | Problem Details:
This improves the fix for CVE-2026-43500.
Fix the pagecache corruption from in-place decryption of a DATA packet
transmitted locally by splice() by getting rid of the packet sharing in the
I/O thread and unconditionally extracting the packet content into a bounce
buffer in which the buffer is decrypte... | ```diff
diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h
index 27c2aa2dd023..783367eea798 100644
--- a/net/rxrpc/ar-internal.h
+++ b/net/rxrpc/ar-internal.h
@@ -213,8 +213,6 @@ struct rxrpc_skb_priv {
struct {
u16 offset; /* Offset of data */
u16 len; /* Length of data */
- u8 flags;
-#d... |
2b50aceafe6606ea52ed42aadd1b4d44a188aade | Analyze and fix the following issue in the Linux kernel code: crypto/krb5, rxrpc: Fix lack of pre-decrypt/pre-verify length checks | Problem Details:
Change the krb5 crypto library to provide facilities to precheck the length
of the message about to be decrypted or verified.
Fix AF_RXRPC to make use of this to validate DATA packets secured with
RxGK.
Fixes: 9d1d2b59341f ("rxrpc: rxgk: Implement the yfs-rxgk security class (GSSAPI)")
Closes: https:... | ```diff
diff --git a/Documentation/crypto/krb5.rst b/Documentation/crypto/krb5.rst
index beffa0133446..f62e07ac6811 100644
--- a/Documentation/crypto/krb5.rst
+++ b/Documentation/crypto/krb5.rst
@@ -158,13 +158,22 @@ returned.
When a message has been received, the location and size of the data with the
message can be... |
b8d7519352ba8c6df83259295d4a3bad093cae90 | Analyze and fix the following issue in the Linux kernel code: net: shaper: rework the VALID marking (again) | Problem Details:
Recent commit changed the semantics from NOT_VALID to VALID.
I didn't realize that the flags are not stored atomically
with the entry in XArray. There's still a race of reader
observing a VALID mark for a slot, getting interrupted,
writer replacing the entry with a different one, reader
continuing, fet... | ```diff
diff --git a/include/net/net_shaper.h b/include/net/net_shaper.h
index 5c3f49b52fe9..3939b816b001 100644
--- a/include/net/net_shaper.h
+++ b/include/net/net_shaper.h
@@ -53,6 +53,7 @@ struct net_shaper {
/* private: */
u32 leaves; /* accounted only for NODE scope */
+ bool valid;
struct rcu_head rcu;
... |
f6c6b4d1c833bf18a8ba929576736f7dbd34a8a1 | Analyze and fix the following issue in the Linux kernel code: ARM: dts: BCM5301X: EA6500v2: fix USB3 | Problem Details:
USB3 needs to have a GPIO pulled HIGH in order to function. Add vcc-gpio
to do so.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://lore.kernel.org/r/20260406220528.101340-1-rosenp@gmail.com
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> | ```diff
diff --git a/arch/arm/boot/dts/broadcom/bcm4708-linksys-ea6500-v2.dts b/arch/arm/boot/dts/broadcom/bcm4708-linksys-ea6500-v2.dts
index 0454423fe166..ad246f9a734a 100644
--- a/arch/arm/boot/dts/broadcom/bcm4708-linksys-ea6500-v2.dts
+++ b/arch/arm/boot/dts/broadcom/bcm4708-linksys-ea6500-v2.dts
@@ -43,3 +43,7 @@... |
1dd3a357b8c1b51b26422b742223f10db648118b | Analyze and fix the following issue in the Linux kernel code: ARM: dts: BCM5301X: R6300v2: fix USB3 | Problem Details:
USB3 needs GPIO to be pulled HIGH in order to function. Add vcc-gpio to
do so.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://lore.kernel.org/r/20260406220453.101185-1-rosenp@gmail.com
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> | ```diff
diff --git a/arch/arm/boot/dts/broadcom/bcm4708-netgear-r6300-v2.dts b/arch/arm/boot/dts/broadcom/bcm4708-netgear-r6300-v2.dts
index 77396730bdd3..55f0d9e90d5f 100644
--- a/arch/arm/boot/dts/broadcom/bcm4708-netgear-r6300-v2.dts
+++ b/arch/arm/boot/dts/broadcom/bcm4708-netgear-r6300-v2.dts
@@ -86,3 +86,7 @@
&u... |
d7b3f4a4eb23d82ef923cf17509292b719340378 | Analyze and fix the following issue in the Linux kernel code: ARM: dts: NSP: Move MX6X pinctrl config to PWM node | Problem Details:
On boot there is this warning:
/axi@18000000/pinctrl@3f1c0: Fixed dependency cycle(s) with /axi@18000000/pinctrl@3f1c0/pwm_leds
Fix by moving the pinctrl configuration to pwm, which is the actual
consumer.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://lore.kernel.org/r/20260430051612.7... | ```diff
diff --git a/arch/arm/boot/dts/broadcom/bcm958625-meraki-mx6x-common.dtsi b/arch/arm/boot/dts/broadcom/bcm958625-meraki-mx6x-common.dtsi
index 7e71aecb7251..0ab2ed32be2a 100644
--- a/arch/arm/boot/dts/broadcom/bcm958625-meraki-mx6x-common.dtsi
+++ b/arch/arm/boot/dts/broadcom/bcm958625-meraki-mx6x-common.dtsi
@... |
abe003b33223ff33552f291644bf35d9c2f992fb | Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Fix eswitch mode block underflow on IPsec acquire SA | Problem Details:
mlx5e_xfrm_add_state() handles acquire-flow temporary SAs by allocating
software state and skipping hardware offload setup.
That path jumps to the common success label before taking the eswitch mode
block. After tunnel-mode validation was moved earlier, the common success
label unconditionally calls m... | ```diff
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
index a52e12c3c95a..db260e3d1412 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
@@ -792,8 +792,10... |
78effd896eee11ac9db9bcbb53e7bbcad96073d7 | Analyze and fix the following issue in the Linux kernel code: udp: Fix UDP length on last GSO_PARTIAL segment | Problem Details:
Following the cited commit, __udp_gso_segment() writes single MSS length
in the UDP header.
The cited patch doesn't account for the fact that the last segment could
be a GSO skb by itself. This could happen when the size of the packet is
a multiple of MSS, hence the first segment is also the last one (... | ```diff
diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
index 2578aa7f9ff9..29651b1a0bc7 100644
--- a/net/ipv4/udp_offload.c
+++ b/net/ipv4/udp_offload.c
@@ -590,9 +590,12 @@ struct sk_buff *__udp_gso_segment(struct sk_buff *gso_skb,
uh = udp_hdr(seg);
}
- /* last packet can be partial gso_size, acc... |
5f17ae0f595aeb560155ce98edbe44d3eacc7e40 | Analyze and fix the following issue in the Linux kernel code: udp: gso: Fix handling checksum in __udp_gso_segment | Problem Details:
The cited commit started using msslen for uh->len, but still uses newlen
to adjust uh->check. Although the checksum is ignored in most cases due
to the hardware offload, __udp_gso_segment attempts to maintain the
correct one. Fix uh->check and adjust it by the right value.
Additionally, after the fix,... | ```diff
diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
index a0813d425b71..2578aa7f9ff9 100644
--- a/net/ipv4/udp_offload.c
+++ b/net/ipv4/udp_offload.c
@@ -482,11 +482,11 @@ struct sk_buff *__udp_gso_segment(struct sk_buff *gso_skb,
struct sock *sk = gso_skb->sk;
unsigned int sum_truesize = 0;
stru... |
85cc481af5ffa23809b7bb100aa774172369983c | Analyze and fix the following issue in the Linux kernel code: perf build: Prefix SCRIPTS with output directory to fix continuous rebuilds | Problem Details:
In Makefile.perf, ALL_PROGRAMS includes SCRIPTS (perf-archive,
perf-iostat). However, unlike PROGRAMS and DLFILTERS, SCRIPTS was not
prefixed with $(OUTPUT).
During out-of-tree builds (or when O= is specified), Make checked for the
unprefixed target 'tools/perf/perf-archive'. Since the actual script w... | ```diff
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index b8a81c9749a8..fc92d6ceac5b 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -405,7 +405,7 @@ python-clean := $(call QUIET_CLEAN, python) $(RM) -r $(PYTHON_EXTBUILD) $(OUTPUT
# Use the detected configuration
-include ... |
9f116f4b811b5846808e27507a3aa2824819edeb | Analyze and fix the following issue in the Linux kernel code: perf tests: Add test for uncore event sorting | Problem Details:
Add a test for uncore event sorting matching multiple PMUs.
Uncore PMUs may have a common prefix, like the PMUs
uncore_imc_free_running_0 and uncore_imc_free_running_1 have a prefix of
uncore_imc_free_running.
Parsing an event group like "{data_read,data_write}" for those PMUs
should result with two ... | ```diff
diff --git a/tools/perf/tests/Build b/tools/perf/tests/Build
index c2a67ce45941..66944a4f4968 100644
--- a/tools/perf/tests/Build
+++ b/tools/perf/tests/Build
@@ -3,6 +3,7 @@
perf-test-y += builtin-test.o
perf-test-y += tests-scripts.o
perf-test-y += parse-events.o
+perf-test-y += uncore-event-sorting.o
per... |
44126343d58c68adaa8343fbf1c07dd20078c35e | Analyze and fix the following issue in the Linux kernel code: x86/mm: Disable broadcast TLB flush when PCID is disabled | Problem Details:
Booting with "nopcid" clears X86_FEATURE_PCID and keeps CR4.PCIDE from being
set to one. On AMD CPUs that support INVLPGB, broadcast TLB flushing remains
enabled.
There are two checks that decide whether the global ASID code runs,
mm_global_asid() and consider_global_asid(), that key off of the
X86_FE... | ```diff
diff --git a/arch/x86/kernel/cpu/cpuid-deps.c b/arch/x86/kernel/cpu/cpuid-deps.c
index 146f6f8b0650..99801e844b30 100644
--- a/arch/x86/kernel/cpu/cpuid-deps.c
+++ b/arch/x86/kernel/cpu/cpuid-deps.c
@@ -92,6 +92,7 @@ static const struct cpuid_dep cpuid_deps[] = {
{ X86_FEATURE_FRED, X86_FEATURE_LKGS },... |
b9285405c5f6144f4444f97bf3048d865e11cc1d | Analyze and fix the following issue in the Linux kernel code: vfio/xe: avoid duplicate reset in xe_vfio_pci_reset_done | Problem Details:
xe_vfio_pci_reset_done() sets deferred_reset and, when it manages to
acquire state_mutex itself, hands the cleanup off to
xe_vfio_pci_state_mutex_unlock().
That helper already clears deferred_reset and runs xe_vfio_pci_reset()
before dropping the mutex. Calling xe_vfio_pci_reset() again right
afterwar... | ```diff
diff --git a/drivers/vfio/pci/xe/main.c b/drivers/vfio/pci/xe/main.c
index 4ecadbbfd86e..cbff5af385ef 100644
--- a/drivers/vfio/pci/xe/main.c
+++ b/drivers/vfio/pci/xe/main.c
@@ -135,8 +135,6 @@ static void xe_vfio_pci_reset_done(struct pci_dev *pdev)
}
spin_unlock(&xe_vdev->reset_lock);
xe_vfio_pci_state... |
35c9fb22000f1ce10c0f3627d30fa8763e721719 | Analyze and fix the following issue in the Linux kernel code: perf lock contention: Fix SIGCHLD vs pause() race in __cmd_contention() | Problem Details:
__cmd_contention() suffers from the same lost-wakeup race as the perf
sched stats paths: SIGCHLD can be consumed by the signal handler
before pause() is entered, hanging the process.
Apply the same fix: replace pause() with a loop checking the 'done'
flag and using waitpid(WNOHANG) for the workload ca... | ```diff
diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c
index 064b3aa4bad7..94a8c35abb0b 100644
--- a/tools/perf/builtin-lock.c
+++ b/tools/perf/builtin-lock.c
@@ -31,6 +31,7 @@
#include <stdio.h>
#include <sys/types.h>
#include <sys/prctl.h>
+#include <sys/wait.h>
#include <semaphore.h>
#includ... |
5b8c90e06622308ff4b6c14260baee6fad064289 | Analyze and fix the following issue in the Linux kernel code: perf sched stats: Fix SIGCHLD vs pause() race in schedstat_live() | Problem Details:
perf_sched__schedstat_live() has the same lost-wakeup race as
perf_sched__schedstat_record(): a short-lived workload's SIGCHLD
can be consumed by the signal handler before pause() is entered,
hanging the process.
Apply the same fix: replace pause() with a loop checking the 'done'
flag and using waitpi... | ```diff
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 4f54a08e6672..812a1b0d56d6 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -4743,6 +4743,7 @@ static int perf_sched__schedstat_live(struct perf_sched *sched,
int reset = 0;
int err = 0;
+ done = 0;
sig... |
9416008e5462cf7a1da62bbaca915f483cea8b77 | Analyze and fix the following issue in the Linux kernel code: perf sched stats: Fix SIGCHLD vs pause() race in schedstat_record() | Problem Details:
If the profiled workload exits very quickly, SIGCHLD can be delivered
and consumed by the empty signal handler before the process enters
pause(), causing an indefinite hang.
Fix this with a simpler approach:
- The signal handler now sets a 'volatile sig_atomic_t done' flag.
Reset 'done' before re... | ```diff
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 9d73c7043182..4f54a08e6672 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -36,6 +36,7 @@
#include <linux/zalloc.h>
#include <sys/prctl.h>
#include <sys/resource.h>
+#include <sys/wait.h>
#include <inttype... |
06dbe2628063d762bc01a5a4d746db9e11e084cf | Analyze and fix the following issue in the Linux kernel code: intel_idle: Add constants for MSR_PKG_CST_CONFIG_CONTROL | Problem Details:
Add two constants for the package C-state limit fields in
MSR_PKG_CST_CONFIG_CONTROL.
The SKX_ prefix stands for "Skylake Xeon" and makes it explicit that
the mask is CPU model-specific. The same values have applied to all
Xeon platforms starting from SKX.
Reviewed-by: Andy Shevchenko <andriy.shevche... | ```diff
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index f49354e37777..259013c246d9 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -81,6 +81,11 @@ static bool ibrs_off __read_mostly;
/* Maximum allowed C-state target residency */
#define MAX_CMDLINE_RESIDENCY_US (100... |
ab1513597c6cf17cd1ad2a21e3b045421b48e022 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: fix UAF in l2cap_sock_cleanup_listen() vs l2cap_conn_del() | Problem Details:
bt_accept_dequeue() unlinks a not-yet-accepted child from the parent
accept queue and release_sock()s it before returning, so the returned
sk has no caller reference and is unlocked.
l2cap_sock_cleanup_listen() walks these children on listening-socket
close. A concurrent HCI disconnect drives hci_rx_... | ```diff
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
index 9d68dd86023c..1a6aa3f8d4d6 100644
--- a/net/bluetooth/af_bluetooth.c
+++ b/net/bluetooth/af_bluetooth.c
@@ -340,6 +340,16 @@ restart:
if (newsock)
sock_graft(sk, newsock);
+ /* Hand the caller a reference taken while sk ... |
c1bb9336ae6b54a5f6a353c4bd4ed9a4307e429b | Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_uart: fix UAFs and race conditions in close and init paths | Problem Details:
Vulnerabilities leading to Use-After-Free (UAF) and Null Pointer
Dereference (NPD) conditions were observed in the lifecycle management
of hci_uart.
The primary issue arises because the workqueues (init_ready and
write_work) are only flushed/cancelled if the HCI_UART_PROTO_READY
flag is set during TTY... | ```diff
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index 275ea865bc29..47f4902b40b4 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -194,7 +194,15 @@ void hci_uart_init_work(struct work_struct *work)
err = hci_register_dev(hu->hdev);
if (err < 0) {
... |
d3f7d17960ed50df3a6709c5158caff989c8c905 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: MGMT: validate Add Extended Advertising Data length | Problem Details:
MGMT_OP_ADD_EXT_ADV_DATA is registered as a variable-length command,
with MGMT_ADD_EXT_ADV_DATA_SIZE as the fixed header size. The handler
then uses cp->adv_data_len and cp->scan_rsp_len to validate and copy
cp->data, but it never checks that those bytes are part of the mgmt
command payload.
A short ... | ```diff
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index b05bb380e5f8..de5bd6b637b2 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -9110,9 +9110,15 @@ static int add_ext_adv_data(struct sock *sk, struct hci_dev *hdev, void *data,
struct adv_info *adv_instance;
int err = 0;
struct mg... |
dd1dda6b8d6e1f4376a5b3055a04f0ecbdb4d6bd | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btmtk: fix urb->setup_packet leak in error paths | Problem Details:
The setup_packet of control urb is not freed if usb_submit_urb fails or
the submitted urb is killed. Add free in these two paths.
Fixes: a1c49c434e150 ("Bluetooth: btusb: Add protocol support for MediaTek MT7668U USB devices")
Signed-off-by: Jiajia Liu <liujiajia@kylinos.cn>
Signed-off-by: Luiz August... | ```diff
diff --git a/drivers/bluetooth/btmtk.c b/drivers/bluetooth/btmtk.c
index a29f72216c34..8ff66b276af0 100644
--- a/drivers/bluetooth/btmtk.c
+++ b/drivers/bluetooth/btmtk.c
@@ -537,6 +537,7 @@ static void btmtk_usb_wmt_recv(struct urb *urb)
return;
} else if (urb->status == -ENOENT) {
/* Avoid suspend fai... |
84c24fb151fc1179355296d7ff29129ac7c42129 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: ISO: drop ISO_END frames received without prior ISO_START | Problem Details:
ISO data PDUs carry a packet-boundary flag indicating START, CONT, END
or SINGLE. The ISO_CONT branch of iso_recv() guards against a missing
ISO_START by checking conn->rx_len before touching conn->rx_skb, but
ISO_END does not.
If a peer sends an ISO_END as the first packet on a fresh ISO
connection, ... | ```diff
diff --git a/net/bluetooth/iso.c b/net/bluetooth/iso.c
index 7cb2864fe872..b971281f0a2b 100644
--- a/net/bluetooth/iso.c
+++ b/net/bluetooth/iso.c
@@ -2593,6 +2593,11 @@ int iso_recv(struct hci_dev *hdev, u16 handle, struct sk_buff *skb, u16 flags)
break;
case ISO_END:
+ if (!conn->rx_len) {
+ BT_ERR(... |
88365d04fdc821dc4e9eb0cc00fdf6905430d172 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: btintel_pcie: Fix incorrect MAC access programming | Problem Details:
btintel_pcie_get_mac_access() and btintel_pcie_release_mac_access()
were programming STOP_MAC_ACCESS_DIS and XTAL_CLK_REQ in addition to
the MAC_ACCESS_REQ handshake. These bits are not part of the host
MAC-access handshake on the supported parts; the driver was
programming them incorrectly. Drop the w... | ```diff
diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index a3643e67b33f..37e050763633 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -582,12 +582,10 @@ static int btintel_pcie_get_mac_access(struct btintel_pcie_data *data)
reg = btintel_pc... |
23d528d817a485fe9800a66c9411bd9e3d8a6f63 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_sync: Fix not setting mask for HCI_EVT_LE_ALL_REMOTE_FEATURES_COMPLETE | Problem Details:
This fixes not setting the bit for HCI_EVT_LE_ALL_REMOTE_FEATURES_COMPLETE
when extended features bit is set otherwise the controller may not
generate HCI_EVT_LE_ALL_REMOTE_FEATURES_COMPLETE causing
hci_le_read_all_remote_features_sync to timeout waiting for it.
Also remove dead code.
Fixes: a106e50b... | ```diff
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index fd3aacdea512..aff8562a8690 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -4438,6 +4438,9 @@ static int hci_le_set_event_mask_sync(struct hci_dev *hdev)
events[4] |= 0x02; /* LE BIG Info Advertising Report */
}
... |
59e932ded949fa6f0340bf7c6d7818f962fa4fd2 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: bnep: Fix UAF read of dev->name | Problem Details:
bnep_add_connection() needs to keep holding the bnep_session_sem while
reading dev->name (just like bnep_get_connlist() does); otherwise the
bnep_session() thread can concurrently free the net_device, which can for
example be triggered by a concurrent bnep_del_connection().
(This UAF is fairly uninter... | ```diff
diff --git a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c
index 853c8d7644b5..0de5df690bd0 100644
--- a/net/bluetooth/bnep/core.c
+++ b/net/bluetooth/bnep/core.c
@@ -645,8 +645,8 @@ int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock)
goto failed;
}
- up_write(&bnep_session... |
783c8109844503bd1c35dab41b6d5fd074a9f131 | Analyze and fix the following issue in the Linux kernel code: PM: hibernate: call preallocate_image() after freeze prepare | Problem Details:
Certain drivers release resources (pinned pages, etc.) into system
memory during the prepare freeze PM op, making them swappable.
Currently, hibernate_preallocate_memory() is called before prepare
freeze, so those drivers have no opportunity to release resources
first. If a driver is holding a large am... | ```diff
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index af8d07bafe02..d2479c69d71a 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -392,23 +392,6 @@ static int create_image(int platform_mode)
return error;
}
-static void shrink_shmem_memory(void)
-{
- struct sysinfo i... |
576ec047d20b368b43c4d5db98c4f2e0f3c101ec | Analyze and fix the following issue in the Linux kernel code: tracing: Avoid NULL return from hist_field_name() on truncation | Problem Details:
hist_field_name() returns "" everywhere except the fully-qualified
VAR_REF/EXPR case, where snprintf() truncation returns NULL early
and bypasses the bottom NULL->"" guard. Callers don't expect NULL:
strcat(expr, hist_field_name(field, 0)) at trace_events_hist.c:1758
and the strcmp() in the sort-key ma... | ```diff
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
index 0dbbf6cca9bc..eb2c2bc8bc3d 100644
--- a/kernel/trace/trace_events_hist.c
+++ b/kernel/trace/trace_events_hist.c
@@ -1369,10 +1369,8 @@ static const char *hist_field_name(struct hist_field *field,
len = snprintf(full_name,... |
22572dbcd3486e6c4dced877125bbf50e4e24edf | Analyze and fix the following issue in the Linux kernel code: cgroup: rstat: relax NMI guard after switch to try_cmpxchg | Problem Details:
Commit 36df6e3dbd7e ("cgroup: make css_rstat_updated nmi safe") used
this_cpu_cmpxchg() for the lockless insertion, and therefore required
both ARCH_HAVE_NMI_SAFE_CMPXCHG and ARCH_HAS_NMI_SAFE_THIS_CPU_OPS in
the NMI guard: on archs without the latter, this_cpu_cmpxchg() falls
back to "local_irq_save()... | ```diff
diff --git a/kernel/cgroup/rstat.c b/kernel/cgroup/rstat.c
index ed60ba119c68..de816a43db9f 100644
--- a/kernel/cgroup/rstat.c
+++ b/kernel/cgroup/rstat.c
@@ -81,11 +81,10 @@ void __css_rstat_updated(struct cgroup_subsys_state *css, int cpu)
lockdep_assert_preemption_disabled();
/*
- * For archs withnot ... |
9aa1ec2e1d21be400767aa9b754adbae7d8e1d32 | Analyze and fix the following issue in the Linux kernel code: perf evsel: Add bounds checking to trace point raw data accessors | Problem Details:
Prevent out-of-bounds memory reads when parsing corrupted or maliciously crafted
perf.data files by introducing robust bounds validation to raw data accessors.
- Add a helper out_of_bounds() to check if field offsets and sizes exceed the
sample's raw_size boundary, preventing heap read overflows.
- ... | ```diff
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index bb48568b8101..713a250c7374 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -3700,22 +3700,63 @@ struct tep_format_field *evsel__common_field(struct evsel *evsel, const char *na
return tp_format ? tep_find_common_field(t... |
a41a462334a239511bad6f4509c8625a46d36c84 | Analyze and fix the following issue in the Linux kernel code: perf timechart: Bounds check CPU | Problem Details:
Prevent out-of-bounds writes/reads in CPU state tracking arrays by enforcing
strict MAX_CPUS bounds checks in timechart's tracepoint handlers.
Ensure that cpu_id retrieved from idle/frequency and sched tracepoints is less
than MAX_CPUS before indexing into cpus_cstate_state, cpus_cstate_start_times,
a... | ```diff
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c
index d2e15d02304e..630756bebe32 100644
--- a/tools/perf/builtin-timechart.c
+++ b/tools/perf/builtin-timechart.c
@@ -605,6 +605,10 @@ process_sample_cpu_idle(struct timechart *tchart __maybe_unused,
u32 state = perf_sample__intval(... |
16ccbec0f3e14f6ad06af6112ea4fa5668cab46a | Analyze and fix the following issue in the Linux kernel code: perf sched: Bounds check CPU in sched switch events | Problem Details:
Ensure CPU indexes parsed from sched switch and runtime events fit within the
MAX_CPUS limit to prevent out-of-bounds indexing.
Add explicit bounds checks for sample->cpu against MAX_CPUS inside
process_sched_switch_event, process_sched_runtime_event, and
timehist_sched_change_event. This prevents ind... | ```diff
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index d984e58c7dbf..9d73c7043182 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -1791,6 +1791,11 @@ static int process_sched_switch_event(const struct perf_tool *tool,
u32 prev_pid = perf_sample__intval(sample, "... |
e454fef5d2c6e3fc89bd87a2da491dae3977a9ed | Analyze and fix the following issue in the Linux kernel code: perf synthetic-events: Bound check when synthesizing mmap2 and build_id events | Problem Details:
Add robust boundary checks when synthesizing mmap2 and build_id events to
ensure that filename fields do not overflow the fixed-size stack allocations or the
synthesized event structures.
Verify that the filename fits safely within the allocated boundaries of the
mmap2 event structure, and prevent pot... | ```diff
diff --git a/tools/perf/util/synthetic-events.c b/tools/perf/util/synthetic-events.c
index fd1d4c0345d6..d665b0f94b32 100644
--- a/tools/perf/util/synthetic-events.c
+++ b/tools/perf/util/synthetic-events.c
@@ -2268,14 +2268,20 @@ int perf_event__synthesize_build_id(const struct perf_tool *tool,
const ... |
b3ab668761786f9df9e19dd2805e657af2f19c41 | Analyze and fix the following issue in the Linux kernel code: perf kmem: Fix memory leaks on error path and when skipping | Problem Details:
Fix memory leaks on the error paths and skipped sample handling paths
in the perf kmem tool.
Ensure that all allocated GFP flags and thread references are properly freed and
released via thread__put() when skipping samples or encountering parsing failures,
preventing long-term memory usage leaks durin... | ```diff
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index 68a39f56204d..daf2272c7337 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -783,17 +783,21 @@ static int parse_gfp_flags(struct perf_sample *sample, unsigned int gfp_flags)
new = realloc(gfps, (nr_gfps + 1) ... |
00b36b394c15f625fa166ba3b399cad5bd5065f9 | Analyze and fix the following issue in the Linux kernel code: perf timechart: Fix memory leaks | Problem Details:
Resolve a major execution-time leak of backtrace strings in the timechart tool.
- Modify cat_backtrace() to return dynamically allocated memory via
open_memstream(), transferring ownership to the caller.
- Free the returned backtrace string inside process_sample_event() immediately
after invoking ... | ```diff
diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c
index 1d24d8738519..d2e15d02304e 100644
--- a/tools/perf/builtin-timechart.c
+++ b/tools/perf/builtin-timechart.c
@@ -299,7 +299,7 @@ static void pid_put_sample(struct timechart *tchart, int pid, int type,
sample->type = type;
samp... |
8dca7ad2c2576b721e78244206143832d46a3b83 | Analyze and fix the following issue in the Linux kernel code: perf lock: Avoid segv if event is missing a callchain | Problem Details:
Avoid a potential segmentation fault if a parsed sample unexpectedly lacks a
valid callchain pointer.
Add a check for a NULL sample->callchain pointer in get_callstack(). If the
callchain is missing, return NULL to safely skip the event and log a debug
warning rather than causing a tool segfault.
Sig... | ```diff
diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c
index 89a40d385b27..064b3aa4bad7 100644
--- a/tools/perf/builtin-lock.c
+++ b/tools/perf/builtin-lock.c
@@ -938,9 +938,16 @@ static u64 *get_callstack(struct perf_sample *sample, int max_stack)
u64 i;
int c;
+ if (!sample->callchain) {
+ ... |
9d491ab9ede2a3ecc573fc77418ccb7f214eefd3 | Analyze and fix the following issue in the Linux kernel code: perf lock: Only pass sample to handlers | Problem Details:
The evsel is within the sample and so only the sample needs to be
passed. Remove the parameter and fix call site.
Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>
Cc: Alexander ... | ```diff
diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c
index e2b585e528ac..b6533483ba64 100644
--- a/tools/perf/builtin-lock.c
+++ b/tools/perf/builtin-lock.c
@@ -473,28 +473,22 @@ static struct lock_stat *pop_from_result(void)
struct trace_lock_handler {
/* it's used on CONFIG_LOCKDEP */
- int... |
fc444d05b4e4bfa4aaec4efa1365c0be134fc3c8 | Analyze and fix the following issue in the Linux kernel code: perf tool: Remove evsel from tool APIs that pass the sample | Problem Details:
As struct perf_sample now directly contains its own resolved evsel pointer,
passing the evsel separately is redundant and clutters the interface.
Remove the redundant evsel parameter from tool-specific handlers and
structures, ensuring the tool always directly accesses the evsel bound to the
sample. T... | ```diff
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index 5e57b78548f4..58e56f826367 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -283,7 +283,6 @@ static int evsel__add_sample(struct evsel *evsel, struct perf_sample *sample,
static int process_sample_... |
c8cdecdb47d3191146ab6a90b422d3271bc1ef89 | Analyze and fix the following issue in the Linux kernel code: nvme: core: reject invalid LBA data size from Identify Namespace | Problem Details:
nvme_update_ns_info_block() trusts id->lbaf[lbaf].ds from the
controller and assigns it directly to ns->head->lba_shift without
bounds checking. nvme_lba_to_sect() then does:
return lba << (head->lba_shift - SECTOR_SHIFT);
When called with lba = le64_to_cpu(id->nsze) to compute the device
capaci... | ```diff
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 72c50d5e938d..10f154529334 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2407,12 +2407,22 @@ static int nvme_update_ns_info_block(struct nvme_ns *ns,
goto out;
}
+ if (id->lbaf[lbaf].ds < SECTOR_SHIFT ||
+ ... |
f5d4d76ec1390d490c14848d787ef27bf7b9c0a8 | Analyze and fix the following issue in the Linux kernel code: thermal/core: Populate max_state before setting up cooling dev sysfs | Problem Details:
Since commit
13f4e660a126 ("thermal/core: Split __thermal_cooling_device_register()
into two functions")
thermal_cooling_device_setup_sysfs() is called before the
->get_max_state() callback in thermal_cooling_device_add().
However, cooling_device_stats_setup() allocates space based o... | ```diff
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 4e2a17fdb6a7..9b9fa51067bd 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -1015,8 +1015,6 @@ static int thermal_cooling_device_add(struct thermal_cooling_device *cdev, void
device_initialize... |
daac18e7c42c012e289bfd310503f9417e4a9481 | Analyze and fix the following issue in the Linux kernel code: perf inject: Fix itrace branch stack synthesis | Problem Details:
When using "perf inject --itrace=L" to synthesize branch stacks from
AUX data, several issues caused failures with the generated file:
1. The synthesized samples were delivered without the
PERF_SAMPLE_BRANCH_STACK flag if it was not in the original event's
sample_type. Fixed by using sample_type... | ```diff
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index 2f20e782c7f2..7a64935b7e2b 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -216,12 +216,23 @@ static int perf_event__repipe_op4_synth(const struct perf_tool *tool,
return perf_event__repipe_synth(tool, e... |
059e9100d82aae2254f1b06835a55755936b1417 | Analyze and fix the following issue in the Linux kernel code: perf event: Fix size of synthesized sample with branch stacks | Problem Details:
Synthesizing branch stacks for Intel-PT highlighted an issue where
PERF_SAMPLE_BRANCH_HW_INDEX was assumed to always be set in the
perf_event_attr branch_sample_type. This caused an incorrect size
calculation.
Fix the writing of the nr and hw_idx values during sample event
synthesis by passing the bra... | ```diff
diff --git a/tools/perf/bench/inject-buildid.c b/tools/perf/bench/inject-buildid.c
index aad572a78d7f..bfd2c5ec9488 100644
--- a/tools/perf/bench/inject-buildid.c
+++ b/tools/perf/bench/inject-buildid.c
@@ -228,9 +228,12 @@ static ssize_t synthesize_sample(struct bench_data *data, struct bench_dso *dso,
eve... |
017bca78e4d72b1ff027d368c20a1b2c654edaf7 | Analyze and fix the following issue in the Linux kernel code: perf build-id: Fix off-by-one bug when printing kernel/module build-id | Problem Details:
When changing sprintf functions to snprintf, one byte got lost. Since
snprintf ones do not handle the '\0' terminating character, the number
of printed characters is 40, while sizeof(sbuild_id) is 41, including
the terminating '\0' character.
This makes the later check fail so that nothing is printed.... | ```diff
diff --git a/tools/perf/builtin-buildid-list.c b/tools/perf/builtin-buildid-list.c
index a91bbb34ac94..e0881b0ac38f 100644
--- a/tools/perf/builtin-buildid-list.c
+++ b/tools/perf/builtin-buildid-list.c
@@ -61,7 +61,7 @@ static int sysfs__fprintf_build_id(FILE *fp)
int ret;
ret = sysfs__snprintf_build_id(... |
00d7b33351aac0ea55d17167561e12bbeca73138 | Analyze and fix the following issue in the Linux kernel code: nvme-core: warn on allocating admin tag set with existing queue | Problem Details:
Currently, nvme_alloc_admin_tag_set() silently drops and releases
the existing admin_q if it called on a controller that already
had one (e.g., during a controller reset).
However, transport drivers should not be reallocating the admin tag
set and queue during a reset. Dropping the old queue and alloc... | ```diff
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index a6fe2cfb1ab1..72c50d5e938d 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -4889,12 +4889,7 @@ int nvme_alloc_admin_tag_set(struct nvme_ctrl *ctrl, struct blk_mq_tag_set *set,
if (ret)
return ret;
- /*
- * If ... |
37a91b995952a556a6eb90c31736ee773b86999c | Analyze and fix the following issue in the Linux kernel code: fbdev: remove Hercules monochrome ISA graphics adapter driver | Problem Details:
The hgafb driver supports graphics adapters compatible with the Hercules
adapter from 1984. These were ISA cards or onboard devices that supported
monochrome 720x348 graphics. This driver was created in 1999 by Ferenc Bakonyi.
In the entire Git history (since Linux 2.6.12-rc2), there has only been one
... | ```diff
diff --git a/CREDITS b/CREDITS
index 17962bdd6dbd..59d5de3eeb5b 100644
--- a/CREDITS
+++ b/CREDITS
@@ -197,6 +197,9 @@ S: Hauptstrasse 19
S: 79837 St. Blasien
S: Germany
+N: Ferenc Bakonyi
+D: Hercules graphics adapter framebuffer driver
+
N: Krishna Balasubramanian
E: balasub@cis.ohio-state.edu
D: Wrote... |
e5925f33e4fa9ee313d481557607adce8e30ed2e | Analyze and fix the following issue in the Linux kernel code: nilfs2: Fix return in nilfs_mkdir | Problem Details:
Return NULL instead of passing zero to ERR_PTR.
Fixes smatch warning:
- fs/nilfs2/namei.c:261 nilfs_mkdir() warn: passing zero to 'ERR_PTR'
Fixes: 88d5baf69082 ("Change inode_operations.mkdir to return struct dentry *")
Signed-off-by: Hongling Zeng <zenghongling@kylinos.cn>
Signed-off-by: Ryusu... | ```diff
diff --git a/fs/nilfs2/namei.c b/fs/nilfs2/namei.c
index 40ac679ec56e..e2fe95de3d71 100644
--- a/fs/nilfs2/namei.c
+++ b/fs/nilfs2/namei.c
@@ -258,7 +258,7 @@ out:
else
nilfs_transaction_abort(dir->i_sb);
- return ERR_PTR(err);
+ return err ? ERR_PTR(err) : NULL;
out_fail:
drop_nlink(inode);
``` |
75182529687e204b2bd046a3f7b1c2acb5031032 | Analyze and fix the following issue in the Linux kernel code: vfio: selftests: Allow builds when ARCH=x86 | Problem Details:
Allow builds when ARCH=x86 since the top-level Makefile can set ARCH=x86
even for 64-bit x86 builds.
Note that ARCH=x86 could also indicate a native build on a 32-bit x86
host. However, it doesn't seem like anyone is building selftests
natively on 32-bit x86 hosts these days since KVM selftests allow
... | ```diff
diff --git a/tools/testing/selftests/vfio/Makefile b/tools/testing/selftests/vfio/Makefile
index a19b75742342..0a4cfd1a6c7e 100644
--- a/tools/testing/selftests/vfio/Makefile
+++ b/tools/testing/selftests/vfio/Makefile
@@ -1,6 +1,6 @@
ARCH ?= $(shell uname -m)
-ifeq (,$(filter $(ARCH),aarch64 arm64 x86_64))
... |
a21b864bd951e452922dbd66747da24daca2b04f | Analyze and fix the following issue in the Linux kernel code: vfio: selftests: Fix out-of-tree build with make O= | Problem Details:
The test programs are compiled via a static pattern rule that requires
intermediate .o files:
$(TEST_GEN_PROGS): %: %.o $(LIBVFIO_O)
After lib.mk prefixes TEST_GEN_PROGS with $(OUTPUT), this creates
dependencies on .o files in the output directory (e.g.
$(OUTPUT)/vfio_dma_mapping_test.o). However, ... | ```diff
diff --git a/tools/testing/selftests/vfio/Makefile b/tools/testing/selftests/vfio/Makefile
index 0684932d91bf..a19b75742342 100644
--- a/tools/testing/selftests/vfio/Makefile
+++ b/tools/testing/selftests/vfio/Makefile
@@ -27,10 +27,13 @@ CFLAGS += $(EXTRA_CFLAGS)
LDFLAGS += -pthread
-$(TEST_GEN_PROGS): %:... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.