id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
b4a8b5bba712a711d8ca1f7d04646db63f9c88f5
Analyze and fix the following issue in the Linux kernel code: bpf: Use preempt_count() directly in bpf_send_signal_common()
Problem Details: bpf_send_signal_common() uses preemptible() to check whether or not the current context is preemptible. If it is preemptible, it will use irq_work to send the signal asynchronously instead of trying to hold a spin-lock, because spin-lock is sleepable under PREEMPT_RT. However, preemptible() depends on...
```diff diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c index adc947587eb8..a612f6f182e5 100644 --- a/kernel/trace/bpf_trace.c +++ b/kernel/trace/bpf_trace.c @@ -843,7 +843,7 @@ static int bpf_send_signal_common(u32 sig, enum pid_type type, struct task_struc if (unlikely(is_global_init(task))) ret...
fe06b7c07f3fbcce2a2ca6f7b0d543b5699ea00f
Analyze and fix the following issue in the Linux kernel code: scsi: ufs: core: Set default runtime/system PM levels before ufshcd_hba_init()
Problem Details: Commit bb9850704c04 ("scsi: ufs: core: Honor runtime/system PM levels if set by host controller drivers") introduced the check for setting default PM levels only if the levels are uninitialized by the host controller drivers. But it missed the fact that the levels could be initialized to 0 (UFS_PM_LVL_...
```diff diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index f9303e66bb79..464f13da259a 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -10431,6 +10431,21 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq) */ spin_lock_init(&hba->clk_gat...
dce5c4afd035e8090a26e5d776b1682c0e649683
Analyze and fix the following issue in the Linux kernel code: scsi: core: Clear driver private data when retrying request
Problem Details: After commit 1bad6c4a57ef ("scsi: zero per-cmd private driver data for each MQ I/O"), the xen-scsifront/virtio_scsi/snic drivers all removed code that explicitly zeroed driver-private command data. In combination with commit 464a00c9e0ad ("scsi: core: Kill DRIVER_SENSE"), after virtio_scsi performs a ...
```diff diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index be0890e4e706..f1cfe0bb89b2 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1669,13 +1669,6 @@ static blk_status_t scsi_prepare_cmd(struct request *req) if (in_flight) __set_bit(SCMD_STATE_INFLIGHT, &cmd->state); -...
cfebabdd351e9cbafdc99cb198db482208ec5ad9
Analyze and fix the following issue in the Linux kernel code: wifi: rtw88: Extend rtw_debugfs_get_phy_info() for RTL8814AU
Problem Details: Print information about the 3rd and 4th RF paths and about the 3rd spatial stream. Also, fix a small bug: don't show the average SNR and EVM for the OFDM and HT/VHT rates when the rate is actually CCK 11M. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realte...
```diff diff --git a/drivers/net/wireless/realtek/rtw88/debug.c b/drivers/net/wireless/realtek/rtw88/debug.c index 364ec0436d0f..1adb03d1210a 100644 --- a/drivers/net/wireless/realtek/rtw88/debug.c +++ b/drivers/net/wireless/realtek/rtw88/debug.c @@ -654,10 +654,10 @@ static void rtw_print_rate(struct seq_file *m, u8 r...
053a7aace0207593776c729f229d87f1be464b98
Analyze and fix the following issue in the Linux kernel code: wifi: rtw88: Fix rtw_rx_phy_stat() for RTL8814AU
Problem Details: Record statistics for the 3SS rates too. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/39e3c7cf-37ed-4c0e-af00-dcd9eab351f0@gmail.com
```diff diff --git a/drivers/net/wireless/realtek/rtw88/main.h b/drivers/net/wireless/realtek/rtw88/main.h index 24ac749271cc..c15e0f55d09a 100644 --- a/drivers/net/wireless/realtek/rtw88/main.h +++ b/drivers/net/wireless/realtek/rtw88/main.h @@ -386,6 +386,9 @@ enum rtw_evm { RTW_EVM_1SS, RTW_EVM_2SS_A, RTW_EVM_...
6be7544d19fcfcb729495e793bc6181f85bb8949
Analyze and fix the following issue in the Linux kernel code: wifi: rtw88: Fix rtw_init_vht_cap() for RTL8814AU
Problem Details: Set the MCS maps and the highest rates according to the number of spatial streams the chip has. For RTL8814AU that is 3. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link...
```diff diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c index 3319bb5044c3..959f56a3cc1a 100644 --- a/drivers/net/wireless/realtek/rtw88/main.c +++ b/drivers/net/wireless/realtek/rtw88/main.c @@ -1596,8 +1596,9 @@ static void rtw_init_vht_cap(struct rtw_dev *rtwdev, ...
c7eea1ba05ca5b0dbf77a27cf2e1e6e2fb3c0043
Analyze and fix the following issue in the Linux kernel code: wifi: rtw88: Fix rtw_init_ht_cap() for RTL8814AU
Problem Details: Set the RX mask and the highest RX rate according to the number of spatial streams the chip can receive. For RTL8814AU that is 3. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.m...
```diff diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c index e4f9b744f24d..3319bb5044c3 100644 --- a/drivers/net/wireless/realtek/rtw88/main.c +++ b/drivers/net/wireless/realtek/rtw88/main.c @@ -1565,6 +1565,7 @@ static void rtw_init_ht_cap(struct rtw_dev *rtwdev, { ...
86d04f8f991a0509e318fe886d5a1cf795736c7d
Analyze and fix the following issue in the Linux kernel code: wifi: rtw88: Fix rtw_desc_to_mcsrate() to handle MCS16-31
Problem Details: This function translates the rate number reported by the hardware into something mac80211 can understand. It was ignoring the 3SS and 4SS HT rates. Translate them too. Also set *nss to 0 for the HT rates, just to make sure it's initialised. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Ac...
```diff diff --git a/drivers/net/wireless/realtek/rtw88/util.c b/drivers/net/wireless/realtek/rtw88/util.c index e222d3c01a77..66819f694405 100644 --- a/drivers/net/wireless/realtek/rtw88/util.c +++ b/drivers/net/wireless/realtek/rtw88/util.c @@ -101,7 +101,8 @@ void rtw_desc_to_mcsrate(u16 rate, u8 *mcs, u8 *nss) *...
e66bca16638ee59e997f9d9a3711b3ae587d04d9
Analyze and fix the following issue in the Linux kernel code: wifi: rtw88: Fix rtw_mac_power_switch() for RTL8814AU
Problem Details: rtw_mac_power_switch() checks bit 8 of REG_SYS_STATUS1 to see if the chip is powered on. This bit appears to be always on in the RTL8814AU, so ignore it. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.co...
```diff diff --git a/drivers/net/wireless/realtek/rtw88/mac.c b/drivers/net/wireless/realtek/rtw88/mac.c index 63edf6461de8..0491f501c138 100644 --- a/drivers/net/wireless/realtek/rtw88/mac.c +++ b/drivers/net/wireless/realtek/rtw88/mac.c @@ -291,6 +291,7 @@ static int rtw_mac_power_switch(struct rtw_dev *rtwdev, bool ...
dc2fc1a3419e9218fde6e7897c8c238ebe75a69e
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: fw: add debug message for unexpected secure firmware
Problem Details: If failed to load a non-secure firmware with a secure chip, it only throws a unclear message: rtw89_8922ae 0000:03:00.0: parse fw header fail To address this case simpler, add a message to point out this. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/202502170643...
```diff diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c index e05034fbb898..0cb2fee916cd 100644 --- a/drivers/net/wireless/realtek/rtw89/fw.c +++ b/drivers/net/wireless/realtek/rtw89/fw.c @@ -414,8 +414,11 @@ static int __parse_security_section(struct rtw89_dev *rtwdev, ...
ca57d1c56f4015d83fe7840b41d74783ee900b28
Analyze and fix the following issue in the Linux kernel code: octeontx2: hide unused label
Problem Details: A previous patch introduces a build-time warning when CONFIG_DCB is disabled: drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c: In function 'otx2_probe': drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:3217:1: error: label 'err_free_zc_bmap' defined but not used [-Werror=unused-label] drivers...
```diff diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c index c7c562f0f5e5..cfed9ec5b157 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c @@ -3214,8 +3214,10 @@ static int...
8279a8dacf9f975c37f3dc51634b6c4a8936c57b
Analyze and fix the following issue in the Linux kernel code: net: phy: qt2025: Fix hardware revision check comment
Problem Details: Correct the hardware revision check comment in the QT2025 driver. The revision value was documented as 0x3b instead of the correct 0xb3, which matches the actual comparison logic in the code. Reviewed-by: FUJITA Tomonori <fujita.tomonori@gmail.com> Signed-off-by: Charalampos Mitrodimas <charmitro@post...
```diff diff --git a/drivers/net/phy/qt2025.rs b/drivers/net/phy/qt2025.rs index 1ab065798175..7e754d5d7154 100644 --- a/drivers/net/phy/qt2025.rs +++ b/drivers/net/phy/qt2025.rs @@ -41,7 +41,7 @@ impl Driver for PhyQT2025 { fn probe(dev: &mut phy::Device) -> Result<()> { // Check the hardware revision ...
bdce0574243b43b3bb2064f609c0c326df44c4c6
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: 8922a: fix incorrect STA-ID in EHT MU PPDU
Problem Details: EHT MU PPDU contains user field of EHT-SIG field with STA-ID that must match AID subfield in the Associate Response. Add a necessary setting to prevent these from being inconsistent. Signed-off-by: Kuan-Chung Chen <damon.chen@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://...
```diff diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c index 35b86970db2a..6dbea18355a3 100644 --- a/drivers/net/wireless/realtek/rtw89/fw.c +++ b/drivers/net/wireless/realtek/rtw89/fw.c @@ -3435,9 +3435,10 @@ int rtw89_fw_h2c_assoc_cmac_tbl_g7(struct rtw89_dev *rtwdev, ...
bfc8e71ef6b7913f0129aff47951cab73a175259
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: rtw8852b{t}: fix TSSI debug timestamps
Problem Details: Since the vendor driver is claimed to measure 'tssi_alimk_time' of 'struct rtw89_tssi_info' in microseconds, adjust rtw8852b{t}-specific '_tssi_alimentk()' to not mess the former with nanoseconds and print both per-call and accumulated times. Compile tested only. Fixes: 7f18a70d7b4d ("wifi: rtw89: 885...
```diff diff --git a/drivers/net/wireless/realtek/rtw89/core.h b/drivers/net/wireless/realtek/rtw89/core.h index b3fdd8eded21..eb2a6b90c940 100644 --- a/drivers/net/wireless/realtek/rtw89/core.h +++ b/drivers/net/wireless/realtek/rtw89/core.h @@ -5141,7 +5141,7 @@ struct rtw89_tssi_info { u32 alignment_backup_by_ch[R...
425e64440ad0a2f03bdaf04be0ae53dededbaa77
Analyze and fix the following issue in the Linux kernel code: net: pktgen: fix access outside of user given buffer in pktgen_thread_write()
Problem Details: Honour the user given buffer size for the strn_len() calls (otherwise strn_len() will access memory outside of the user given buffer). Signed-off-by: Peter Seiderer <ps.report@gmx.net> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250219084527.20488-8-ps.report@gmx.net ...
```diff diff --git a/net/core/pktgen.c b/net/core/pktgen.c index f6e35ba035c7..55064713223e 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -1900,8 +1900,8 @@ static ssize_t pktgen_thread_write(struct file *file, i = len; /* Read variable name */ - - len = strn_len(&user_buffer[i], sizeof(name) - 1); + ...
1e5e511373fe1348ed24372cf2a81234b32ac935
Analyze and fix the following issue in the Linux kernel code: net: pktgen: fix ctrl interface command parsing
Problem Details: Enable command writing without trailing '\n': - the good case $ echo "reset" > /proc/net/pktgen/pgctrl - the bad case (before the patch) $ echo -n "reset" > /proc/net/pktgen/pgctrl -bash: echo: write error: Invalid argument - with patch applied $ echo -n "reset" > /proc/net/pktgen/pgctrl Sig...
```diff diff --git a/net/core/pktgen.c b/net/core/pktgen.c index c8a5b4d17407..f6e35ba035c7 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -517,21 +517,23 @@ static ssize_t pgctrl_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { char data[128]; + size_t max; struct ...
1c3bc2c325f89e21f52af4a5c940ed1d89e05229
Analyze and fix the following issue in the Linux kernel code: net: pktgen: fix 'ratep 0' error handling (return -EINVAL)
Problem Details: Given an invalid 'ratep' command e.g. 'ratep 0' the return value is '1', leading to the following misleading output: - the good case $ echo "ratep 100" > /proc/net/pktgen/lo\@0 $ grep "Result:" /proc/net/pktgen/lo\@0 Result: OK: ratep=100 - the bad case (before the patch) $ echo "ratep 0" > /pr...
```diff diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 75c7511bf492..c8a5b4d17407 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -1130,7 +1130,7 @@ static ssize_t pktgen_if_write(struct file *file, i += len; if (!value) - return len; + return -EINVAL; pkt_dev->delay = NSEC_PER_SEC/va...
3ba38c25a8c03b77ed448220a6c93dd5552a264e
Analyze and fix the following issue in the Linux kernel code: net: pktgen: fix 'rate 0' error handling (return -EINVAL)
Problem Details: Given an invalid 'rate' command e.g. 'rate 0' the return value is '1', leading to the following misleading output: - the good case $ echo "rate 100" > /proc/net/pktgen/lo\@0 $ grep "Result:" /proc/net/pktgen/lo\@0 Result: OK: rate=100 - the bad case (before the patch) $ echo "rate 0" > /proc/ne...
```diff diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 28dbbf70e142..75c7511bf492 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -1115,7 +1115,7 @@ static ssize_t pktgen_if_write(struct file *file, i += len; if (!value) - return len; + return -EINVAL; pkt_dev->delay = pkt_dev->min_pk...
b38504346a2400c822cc57d0164521405fb12757
Analyze and fix the following issue in the Linux kernel code: net: pktgen: fix hex32_arg parsing for short reads
Problem Details: Fix hex32_arg parsing for short reads (here 7 hex digits instead of the expected 8), shift result only on successful input parsing. - before the patch $ echo "mpls 0000123" > /proc/net/pktgen/lo\@0 $ grep mpls /proc/net/pktgen/lo\@0 mpls: 00001230 Result: OK: mpls=00001230 - with patch appl...
```diff diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 4f8ec6c9bed4..28dbbf70e142 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -753,14 +753,15 @@ static int hex32_arg(const char __user *user_buffer, unsigned long maxlen, for (; i < maxlen; i++) { int value; char c; - *num <<= 4; if (g...
802fb6db9fdc82cc0e0f2e4315a24b2171e6ef4f
Analyze and fix the following issue in the Linux kernel code: net: pktgen: replace ENOTSUPP with EOPNOTSUPP
Problem Details: Replace ENOTSUPP with EOPNOTSUPP, fixes checkpatch hint WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP and e.g. $ echo "clone_skb 1" > /proc/net/pktgen/lo\@0 -bash: echo: write error: Unknown error 524 Signed-off-by: Peter Seiderer <ps.report@gmx.net> Reviewed-by: Simon Horman...
```diff diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 82b6a2c3c141..496aa16773e7 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -1198,7 +1198,7 @@ static ssize_t pktgen_if_write(struct file *file, if ((value > 0) && ((pkt_dev->xmit_mode == M_NETIF_RECEIVE) || !(pkt_dev->odev->pri...
f06e4bfd010faefa637689d2df2c727dbf6e1d27
Analyze and fix the following issue in the Linux kernel code: net: stmmac: dwmac-loongson: Add fix_soc_reset() callback
Problem Details: Loongson's DWMAC device may take nearly two seconds to complete DMA reset, however, the default waiting time for reset is 200 milliseconds. Therefore, the following error message may appear: [14.427169] dwmac-loongson-pci 0000:00:03.2: Failed to reset the dma Fixes: 803fc61df261 ("net: stmmac: dwmac-...
```diff diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c index bfe6e2d631bd..f5acfb7d4ff6 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c @@ -516,6 +516,19 @@ static int l...
2a95c1f3468bbeb4222e90f27a8f1c94d87e1df6
Analyze and fix the following issue in the Linux kernel code: dt-bindings: vendor-prefixes: Document the 'pciclass' prefix
Problem Details: The "pciclass" is an existing prefix used to identify the PCI bridge devices, but it is not a vendor prefix. So document it in the non-vendor prefix list. Tested-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Acked-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Manivannan Sadhasivam ...
```diff diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 5079ca6ce1d1..8e8bc6a7f0bd 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -18,7 +18,7 @@ pattern...
d9207cf7760f5f5599e9ff7eb0fedf56821a1d59
Analyze and fix the following issue in the Linux kernel code: EDAC/{skx_common,i10nm}: Fix some missing error reports on Emerald Rapids
Problem Details: When doing error injection to some memory DIMMs on certain Intel Emerald Rapids servers, the i10nm_edac missed error reports for some memory DIMMs. Certain BIOS configurations may hide some memory controllers, and the i10nm_edac doesn't enumerate these hidden memory controllers. However, the ADXL deco...
```diff diff --git a/drivers/edac/i10nm_base.c b/drivers/edac/i10nm_base.c index f45d849d3f15..355a977019e9 100644 --- a/drivers/edac/i10nm_base.c +++ b/drivers/edac/i10nm_base.c @@ -751,6 +751,8 @@ static int i10nm_get_ddr_munits(void) continue; } else { d->imc[lmc].mdev = mdev; + if (res_cfg->type ==...
267e5b1d267539d9a927dc04aab6f15aca57da92
Analyze and fix the following issue in the Linux kernel code: EDAC/igen6: Fix the flood of invalid error reports
Problem Details: The ECC_ERROR_LOG register of certain SoCs may contain the invalid value ~0, which results in a flood of invalid error reports in polling mode. Fix the flood of invalid error reports by skipping the invalid ECC error log value ~0. Fixes: e14232afa944 ("EDAC/igen6: Add polling support") Reported-by: R...
```diff diff --git a/drivers/edac/igen6_edac.c b/drivers/edac/igen6_edac.c index fdf3a84fe698..595908af9e5c 100644 --- a/drivers/edac/igen6_edac.c +++ b/drivers/edac/igen6_edac.c @@ -785,13 +785,22 @@ static u64 ecclog_read_and_clear(struct igen6_imc *imc) { u64 ecclog = readq(imc->window + ECC_ERROR_LOG_OFFSET); ...
1340461e5168f8a33b2b3e0ed04557742664bee1
Analyze and fix the following issue in the Linux kernel code: af_unix: Fix undefined 'other' error
Problem Details: Fix an issue with the sparse static analysis tool where an "undefined 'other'" error occurs due to `__releases(&unix_sk(other)->lock)` being placed before 'other' is in scope. Remove the `__releases()` annotation from the `unix_wait_for_peer()` function to eliminate the sparse error. The annotation re...
```diff diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 34945de1fb1f..319153850be1 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -1508,7 +1508,6 @@ out: } static long unix_wait_for_peer(struct sock *other, long timeo) - __releases(&unix_sk(other)->lock) { struct unix_sock *u = unix_sk(ot...
704145a854ee01015d52fb8c4c0c319d1810bf32
Analyze and fix the following issue in the Linux kernel code: net: wangxun: Add periodic checks for overflow and errors
Problem Details: Implement watchdog task to detect SYSTIME overflow and error cases of Rx/Tx timestamp. Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev> Link: https://patch.msgid.link/20250218023432.146536-4-jiawenwu@trustnetic.com Signed-off-by: Jakub Kicinsk...
```diff diff --git a/drivers/net/ethernet/wangxun/libwx/wx_ptp.c b/drivers/net/ethernet/wangxun/libwx/wx_ptp.c index e56288a18614..76986e41afe0 100644 --- a/drivers/net/ethernet/wangxun/libwx/wx_ptp.c +++ b/drivers/net/ethernet/wangxun/libwx/wx_ptp.c @@ -212,6 +212,102 @@ static int wx_ptp_tx_hwtstamp_work(struct wx *w...
c522093b02835f2e897b83e9764e7919edac5d08
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix memmove when move keys down
Problem Details: The fix alone doesn't fix [1], but should be applied before debugging that. [1] https://syzkaller.appspot.com/bug?extid=38a0cbd267eff2d286ff Signed-off-by: Alan Huang <mmpgouride@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/btree_io.c b/fs/bcachefs/btree_io.c index e371e60e3133..dece27d9db04 100644 --- a/fs/bcachefs/btree_io.c +++ b/fs/bcachefs/btree_io.c @@ -996,7 +996,7 @@ drop_this_key: } got_good_key: le16_add_cpu(&i->u64s, -next_good_key); - memmove_u64s_down(k, bkey_p_next(k), (u64 *) vstruct...
68aaa637162787dc3374080efe03366f70b344f1
Analyze and fix the following issue in the Linux kernel code: bcachefs: print op->nonce on data update inconsistency
Problem Details: "nonce inconstancy" is popping up again, causing us to go emergency read-only. This one looks less serious, i.e. specific to the encryption path and not indicative of a data corruption bug. But we'll need more info to track it down. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/data_update.c b/fs/bcachefs/data_update.c index 337494facac6..642fbc60ecab 100644 --- a/fs/bcachefs/data_update.c +++ b/fs/bcachefs/data_update.c @@ -340,6 +340,7 @@ restart_drop_extra_replicas: struct printbuf buf = PRINTBUF; prt_str(&buf, "about to insert invalid key in data...
af1c6007a64e78b729eb5a8d149637a820077bee
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Add missing htt_metadata flag in ath12k_dp_tx()
Problem Details: When AP-VLAN support was added, the HTT_TCL_META_DATA_VALID_HTT flag was not added to the tx_info's meta_data_flags. Without this flag the firmware seems to reject all the broadcast (ap-vlan) frames. So add the flag, just as ath11k did it in the downstream QSDK project[1]. Tested-on: QCN9274 hw2.0 PCI...
```diff diff --git a/drivers/net/wireless/ath/ath12k/dp_tx.c b/drivers/net/wireless/ath/ath12k/dp_tx.c index 4e11b7b61b82..46a55554c19c 100644 --- a/drivers/net/wireless/ath/ath12k/dp_tx.c +++ b/drivers/net/wireless/ath/ath12k/dp_tx.c @@ -384,6 +384,7 @@ map: add_htt_metadata = true; msdu_ext_desc = true; ti.f...
cb9a978a20a4481dd59c3ea8c6fee36b3dac2b47
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: remove redundant declaration of ath12k_dp_rx_h_find_peer()
Problem Details: The current code in dp_rx.h declares the ath12k_dp_rx_h_find_peer() twice. Fix this by removing one of the redundant declarations of ath12k_dp_rx_h_find_peer() to ensure that the function is declared only once. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 h...
```diff diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.h b/drivers/net/wireless/ath/ath12k/dp_rx.h index c0aa965f47e7..88e42365a9d8 100644 --- a/drivers/net/wireless/ath/ath12k/dp_rx.h +++ b/drivers/net/wireless/ath/ath12k/dp_rx.h @@ -138,9 +138,6 @@ u32 ath12k_dp_rx_h_mpdu_err(struct ath12k_base *ab, struc...
e31e3f6c0ce473f7ce1e70d54ac8e3ed190509f8
Analyze and fix the following issue in the Linux kernel code: soc: loongson: loongson2_guts: Add check for devm_kstrdup()
Problem Details: Add check for the return value of devm_kstrdup() in loongson2_guts_probe() to catch potential exception. Fixes: b82621ac8450 ("soc: loongson: add GUTS driver for loongson-2 platforms") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com> Link: https://lore.kernel.org/r/20250...
```diff diff --git a/drivers/soc/loongson/loongson2_guts.c b/drivers/soc/loongson/loongson2_guts.c index ae42e3a9127f..16913c3ef65c 100644 --- a/drivers/soc/loongson/loongson2_guts.c +++ b/drivers/soc/loongson/loongson2_guts.c @@ -114,8 +114,11 @@ static int loongson2_guts_probe(struct platform_device *pdev) if (of_p...
992ee3ed6e9fdd0be83a7daa5ff738e3cf86047f
Analyze and fix the following issue in the Linux kernel code: net: phy: qcom: qca807x fix condition for DAC_DSP_BIAS_CURRENT
Problem Details: While setting the DAC value, the wrong boolean value is evaluated to set the DSP bias current. So let's correct the conditional statement and use the right boolean value read from the DTS set in the priv. Cc: stable@vger.kernel.org Fixes: d1cb613efbd3 ("net: phy: qcom: add support for QCA807x PHY Fami...
```diff diff --git a/drivers/net/phy/qcom/qca807x.c b/drivers/net/phy/qcom/qca807x.c index 3279de857b47..2ad8c2586d64 100644 --- a/drivers/net/phy/qcom/qca807x.c +++ b/drivers/net/phy/qcom/qca807x.c @@ -774,7 +774,7 @@ static int qca807x_config_init(struct phy_device *phydev) control_dac &= ~QCA807X_CONTROL_DAC_MASK;...
bf3624cf1c3708284c53ed99a1c43f2e104dc2dd
Analyze and fix the following issue in the Linux kernel code: netdevsim: call napi_schedule from a timer context
Problem Details: The netdevsim driver was experiencing NOHZ tick-stop errors during packet transmission due to pending softirq work when calling napi_schedule(). This issue was observed when running the netconsole selftest, which triggered the following error message: NOHZ tick-stop error: local softirq work is pend...
```diff diff --git a/drivers/net/netdevsim/netdev.c b/drivers/net/netdevsim/netdev.c index 9b394ddc5206..a41dc79e9c2e 100644 --- a/drivers/net/netdevsim/netdev.c +++ b/drivers/net/netdevsim/netdev.c @@ -87,7 +87,8 @@ static netdev_tx_t nsim_start_xmit(struct sk_buff *skb, struct net_device *dev) if (unlikely(nsim_for...
3698dd6b139dc37b35a9ad83d9330c1f99666c02
Analyze and fix the following issue in the Linux kernel code: cpufreq: governor: Fix negative 'idle_time' handling in dbs_update()
Problem Details: We observed an issue that the CPU frequency can't raise up with a 100% CPU load when NOHZ is off and the 'conservative' governor is selected. 'idle_time' can be negative if it's obtained from get_cpu_idle_time_jiffy() when NOHZ is off. This was found and explained in commit 9485e4ca0b48 ("cpufreq: go...
```diff diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c index af44ee6a6430..1a7fcaf39cc9 100644 --- a/drivers/cpufreq/cpufreq_governor.c +++ b/drivers/cpufreq/cpufreq_governor.c @@ -145,7 +145,23 @@ unsigned int dbs_update(struct cpufreq_policy *policy) time_elapsed = update_time...
b47834ee4485bbdcc6d36f086ff61c3efd8870d4
Analyze and fix the following issue in the Linux kernel code: ASoC: SOF: amd: Add depends on CPU_SUP_AMD
Problem Details: When SMN support was switched to the kernel wide AMD_NODE instead of local implementation this broke compilation on the allyesconfig for some architectures. AMD_NODE is only supported on AMD platforms, so modify all the AMD drivers that use it to also require CPU_SUP_AMD. Reported-by: Stephen Rothwel...
```diff diff --git a/sound/soc/sof/amd/Kconfig b/sound/soc/sof/amd/Kconfig index 28216c8c1cf9..6eb5b2d14843 100644 --- a/sound/soc/sof/amd/Kconfig +++ b/sound/soc/sof/amd/Kconfig @@ -33,6 +33,7 @@ config SND_SOC_SOF_AMD_COMMON config SND_SOC_SOF_AMD_RENOIR tristate "SOF support for RENOIR" depends on SND_SOC_SOF_P...
b25120e1d5f2ebb3db00af557709041f47f7f3d0
Analyze and fix the following issue in the Linux kernel code: Bluetooth: L2CAP: Fix L2CAP_ECRED_CONN_RSP response
Problem Details: L2CAP_ECRED_CONN_RSP needs to respond DCID in the same order received as SCID but the order is reversed due to use of list_add which actually prepend channels to the list so the response is reversed: > ACL Data RX: Handle 16 flags 0x02 dlen 26 LE L2CAP: Enhanced Credit Connection Request (0x17) ...
```diff diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index fec11e576f31..b22078b67972 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -632,7 +632,8 @@ void __l2cap_chan_add(struct l2cap_conn *conn, struct l2cap_chan *chan) test_bit(FLAG_HOLD_HCI_CONN, &chan->fla...
bd30e8d7bfa6e528f9e746c940e6f7246c7899d6
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Always allow SCO packets for user channel
Problem Details: The SCO packets from Bluetooth raw socket are now rejected because hci_conn_num is left 0. This patch allows such the usecase to enable the userspace SCO support. Fixes: b16b327edb4d ("Bluetooth: btusb: add sysfs attribute to control USB alt setting") Signed-off-by: Hsin-chen Chuang <chharry@chromium....
```diff diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 90966dfbd278..8149e53fd0a7 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -2102,7 +2102,8 @@ static int btusb_send_frame(struct hci_dev *hdev, struct sk_buff *skb) return submit_or_queue_tx_urb(hdev, urb); ...
860ca5e50f73c2a1cef7eefc9d39d04e275417f7
Analyze and fix the following issue in the Linux kernel code: smb: client: Add check for next_buffer in receive_encrypted_standard()
Problem Details: Add check for the return value of cifs_buf_get() and cifs_small_buf_get() in receive_encrypted_standard() to prevent null pointer dereference. Fixes: eec04ea11969 ("smb: client: fix OOB in receive_encrypted_standard()") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com> Si...
```diff diff --git a/fs/smb/client/smb2ops.c b/fs/smb/client/smb2ops.c index 23e0c8be7fb5..4dd11eafb69d 100644 --- a/fs/smb/client/smb2ops.c +++ b/fs/smb/client/smb2ops.c @@ -4965,6 +4965,10 @@ one_more: next_buffer = (char *)cifs_buf_get(); else next_buffer = (char *)cifs_small_buf_get(); + if (!next_buffe...
f13409bb3f9140dad7256febcb478f0c9600312c
Analyze and fix the following issue in the Linux kernel code: nvme-fc: rely on state transitions to handle connectivity loss
Problem Details: It's not possible to call nvme_state_ctrl_state with holding a spin lock, because nvme_state_ctrl_state calls cancel_delayed_work_sync when fastfail is enabled. Instead syncing the ASSOC_FLAG and state transitions using a lock, it's possible to only rely on the state machine transitions. That means nv...
```diff diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c index f4f1866fbd5b..b9929a5a7f4e 100644 --- a/drivers/nvme/host/fc.c +++ b/drivers/nvme/host/fc.c @@ -781,61 +781,12 @@ restart: static void nvme_fc_ctrl_connectivity_loss(struct nvme_fc_ctrl *ctrl) { - enum nvme_ctrl_state state; - unsigned long f...
ea4065345643f3163e812e58ed8add2c75c3ee46
Analyze and fix the following issue in the Linux kernel code: pinctrl: renesas: rzg2l: Suppress binding attributes
Problem Details: Suppress binding attributes for the rzg2l pinctrl driver, as it is an essential block for Renesas SoCs. Unbinding the driver leads to warnings from __device_links_no_driver() and can eventually render the system inaccessible. Fixes: c4c4637eb57f ("pinctrl: renesas: Add RZ/G2L pin and gpio controller ...
```diff diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index 298e1aa89c8f..9280bc37a623 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -3403,6 +3403,7 @@ static struct platform_driver rzg2l_pinctrl_driver = { .name...
fa808ed4e199ed17d878eb75b110bda30dd52434
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Ensure a VMID is allocated before programming VTTBR_EL2
Problem Details: Vladimir reports that a race condition to attach a VMID to a stage-2 MMU sometimes results in a vCPU entering the guest with a VMID of 0: | CPU1 | CPU2 | | | | k...
```diff diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h index 3a7ec98ef123..d919557af5e5 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h @@ -1259,7 +1259,7 @@ int kvm_arm_pvtime_has_attr(struct kvm_vcpu *vcpu, extern unsigned int __ro_after_init...
ddf2846f22e8575d6b4b6a66f2100f168b8cd73d
Analyze and fix the following issue in the Linux kernel code: jfs: add sanity check for agwidth in dbMount
Problem Details: The width in dmapctl of the AG is zero, it trigger a divide error when calculating the control page level in dbAllocAG. To avoid this issue, add a check for agwidth in dbAllocAG. Reported-and-tested-by: syzbot+7c808908291a569281a9@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?ex...
```diff diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c index 9ac1fc2ed05b..0e1019382cf5 100644 --- a/fs/jfs/jfs_dmap.c +++ b/fs/jfs/jfs_dmap.c @@ -204,6 +204,10 @@ int dbMount(struct inode *ipbmap) bmp->db_aglevel = le32_to_cpu(dbmp_le->dn_aglevel); bmp->db_agheight = le32_to_cpu(dbmp_le->dn_agheight); bmp->d...
b61e69bb1c049cf507e3c654fa3dc1568231bd07
Analyze and fix the following issue in the Linux kernel code: jfs: Prevent copying of nlink with value 0 from disk inode
Problem Details: syzbot report a deadlock in diFree. [1] When calling "ioctl$LOOP_SET_STATUS64", the offset value passed in is 4, which does not match the mounted loop device, causing the mapping of the mounted loop device to be invalidated. When creating the directory and creating the inode of iag in diReadSpecial()...
```diff diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c index 298445f6d3d4..ecb8e05b8b84 100644 --- a/fs/jfs/jfs_imap.c +++ b/fs/jfs/jfs_imap.c @@ -456,7 +456,7 @@ struct inode *diReadSpecial(struct super_block *sb, ino_t inum, int secondary) dp += inum % 8; /* 8 inodes per 4K page */ /* copy on-disk inode to...
7fcbf789629cdb9fbf4e2172ce31136cfed11e5e
Analyze and fix the following issue in the Linux kernel code: fs/jfs: Prevent integer overflow in AG size calculation
Problem Details: The JFS filesystem calculates allocation group (AG) size using 1 << l2agsize in dbExtendFS(). When l2agsize exceeds 31 (possible with >2TB aggregates on 32-bit systems), this 32-bit shift operation causes undefined behavior and improper AG sizing. On 32-bit architectures: - Left-shifting 1 by 32+ bits...
```diff diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c index f89f07c9580e..9ac1fc2ed05b 100644 --- a/fs/jfs/jfs_dmap.c +++ b/fs/jfs/jfs_dmap.c @@ -3403,7 +3403,7 @@ int dbExtendFS(struct inode *ipbmap, s64 blkno, s64 nblocks) oldl2agsize = bmp->db_agl2size; bmp->db_agl2size = l2agsize; - bmp->db_agsize = 1 <<...
70ca3246ad201b53a9f09380b3f29d8bac320383
Analyze and fix the following issue in the Linux kernel code: fs/jfs: cast inactags to s64 to prevent potential overflow
Problem Details: The expression "inactags << bmp->db_agl2size" in the function dbFinalizeBmap() is computed using int operands. Although the values (inactags and db_agl2size) are derived from filesystem parameters and are usually small, there is a theoretical risk that the shift could overflow a 32-bit int if extreme v...
```diff diff --git a/fs/jfs/jfs_dmap.c b/fs/jfs/jfs_dmap.c index f9009e4f9ffd..f89f07c9580e 100644 --- a/fs/jfs/jfs_dmap.c +++ b/fs/jfs/jfs_dmap.c @@ -3666,8 +3666,8 @@ void dbFinalizeBmap(struct inode *ipbmap) * system size is not a multiple of the group size). */ inactfree = (inactags && ag_rem) ? - ((ina...
782cffeec9ad96daa64ffb2d527b2a052fb02552
Analyze and fix the following issue in the Linux kernel code: perf/x86/intel: Fix event constraints for LNC
Problem Details: According to the latest event list, update the event constraint tables for Lion Cove core. The general rule (the event codes < 0x90 are restricted to counters 0-3.) has been removed. There is no restriction for most of the performance monitoring events. Fixes: a932aa0e868f ("perf/x86: Add Lunar Lake ...
```diff diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index e86333eee266..cdcebf30468a 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c @@ -397,34 +397,28 @@ static struct event_constraint intel_lnc_event_constraints[] = { METRIC_EVENT_CONSTRAINT(INTEL_TD_METRIC_...
6aa9826330539abcfd3435de93b45cb506e7b86d
Analyze and fix the following issue in the Linux kernel code: char: misc: improve testing Kconfig description
Problem Details: Describe that it tests the miscdevice API and include the usual disclaimer about KUnit not being fit for production kernels. While at it, also fix KUnit capitalization. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com> Link: https://lore.kernel.org/r/20250123123249.4081674-2-cascardo...
```diff diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 1af972a92d06..76343a203d74 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -2479,13 +2479,20 @@ config TEST_IDA tristate "Perform selftest on IDA functions" config TEST_MISC_MINOR - tristate "Basic misc minor Kunit test" if !KUNIT_ALL_TESTS...
17f18e04a125a75fd8d5fe1f7d88db9ccbf552cc
Analyze and fix the following issue in the Linux kernel code: virtio_console: Get rid of unneeded temporary variable
Problem Details: When compiling a kernel with GCC using `make W=1` with CONFIG_WERROR=y (which is default nowadays), the build fails: drivers/char/virtio_console.c:1427:9: note: ‘snprintf’ output between 9 and 27 bytes into a destination of size 16 Indeed, GCC can't see the limits of the variables that are in use. Fi...
```diff diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 35af0cc11d93..9e6cee6082b5 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -1321,7 +1321,6 @@ static void send_sigio_to_port(struct port *port) static int add_port(struct ports_device *portdev, ...
be382372d55d65b5c7e5a523793ca5e403f8c595
Analyze and fix the following issue in the Linux kernel code: greybus: gb-beagleplay: Add error handling for gb_greybus_init
Problem Details: Add error handling for the gb_greybus_init(bg) function call during the firmware reflash process to maintain consistency in error handling throughout the codebase. If initialization fails, log an error and return FW_UPLOAD_ERR_RW_ERROR. Fixes: 0cf7befa3ea2 ("greybus: gb-beagleplay: Add firmware upload...
```diff diff --git a/drivers/greybus/gb-beagleplay.c b/drivers/greybus/gb-beagleplay.c index 473ac3f2d382..da31f1131afc 100644 --- a/drivers/greybus/gb-beagleplay.c +++ b/drivers/greybus/gb-beagleplay.c @@ -912,7 +912,9 @@ static enum fw_upload_err cc1352_prepare(struct fw_upload *fw_upload, cc1352_bootloader_reset(...
32ce5d87d52213a50a513750f01a56f4d01f50cb
Analyze and fix the following issue in the Linux kernel code: bus: simple-pm-bus: fix forced runtime PM use
Problem Details: The simple-pm-bus driver only enables runtime PM for some buses ('simple-pm-bus') yet has started calling pm_runtime_force_suspend() and pm_runtime_force_resume() during system suspend unconditionally. This currently works, but that is not obvious and depends on implementation details which may change...
```diff diff --git a/drivers/bus/simple-pm-bus.c b/drivers/bus/simple-pm-bus.c index 5dea31769f9a..d8e029e7e53f 100644 --- a/drivers/bus/simple-pm-bus.c +++ b/drivers/bus/simple-pm-bus.c @@ -109,9 +109,29 @@ static int simple_pm_bus_runtime_resume(struct device *dev) return 0; } +static int simple_pm_bus_suspend(s...
6d991f569c5ef6eaeadf1238df2c36e3975233ad
Analyze and fix the following issue in the Linux kernel code: char: misc: deallocate static minor in error path
Problem Details: When creating sysfs files fail, the allocated minor must be freed such that it can be later reused. That is specially harmful for static minor numbers, since those would always fail to register later on. Fixes: 6d04d2b554b1 ("misc: misc_minor_alloc to use ida for all dynamic/misc dynamic minors") Cc: ...
```diff diff --git a/drivers/char/misc.c b/drivers/char/misc.c index 2cf595d2e10b..f7dd455dd0dd 100644 --- a/drivers/char/misc.c +++ b/drivers/char/misc.c @@ -264,8 +264,8 @@ int misc_register(struct miscdevice *misc) device_create_with_groups(&misc_class, misc->parent, dev, misc, misc->groups, "%s", misc->n...
038ef0754aae76f79b147b8867f9250e6a976872
Analyze and fix the following issue in the Linux kernel code: eeprom: digsy_mtc: Make GPIO lookup table match the device
Problem Details: The dev_id value in the GPIO lookup table must match to the device instance name, which in this case is combined of name and platform device ID, i.e. "spi_gpio.1". But the table assumed that there was no platform device ID defined, which is wrong. Fix the dev_id value accordingly. Fixes: 9b00bc7b901f ...
```diff diff --git a/drivers/misc/eeprom/digsy_mtc_eeprom.c b/drivers/misc/eeprom/digsy_mtc_eeprom.c index 88888485e6f8..ee58f7ce5bfa 100644 --- a/drivers/misc/eeprom/digsy_mtc_eeprom.c +++ b/drivers/misc/eeprom/digsy_mtc_eeprom.c @@ -50,7 +50,7 @@ static struct platform_device digsy_mtc_eeprom = { }; static struct...
819cec1dc47cdeac8f5dd6ba81c1dbee2a68c3bb
Analyze and fix the following issue in the Linux kernel code: drivers: virt: acrn: hsm: Use kzalloc to avoid info leak in pmcmd_ioctl
Problem Details: In the "pmcmd_ioctl" function, three memory objects allocated by kmalloc are initialized by "hcall_get_cpu_state", which are then copied to user space. The initializer is indeed implemented in "acrn_hypercall2" (arch/x86/include/asm/acrn.h). There is a risk of information leakage due to uninitialized b...
```diff diff --git a/drivers/virt/acrn/hsm.c b/drivers/virt/acrn/hsm.c index c24036c4e51e..e4e196abdaac 100644 --- a/drivers/virt/acrn/hsm.c +++ b/drivers/virt/acrn/hsm.c @@ -49,7 +49,7 @@ static int pmcmd_ioctl(u64 cmd, void __user *uptr) switch (cmd & PMCMD_TYPE_MASK) { case ACRN_PMCMD_GET_PX_CNT: case ACRN_PMC...
e77aff5528a183462714f750e45add6cc71e276a
Analyze and fix the following issue in the Linux kernel code: binderfs: fix use-after-free in binder_devices
Problem Details: Devices created through binderfs are added to the global binder_devices list but are not removed before being destroyed. This leads to dangling pointers in the list and subsequent use-after-free errors: ================================================================== BUG: KASAN: slab-use-after-f...
```diff diff --git a/drivers/android/binderfs.c b/drivers/android/binderfs.c index bc6bae76ccaf..94c6446604fc 100644 --- a/drivers/android/binderfs.c +++ b/drivers/android/binderfs.c @@ -274,6 +274,7 @@ static void binderfs_evict_inode(struct inode *inode) mutex_unlock(&binderfs_minors_mutex); if (refcount_dec_an...
dcb0d43ba8eb9517e70b1a0e4b0ae0ab657a0e5a
Analyze and fix the following issue in the Linux kernel code: slimbus: messaging: Free transaction ID in delayed interrupt scenario
Problem Details: In case of interrupt delay for any reason, slim_do_transfer() returns timeout error but the transaction ID (TID) is not freed. This results into invalid memory access inside qcom_slim_ngd_rx_msgq_cb() due to invalid TID. Fix the issue by freeing the TID in slim_do_transfer() before returning timeout e...
```diff diff --git a/drivers/slimbus/messaging.c b/drivers/slimbus/messaging.c index e7aa9bd4b44b..6f01d944f9c6 100644 --- a/drivers/slimbus/messaging.c +++ b/drivers/slimbus/messaging.c @@ -148,8 +148,9 @@ int slim_do_transfer(struct slim_controller *ctrl, struct slim_msg_txn *txn) } ret = ctrl->xfer_msg(ctrl, t...
c99e1e1d0850ff157f1bc16871acd2dff5a9bcc3
Analyze and fix the following issue in the Linux kernel code: vbox: add HAS_IOPORT dependency
Problem Details: The vboxguest driver depends on port I/O for debug output: include/asm-generic/io.h:626:15: error: call to '_outl' declared with attribute error: outl() requires CONFIG_HAS_IOPORT 626 | #define _outl _outl include/asm-generic/io.h:663:14: note: in expansion of macro '_outl' 663 | #define outl _out...
```diff diff --git a/drivers/virt/vboxguest/Kconfig b/drivers/virt/vboxguest/Kconfig index 11b153e7454e..eaba28c95e73 100644 --- a/drivers/virt/vboxguest/Kconfig +++ b/drivers/virt/vboxguest/Kconfig @@ -1,7 +1,8 @@ # SPDX-License-Identifier: GPL-2.0-only config VBOXGUEST tristate "Virtual Box Guest integration supp...
91d44c1afc61a2fec37a9c7a3485368309391e0b
Analyze and fix the following issue in the Linux kernel code: cdx: Fix possible UAF error in driver_override_show()
Problem Details: Fixed a possible UAF problem in driver_override_show() in drivers/cdx/cdx.c This function driver_override_show() is part of DEVICE_ATTR_RW, which includes both driver_override_show() and driver_override_store(). These functions can be executed concurrently in sysfs. The driver_override_store() functi...
```diff diff --git a/drivers/cdx/cdx.c b/drivers/cdx/cdx.c index c573ed2ee71a..7811aa734053 100644 --- a/drivers/cdx/cdx.c +++ b/drivers/cdx/cdx.c @@ -473,8 +473,12 @@ static ssize_t driver_override_show(struct device *dev, struct device_attribute *attr, char *buf) { struct cdx_device *cdx_dev = to_cdx_devi...
4ce2c7e201c265df1c62a9190a98a98803208b8f
Analyze and fix the following issue in the Linux kernel code: drm/panel: ilitek-ili9882t: fix GPIO name in error message
Problem Details: This driver uses the enable-gpios property and it is confusing that the error message refers to reset-gpios. Use the correct name when the enable GPIO is not found. Fixes: e2450d32e5fb5 ("drm/panel: ili9882t: Break out as separate driver") Signed-off-by: John Keeping <jkeeping@inmusicbrands.com> Sign...
```diff diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c b/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c index 266a087fe14c..3c24a63b6be8 100644 --- a/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c @@ -607,7 +607,7 @@ static int ili9882t_add(struct ili9882t *...
ddd147d91d509c9d9fc6159efc5b56f61440bb9a
Analyze and fix the following issue in the Linux kernel code: drm: writeback: Fix kernel doc name
Problem Details: During the creation of drmm_ variants for writeback connector, one function was renamed, but not the kernel doc. To remove the warning, use the proper name in kernel doc. Fixes: 135d8fc7af44 ("drm: writeback: Create an helper for drm_writeback_connector initialization") Reported-by: Stephen Rothwell ...
```diff diff --git a/drivers/gpu/drm/drm_writeback.c b/drivers/gpu/drm/drm_writeback.c index f139b49af4c9..edbeab88ff2b 100644 --- a/drivers/gpu/drm/drm_writeback.c +++ b/drivers/gpu/drm/drm_writeback.c @@ -213,7 +213,7 @@ static void delete_writeback_properties(struct drm_device *dev) } /** - * drm_writeback_conne...
96fa9ec477ff60bed87e1441fd43e003179f3253
Analyze and fix the following issue in the Linux kernel code: gpiolib: don't bail out if get_direction() fails in gpiochip_add_data()
Problem Details: Since commit 9d846b1aebbe ("gpiolib: check the return value of gpio_chip::get_direction()") we check the return value of the get_direction() callback as per its API contract. Some drivers have been observed to fail to register now as they may call get_direction() in gpiochip_add_data() in contexts wher...
```diff diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 5529d8b65f6f..fc19df5a64c2 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1059,7 +1059,15 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data, if (gc->get_direction && gpiochip_line_is_valid(gc, desc_index...
fce85f3da08b76c1b052f53a9f6f9c40a8a10660
Analyze and fix the following issue in the Linux kernel code: auxdisplay: MAX6959 should select BITREVERSE
Problem Details: If CONFIG_BITREVERSE is not enabled: max6959.c:(.text+0x92): undefined reference to `byte_rev_table' Fixes: a9bcd02fa42217c7 ("auxdisplay: Add driver for MAX695x 7-segment LED controllers") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/202502161703.3Vr4M7qg-lkp@in...
```diff diff --git a/drivers/auxdisplay/Kconfig b/drivers/auxdisplay/Kconfig index 8934e6ad5772..bedc6133f970 100644 --- a/drivers/auxdisplay/Kconfig +++ b/drivers/auxdisplay/Kconfig @@ -503,6 +503,7 @@ config HT16K33 config MAX6959 tristate "Maxim MAX6958/6959 7-segment LED controller" depends on I2C + select BIT...
c783e1258f29c5caac9eea0aea6b172870f1baf8
Analyze and fix the following issue in the Linux kernel code: usb: gadget: Fix setting self-powered state on suspend
Problem Details: cdev->config might be NULL, so check it before dereferencing. CC: stable <stable@kernel.org> Fixes: 40e89ff5750f ("usb: gadget: Set self-powered based on MaxPower and bmAttributes") Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Link: https://lore.kernel.org/r/20250220120314.3614330-1-m.sz...
```diff diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 1fb28bbf6c45..4bcf73bae761 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -2616,7 +2616,8 @@ void composite_suspend(struct usb_gadget *gadget) cdev->suspended = 1; - if (cdev->config->bm...
78eb41f518f414378643ab022241df2a9dcd008b
Analyze and fix the following issue in the Linux kernel code: drivers: core: fix device leak in __fw_devlink_relax_cycles()
Problem Details: Commit bac3b10b78e5 ("driver core: fw_devlink: Stop trying to optimize cycle detection logic") introduced a new struct device *con_dev and a get_dev_from_fwnode() call to get it, but without adding a corresponding put_device(). Closes: https://lore.kernel.org/all/20241204124826.2e055091@booty/ Fixes: ...
```diff diff --git a/drivers/base/core.c b/drivers/base/core.c index 5a1f05198114..2fde698430df 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -2079,6 +2079,7 @@ static bool __fw_devlink_relax_cycles(struct fwnode_handle *con_handle, out: sup_handle->flags &= ~FWNODE_FLAG_VISITED; put_device(sup_dev...
a44073c28bc6d4118891d61e31c9fa9dc4333dc0
Analyze and fix the following issue in the Linux kernel code: driver core: Remove needless return in void API device_remove_group()
Problem Details: Remove return since both device_remove_group() and device_remove_groups() are void functions. Fixes: e323b2dddc1c ("driver core: add device_{add|remove}_group() helpers") Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://lore.kernel.org/r/20250208-fix_device_remove_group-v1-1-8a5b0ac0ce5...
```diff diff --git a/include/linux/device.h b/include/linux/device.h index 80a5b3268986..605b60254f6d 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -1268,7 +1268,7 @@ static inline void device_remove_group(struct device *dev, { const struct attribute_group *groups[] = { grp, NULL }; - return ...
20a351c36afc7d72956b57bdefbc79858f18923d
Analyze and fix the following issue in the Linux kernel code: staging: gpib: tnt4882 console messaging cleanup
Problem Details: Enable module name to be printed in pr_xxx and dev_xxx Use DRV_NAME defined as KBUILD_MODNAME instead of hard coded string "tnt4882_gpib" in pci_driver struct, request_region and request_irq. Remove unsupported chipset pr_err's Remove messages on interrupted or timed out reads and writes. Remove boa...
```diff diff --git a/drivers/staging/gpib/tnt4882/mite.c b/drivers/staging/gpib/tnt4882/mite.c index ea64dde46bcb..847b96f411bd 100644 --- a/drivers/staging/gpib/tnt4882/mite.c +++ b/drivers/staging/gpib/tnt4882/mite.c @@ -88,7 +88,6 @@ int mite_setup(struct mite_struct *mite) pr_err("mite: failed to remap mite io m...
0de51244e7b7e3ea97f9da68318fbc9e7e16f6a5
Analyze and fix the following issue in the Linux kernel code: staging: gpib: ines console messaging cleanup
Problem Details: Enable module name to be printed in pr_xxx and dev_xxx Use DRV_NAME defined as KBUILD_MODNAME instead of hard coded string "ines_gpib" in pci_request_regions, request_irq and request_region. Remove "ines:" and "ines_gpib:" string prefixes in messages since module name printing is enabled. Change pr_e...
```diff diff --git a/drivers/staging/gpib/ines/ines_gpib.c b/drivers/staging/gpib/ines/ines_gpib.c index b9abb2dfa4f3..56da6cd91188 100644 --- a/drivers/staging/gpib/ines/ines_gpib.c +++ b/drivers/staging/gpib/ines/ines_gpib.c @@ -5,6 +5,10 @@ * (C) 2002 by Frank Mori Hess ************************************...
82e3508046f9bce75e14b6cab5805e52f27f5405
Analyze and fix the following issue in the Linux kernel code: staging: gpib: cb7210 console messaging cleanup
Problem Details: Enable module name to be printed in pr_xxx and dev_xxx Use DRV_NAME defined as KBUILD_MODNAME instead of hard coded string "cb7210" everywhere. Remove "cb7210:" string prefix in messages since module name printing is enabled. Change pr_err to dev_err where possible. Remove interrupt warnings. Retur...
```diff diff --git a/drivers/staging/gpib/cb7210/cb7210.c b/drivers/staging/gpib/cb7210/cb7210.c index eff1872aa9ed..19dfd8b4a8e7 100644 --- a/drivers/staging/gpib/cb7210/cb7210.c +++ b/drivers/staging/gpib/cb7210/cb7210.c @@ -5,6 +5,10 @@ * copyright : (C) 2001, 2002 by Frank Mori Hess **************...
cbf937dcadfd571a434f8074d057b32cd14fbea5
Analyze and fix the following issue in the Linux kernel code: PCI/ASPM: Fix link state exit during switch upstream function removal
Problem Details: Before 456d8aa37d0f ("PCI/ASPM: Disable ASPM on MFD function removal to avoid use-after-free"), we would free the ASPM link only after the last function on the bus pertaining to the given link was removed. That was too late. If function 0 is removed before sibling function, link->downstream would poin...
```diff diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c index e0bc90597dca..25954cc89bf3 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c @@ -1273,16 +1273,16 @@ void pcie_aspm_exit_link_state(struct pci_dev *pdev) parent_link = link->parent; /* - * link->downstream is a pointer ...
6bc7e4eb0499562ccd291712fd7be0d1a5aad00a
Analyze and fix the following issue in the Linux kernel code: Revert "net: skb: introduce and use a single page frag cache"
Problem Details: After the previous commit is finally safe to revert commit dbae2b062824 ("net: skb: introduce and use a single page frag cache"): do it here. The intended goal of such change was to counter a performance regression introduced by commit 3226b158e67c ("net: avoid 32 x truesize under-estimation for tiny ...
```diff diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 94b7d4eca003..ab550a89b9bf 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -4117,7 +4117,6 @@ void netif_receive_skb_list(struct list_head *head); gro_result_t napi_gro_receive(struct napi_struct *napi, struct sk...
14ad6ed30a10afbe91b0749d6378285f4225d482
Analyze and fix the following issue in the Linux kernel code: net: allow small head cache usage with large MAX_SKB_FRAGS values
Problem Details: Sabrina reported the following splat: WARNING: CPU: 0 PID: 1 at net/core/dev.c:6935 netif_napi_add_weight_locked+0x8f2/0xba0 Modules linked in: CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.14.0-rc1-net-00092-g011b03359038 #996 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996)...
```diff diff --git a/include/net/gro.h b/include/net/gro.h index b9b58c1f8d19..7b548f91754b 100644 --- a/include/net/gro.h +++ b/include/net/gro.h @@ -11,6 +11,9 @@ #include <net/udp.h> #include <net/hotdata.h> +/* This should be increased if a protocol with a bigger head is added. */ +#define GRO_MAX_HEAD (MAX_HEA...
3e0711f89e5e7b0c7b2ab4843dc92dcbbdbba777
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: remove supports-cqe from rk3588 tiger
Problem Details: The sdhci controller supports cqe it seems and necessary code also is in place - in theory. At this point Jaguar and Tiger are the only boards enabling cqe support on the rk3588 and we are seeing reliability issues under load. This can be caused by either a controller-, hw- or driver-issue and defini...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi index 81a6a05ce13b..e8fa449517c2 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588-tiger.dtsi @@ -386,7 +386,6 @@ non-removable; pinctrl-names = "d...
304b0a60d38dc24bfbfc9adc7d254d1cf8f98317
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: remove supports-cqe from rk3588 jaguar
Problem Details: The sdhci controller supports cqe it seems and necessary code also is in place - in theory. At this point Jaguar and Tiger are the only boards enabling cqe support on the rk3588 and we are seeing reliability issues under load. This can be caused by either a controller-, hw- or driver-issue and defini...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts b/arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts index 90f823b2c219..7f457ab78015 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-jaguar.dts @@ -503,7 +503,6 @@ non-removable; pinctrl-names = "d...
04190ec6d02aa8fee0f03189bb7762b44739c253
Analyze and fix the following issue in the Linux kernel code: intel_th: msu: Fix less trivial kernel-doc warnings
Problem Details: Correct function comments to prevent kernel-doc warnings found when using "W=1" that the drive-by fixers had trouble documenting and skipped over. msu.c:168: warning: Function parameter or struct member 'msu_base' not described in 'msc' msu.c:168: warning: Function parameter or struct member 'work' no...
```diff diff --git a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th/msu.c index 492d8eba37eb..bf99d79a4192 100644 --- a/drivers/hwtracing/intel_th/msu.c +++ b/drivers/hwtracing/intel_th/msu.c @@ -105,13 +105,16 @@ struct msc_iter { /** * struct msc - MSC device representation - * @reg_base: registe...
4738d3d3e12d70a5067baba147daf57e57b77548
Analyze and fix the following issue in the Linux kernel code: intel_th: msu: Fix kernel-doc warnings
Problem Details: Correct function comments to prevent kernel-doc warnings found when using "W=1". msu.c:162: warning: Function parameter or struct member 'mbuf_priv' not described in 'msc' msu.c:164: warning: Function parameter or struct member 'orig_addr' not described in 'msc' msu.c:164: warning: Function parameter ...
```diff diff --git a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th/msu.c index 66123d684ac9..492d8eba37eb 100644 --- a/drivers/hwtracing/intel_th/msu.c +++ b/drivers/hwtracing/intel_th/msu.c @@ -108,7 +108,7 @@ struct msc_iter { * @reg_base: register window base address * @thdev: intel_th_device p...
878e7b11736e062514e58f3b445ff343e6705537
Analyze and fix the following issue in the Linux kernel code: nfp: bpf: Add check for nfp_app_ctrl_msg_alloc()
Problem Details: Add check for the return value of nfp_app_ctrl_msg_alloc() in nfp_bpf_cmsg_alloc() to prevent null pointer dereference. Fixes: ff3d43f7568c ("nfp: bpf: implement helpers for FW map ops") Cc: stable@vger.kernel.org Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com> Link: https://patch.msgid.link/2025...
```diff diff --git a/drivers/net/ethernet/netronome/nfp/bpf/cmsg.c b/drivers/net/ethernet/netronome/nfp/bpf/cmsg.c index 2ec62c8d86e1..59486fe2ad18 100644 --- a/drivers/net/ethernet/netronome/nfp/bpf/cmsg.c +++ b/drivers/net/ethernet/netronome/nfp/bpf/cmsg.c @@ -20,6 +20,8 @@ nfp_bpf_cmsg_alloc(struct nfp_app_bpf *bpf,...
9b6412e6979f6f9e0632075f8f008937b5cd4efd
Analyze and fix the following issue in the Linux kernel code: tcp: drop secpath at the same time as we currently drop dst
Problem Details: Xiumei reported hitting the WARN in xfrm6_tunnel_net_exit while running tests that boil down to: - create a pair of netns - run a basic TCP test over ipcomp6 - delete the pair of netns The xfrm_state found on spi_byaddr was not deleted at the time we delete the netns, because we still have a refere...
```diff diff --git a/include/net/tcp.h b/include/net/tcp.h index 5b2b04835688..930cda5b5eb9 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -41,6 +41,7 @@ #include <net/inet_ecn.h> #include <net/dst.h> #include <net/mptcp.h> +#include <net/xfrm.h> #include <linux/seq_file.h> #include <linux/memcontrol....
a370295367b55662a32a4be92565fe72a5aa79bb
Analyze and fix the following issue in the Linux kernel code: net: axienet: Set mac_managed_pm
Problem Details: The external PHY will undergo a soft reset twice during the resume process when it wake up from suspend. The first reset occurs when the axienet driver calls phylink_of_phy_connect(), and the second occurs when mdio_bus_phy_resume() invokes phy_init_hw(). The second soft reset of the external PHY does ...
```diff diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index 9e7fa012e4fa..f33178f90c42 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c @@ -2897,6 +2897,7 @@ static int axienet_prob...
6ec054a52d92fd172560996e3b2a4234a31f5265
Analyze and fix the following issue in the Linux kernel code: drm/ast: cursor: Calculate checksum in helper
Problem Details: Setting the cursor image requires a 32-bit checksum of the cursor image data. The current cursor code converts the image to ARGB4444 format and computes the checksum in a single step. Moving the checksum calculation into a separate helper will allow to move the format conversion into a shared helper. ...
```diff diff --git a/drivers/gpu/drm/ast/ast_drv.h b/drivers/gpu/drm/ast/ast_drv.h index 022a8c070c1b..d3115b31b032 100644 --- a/drivers/gpu/drm/ast/ast_drv.h +++ b/drivers/gpu/drm/ast/ast_drv.h @@ -142,6 +142,17 @@ static inline struct ast_plane *to_ast_plane(struct drm_plane *plane) return container_of(plane, struc...
6b00c9b992a13e8efd198cb37a7ab38462cb5fca
Analyze and fix the following issue in the Linux kernel code: ARM: dts: nxp: vf: Align GPIO hog name with bindings
Problem Details: Bindings expect GPIO hog names to end with 'hog' suffix, so correct it to fix dtbs_check warning: vf610-zii-dev-rev-c.dtb: eth0_intrp: $nodename:0: 'eth0_intrp' does not match '^.+-hog(-[0-9]+)?$' Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Shawn Guo <shawnguo...
```diff diff --git a/arch/arm/boot/dts/nxp/vf/vf610-zii-dev-rev-c.dts b/arch/arm/boot/dts/nxp/vf/vf610-zii-dev-rev-c.dts index 6f9878f124c4..4f99044837f8 100644 --- a/arch/arm/boot/dts/nxp/vf/vf610-zii-dev-rev-c.dts +++ b/arch/arm/boot/dts/nxp/vf/vf610-zii-dev-rev-c.dts @@ -392,7 +392,7 @@ }; &gpio0 { - eth0_intrp ...
5b99dd12fe53c745b40191b9e7fe9a25653b4e7a
Analyze and fix the following issue in the Linux kernel code: drm/i915/hdcp: Create force_hdcp14 debug fs entry
Problem Details: Testing HDCP 1.4 becomes tough since the only way our code comes to HDCP 1.4 pathway is if the monitor only supports HDCP 1.4 which becomes tough to find sometimes. Setting this debug_fs entry will force use to use the HDCP 1.4 path so that more robust HDCP 1.4 testing can take place. --v2 -Move the c...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h index a4e3f33f75eb..4440521e3e9e 100644 --- a/drivers/gpu/drm/i915/display/intel_display_types.h +++ b/drivers/gpu/drm/i915/display/intel_display_types.h @@ -496,6 +496,8 @@ struct intel_hdcp { ...
c534ffda781f44a1c6ac25ef6e0e444da38ca8af
Analyze and fix the following issue in the Linux kernel code: RDMA/mlx5: Fix AH static rate parsing
Problem Details: Previously static rate wasn't translated according to our PRM but simply used the 4 lower bytes. Correctly translate static rate value passed in AH creation attribute according to our PRM expected values. In addition change 800GB mapping to zero, which is the PRM specified value. Fixes: e126ba97dba9...
```diff diff --git a/drivers/infiniband/hw/mlx5/ah.c b/drivers/infiniband/hw/mlx5/ah.c index 505bc47fd575..99036afb3aef 100644 --- a/drivers/infiniband/hw/mlx5/ah.c +++ b/drivers/infiniband/hw/mlx5/ah.c @@ -67,7 +67,8 @@ static void create_ib_ah(struct mlx5_ib_dev *dev, struct mlx5_ib_ah *ah, ah->av.tclass = grh->tr...
3d8c6f26893d55fab218ad086719de1fc9bb86ba
Analyze and fix the following issue in the Linux kernel code: RDMA/mlx5: Fix implicit ODP hang on parent deregistration
Problem Details: Fix the destroy_unused_implicit_child_mr() to prevent hanging during parent deregistration as of below [1]. Upon entering destroy_unused_implicit_child_mr(), the reference count for the implicit MR parent is incremented using: refcount_inc_not_zero(). A corresponding decrement must be performed if fr...
```diff diff --git a/drivers/infiniband/hw/mlx5/odp.c b/drivers/infiniband/hw/mlx5/odp.c index f1e23583e6c0..e77c9280c07e 100644 --- a/drivers/infiniband/hw/mlx5/odp.c +++ b/drivers/infiniband/hw/mlx5/odp.c @@ -242,6 +242,7 @@ static void destroy_unused_implicit_child_mr(struct mlx5_ib_mr *mr) if (__xa_cmpxchg(&imr->...
bc68b0efa1bf923cef1294a631d8e7416c7e06e4
Analyze and fix the following issue in the Linux kernel code: mptcp: move the whole rx path under msk socket lock protection
Problem Details: After commit c2e6048fa1cf ("mptcp: fix race in release_cb") we can move the whole MPTCP rx path under the socket lock leveraging the release_cb. We can drop a bunch of spin_lock pairs in the receive functions, use a single receive queue and invoke __mptcp_move_skbs only when subflows ask for it. This...
```diff diff --git a/net/mptcp/fastopen.c b/net/mptcp/fastopen.c index 7777f5a2d143..f85ad19f3dd6 100644 --- a/net/mptcp/fastopen.c +++ b/net/mptcp/fastopen.c @@ -48,6 +48,7 @@ void mptcp_fastopen_subflow_synack_set_params(struct mptcp_subflow_context *subf MPTCP_SKB_CB(skb)->cant_coalesce = 1; mptcp_data_lock(sk...
23dcacff2d111fb35042edc44d4ce07e85598cce
Analyze and fix the following issue in the Linux kernel code: selftests: net: Fix minor typos in MPTCP and psock tests
Problem Details: Fixes minor spelling errors: - `simult_flows.sh`: "al testcases" -> "all testcases" - `psock_tpacket.c`: "accross" -> "across" Signed-off-by: Suchit Karunakaran <suchitkarunakaran@gmail.com> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20250218165923.20740-1-...
```diff diff --git a/tools/testing/selftests/net/mptcp/simult_flows.sh b/tools/testing/selftests/net/mptcp/simult_flows.sh index 9c2a415976cb..2329c2f8519b 100755 --- a/tools/testing/selftests/net/mptcp/simult_flows.sh +++ b/tools/testing/selftests/net/mptcp/simult_flows.sh @@ -28,7 +28,7 @@ size=0 usage() { echo ...
4eae0ee0f1e6256d0b0b9dd6e72f1d9cf8f72e08
Analyze and fix the following issue in the Linux kernel code: arp: switch to dev_getbyhwaddr() in arp_req_set_public()
Problem Details: The arp_req_set_public() function is called with the rtnl lock held, which provides enough synchronization protection. This makes the RCU variant of dev_getbyhwaddr() unnecessary. Switch to using the simpler dev_getbyhwaddr() function since we already have the required rtnl locking. This change helps ...
```diff diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index f23a1ec6694c..814300eee39d 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c @@ -1077,7 +1077,7 @@ static int arp_req_set_public(struct net *net, struct arpreq *r, __be32 mask = ((struct sockaddr_in *)&r->arp_netmask)->sin_addr.s_addr; if (!dev && (r->arp_...
606572eb22c1786a3957d24307f5760bb058ca19
Analyze and fix the following issue in the Linux kernel code: sctp: Fix undefined behavior in left shift operation
Problem Details: According to the C11 standard (ISO/IEC 9899:2011, 6.5.7): "If E1 has a signed type and E1 x 2^E2 is not representable in the result type, the behavior is undefined." Shifting 1 << 31 causes signed integer overflow, which leads to undefined behavior. Fix this by explicitly using '1U << 31' to ensure t...
```diff diff --git a/net/sctp/stream.c b/net/sctp/stream.c index c241cc552e8d..bfcff6d6a438 100644 --- a/net/sctp/stream.c +++ b/net/sctp/stream.c @@ -735,7 +735,7 @@ struct sctp_chunk *sctp_process_strreset_tsnreq( * value SHOULD be the smallest TSN not acknowledged by the * receiver of the request plus ...
69ab34f705fbfabcace64b5d53bb7a4450fac875
Analyze and fix the following issue in the Linux kernel code: flow_dissector: Fix port range key handling in BPF conversion
Problem Details: Fix how port range keys are handled in __skb_flow_bpf_to_target() by: - Separating PORTS and PORTS_RANGE key handling - Using correct key_ports_range structure for range keys - Properly initializing both key types independently This ensures port range information is correctly stored in its dedicated s...
```diff diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c index c33af3ef0b79..9cd8de6bebb5 100644 --- a/net/core/flow_dissector.c +++ b/net/core/flow_dissector.c @@ -931,6 +931,7 @@ static void __skb_flow_bpf_to_target(const struct bpf_flow_keys *flow_keys, struct flow_dissector *flow_dissect...
3e5796862c692ea608d96f0a1437f9290f44953a
Analyze and fix the following issue in the Linux kernel code: flow_dissector: Fix handling of mixed port and port-range keys
Problem Details: This patch fixes a bug in TC flower filter where rules combining a specific destination port with a source port range weren't working correctly. The specific case was when users tried to configure rules like: tc filter add dev ens38 ingress protocol ip flower ip_proto udp \ dst_port 5000 src_port 200...
```diff diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c index 5db41bf2ed93..c33af3ef0b79 100644 --- a/net/core/flow_dissector.c +++ b/net/core/flow_dissector.c @@ -853,23 +853,30 @@ __skb_flow_dissect_ports(const struct sk_buff *skb, void *target_container, const void *data, int nhoff, u8 i...
47dfd7a72257e91171d56e220ea484a04df89847
Analyze and fix the following issue in the Linux kernel code: net: mana: Add debug logs in MANA network driver
Problem Details: Add more logs to assist in debugging and monitoring driver behaviour, making it easier to identify potential issues during development and testing. Signed-off-by: Erni Sri Satya Vennela <ernis@linux.microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Link: https://patch.msgid.link/1739...
```diff diff --git a/drivers/net/ethernet/microsoft/mana/gdma_main.c b/drivers/net/ethernet/microsoft/mana/gdma_main.c index be95336ce089..c15a5ef4674e 100644 --- a/drivers/net/ethernet/microsoft/mana/gdma_main.c +++ b/drivers/net/ethernet/microsoft/mana/gdma_main.c @@ -666,8 +666,11 @@ int mana_gd_create_hwc_queue(str...
62fab6eef61f245dc8797e3a6a5b890ef40e8628
Analyze and fix the following issue in the Linux kernel code: geneve: Suppress list corruption splat in geneve_destroy_tunnels().
Problem Details: As explained in the previous patch, iterating for_each_netdev() and gn->geneve_list during ->exit_batch_rtnl() could trigger ->dellink() twice for the same device. If CONFIG_DEBUG_LIST is enabled, we will see a list_del() corruption splat in the 2nd call of geneve_dellink(). Let's remove for_each_net...
```diff diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c index a1f674539965..dbb3960126ee 100644 --- a/drivers/net/geneve.c +++ b/drivers/net/geneve.c @@ -1902,14 +1902,7 @@ static void geneve_destroy_tunnels(struct net *net, struct list_head *head) { struct geneve_net *gn = net_generic(net, geneve_net_id); ...
4ccacf86491d33d2486b62d4d44864d7101b299d
Analyze and fix the following issue in the Linux kernel code: gtp: Suppress list corruption splat in gtp_net_exit_batch_rtnl().
Problem Details: Brad Spengler reported the list_del() corruption splat in gtp_net_exit_batch_rtnl(). [0] Commit eb28fd76c0a0 ("gtp: Destroy device along with udp socket's netns dismantle.") added the for_each_netdev() loop in gtp_net_exit_batch_rtnl() to destroy devices in each netns as done in geneve and ip tunnels....
```diff diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index d64740bf44ed..b7b46c5e6399 100644 --- a/drivers/net/gtp.c +++ b/drivers/net/gtp.c @@ -2481,11 +2481,6 @@ static void __net_exit gtp_net_exit_batch_rtnl(struct list_head *net_list, list_for_each_entry(net, net_list, exit_list) { struct gtp_net *gn = n...
45291874a762dbb12a619dc2efaf84598859007a
Analyze and fix the following issue in the Linux kernel code: power: supply: bq27xxx_battery: do not update cached flags prematurely
Problem Details: Commit 243f8ffc883a1 ("power: supply: bq27xxx_battery: Notify also about status changes") intended to notify userspace when the status changes, based on the flags register. However, the cached state is updated too early, before the flags are tested for any changes. Remove the premature update. Fixes: ...
```diff diff --git a/drivers/power/supply/bq27xxx_battery.c b/drivers/power/supply/bq27xxx_battery.c index a1d01791df01..6a1e4b6875d2 100644 --- a/drivers/power/supply/bq27xxx_battery.c +++ b/drivers/power/supply/bq27xxx_battery.c @@ -1923,7 +1923,6 @@ static void bq27xxx_battery_update_unlocked(struct bq27xxx_device_i...
b04974f759ac7574d8556deb7c602a8d01a0dcc6
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix srcu lock warning in btree_update_nodes_written()
Problem Details: We don't want to be holding the srcu lock while waiting on btree write completions - easily fixed. Reported-by: Janpieter Sollie <janpieter.sollie@edpnet.be> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/btree_update_interior.c b/fs/bcachefs/btree_update_interior.c index f4aeadbe53c1..e4e7c804625e 100644 --- a/fs/bcachefs/btree_update_interior.c +++ b/fs/bcachefs/btree_update_interior.c @@ -681,9 +681,11 @@ static void btree_update_nodes_written(struct btree_update *as) b = as->old...
42ae6e2559e63c2d4096b698cd47aaeb974436df
Analyze and fix the following issue in the Linux kernel code: firmware: cs_dsp: test_control_parse: null-terminate test strings
Problem Details: The char pointers in 'struct cs_dsp_mock_coeff_def' are expected to point to C strings. They need to be terminated by a null byte. However the code does not allocate that trailing null byte and only works if by chance the allocation is followed by such a null byte. Refactor the repeated string allocat...
```diff diff --git a/drivers/firmware/cirrus/test/cs_dsp_test_control_parse.c b/drivers/firmware/cirrus/test/cs_dsp_test_control_parse.c index cb90964740ea..942ba1af5e7c 100644 --- a/drivers/firmware/cirrus/test/cs_dsp_test_control_parse.c +++ b/drivers/firmware/cirrus/test/cs_dsp_test_control_parse.c @@ -73,6 +73,18 @...
588021b28642a1509bdae65ae22329240b39d543
Analyze and fix the following issue in the Linux kernel code: PCI: shpchp: Remove 'shpchp_debug' module parameter
Problem Details: The "shpchp_debug" module parameter is used to enable debug logging. The generic ability to turn on/off debug prints dynamically covers this use case already so there is no need for module specific debug handling. The ctrl_dbg() wrapper also uses a low-level pci_printk() despite always using KERN_DEB...
```diff diff --git a/drivers/pci/hotplug/shpchp.h b/drivers/pci/hotplug/shpchp.h index 10ba0bfac419..a425530e0939 100644 --- a/drivers/pci/hotplug/shpchp.h +++ b/drivers/pci/hotplug/shpchp.h @@ -34,11 +34,7 @@ extern int shpchp_poll_time; extern bool shpchp_debug; #define ctrl_dbg(ctrl, format, arg...) \ - do {...
9629d7d66c621671d9a47afe27ca9336bfc8a9ea
Analyze and fix the following issue in the Linux kernel code: jfs: Fix uninit-value access of imap allocated in the diMount() function
Problem Details: syzbot reports that hex_dump_to_buffer is using uninit-value: ===================================================== BUG: KMSAN: uninit-value in hex_dump_to_buffer+0x888/0x1100 lib/hexdump.c:171 hex_dump_to_buffer+0x888/0x1100 lib/hexdump.c:171 print_hex_dump+0x13d/0x3e0 lib/hexdump.c:276 diFree+0x5ba/...
```diff diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c index debfc1389cb3..298445f6d3d4 100644 --- a/fs/jfs/jfs_imap.c +++ b/fs/jfs/jfs_imap.c @@ -102,7 +102,7 @@ int diMount(struct inode *ipimap) * allocate/initialize the in-memory inode map control structure */ /* allocate the in-memory inode map control ...
4fd509c10f9687f54752fbcaf83f520c93fc1f18
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix bch2_indirect_extent_missing_error()
Problem Details: We had some error handling confusion here; -BCH_ERR_missing_indirect_extent is thrown by trans_trigger_reflink_p_segment(); at this point we haven't decide whether we're generating an error. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/reflink.c b/fs/bcachefs/reflink.c index 376fd0a6e868..441e648f28b5 100644 --- a/fs/bcachefs/reflink.c +++ b/fs/bcachefs/reflink.c @@ -172,7 +172,7 @@ static int bch2_indirect_extent_missing_error(struct btree_trans *trans, bool should_commit) { if (REFLINK_P_ERROR(p.v)) -...
fdf480da5837c23b146c4743c18de97202fcab37
Analyze and fix the following issue in the Linux kernel code: jfs: fix slab-out-of-bounds read in ea_get()
Problem Details: During the "size_check" label in ea_get(), the code checks if the extended attribute list (xattr) size matches ea_size. If not, it logs "ea_get: invalid extended attribute" and calls print_hex_dump(). Here, EALIST_SIZE(ea_buf->xattr) returns 4110417968, which exceeds INT_MAX (2,147,483,647). Then ea_s...
```diff diff --git a/fs/jfs/xattr.c b/fs/jfs/xattr.c index 24afbae87225..11d7f74d207b 100644 --- a/fs/jfs/xattr.c +++ b/fs/jfs/xattr.c @@ -559,11 +559,16 @@ static int ea_get(struct inode *inode, struct ea_buffer *ea_buf, int min_size) size_check: if (EALIST_SIZE(ea_buf->xattr) != ea_size) { - int size = cl...
102c51c50db88aedd00a318b7708ad60dbec2e95
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Fix tcr_el2 initialisation in hVHE mode
Problem Details: When not running in VHE mode, cpu_prepare_hyp_mode() computes the value of TCR_EL2 using the host's TCR_EL1 settings as a starting point. For nVHE, this amounts to masking out everything apart from the TG0, SH0, ORGN0, IRGN0 and T0SZ fields before setting the RES1 bits, shifting the IPS field down to t...
```diff diff --git a/arch/arm64/include/asm/kvm_arm.h b/arch/arm64/include/asm/kvm_arm.h index 8d94a6c0ed5c..c2417a424b98 100644 --- a/arch/arm64/include/asm/kvm_arm.h +++ b/arch/arm64/include/asm/kvm_arm.h @@ -119,7 +119,7 @@ #define TCR_EL2_IRGN0_MASK TCR_IRGN0_MASK #define TCR_EL2_T0SZ_MASK 0x3f #define TCR_EL2_M...
0d2cdc35e805eb50f4a33b7287995ef590f1b916
Analyze and fix the following issue in the Linux kernel code: io_uring: Rename KConfig to Kconfig
Problem Details: Kconfig files are traditionally named "Kconfig". Fixes: 6f377873cb239050 ("io_uring/zcrx: add interface queue and refill queue") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/5ae387c1465f54768b51a5a1ca87be7934c4b2ad.1739976387.git.geert+renesas@glider.be S...
```diff diff --git a/Kconfig b/Kconfig index 529ea7694ba9..307e581144de 100644 --- a/Kconfig +++ b/Kconfig @@ -31,4 +31,4 @@ source "lib/Kconfig.debug" source "Documentation/Kconfig" -source "io_uring/KConfig" +source "io_uring/Kconfig" diff --git a/io_uring/KConfig b/io_uring/Kconfig similarity index 100% rename ...