id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
e63d465f59011dede0a0f1d21718b59a64c3ff5c
Analyze and fix the following issue in the Linux kernel code: objtool, media: dib8000: Prevent divide-by-zero in dib8000_set_dds()
Problem Details: If dib8000_set_dds()'s call to dib8000_read32() returns zero, the result is a divide-by-zero. Prevent that from happening. Fixes the following warning with an UBSAN kernel: drivers/media/dvb-frontends/dib8000.o: warning: objtool: dib8000_tune() falls through to next function dib8096p_cfg_DibRx() ...
```diff diff --git a/drivers/media/dvb-frontends/dib8000.c b/drivers/media/dvb-frontends/dib8000.c index 2f5165918163..cfe59c3255f7 100644 --- a/drivers/media/dvb-frontends/dib8000.c +++ b/drivers/media/dvb-frontends/dib8000.c @@ -2701,8 +2701,11 @@ static void dib8000_set_dds(struct dib8000_state *state, s32 offset_kh...
107a23185d990e3df6638d9a84c835f963fe30a6
Analyze and fix the following issue in the Linux kernel code: objtool, nvmet: Fix out-of-bounds stack access in nvmet_ctrl_state_show()
Problem Details: The csts_state_names[] array only has six sparse entries, but the iteration code in nvmet_ctrl_state_show() iterates seven, resulting in a potential out-of-bounds stack read. Fix that. Fixes the following warning with an UBSAN kernel: vmlinux.o: warning: objtool: .text.nvmet_ctrl_state_show: unexp...
```diff diff --git a/drivers/nvme/target/debugfs.c b/drivers/nvme/target/debugfs.c index 220c7391fc19..c6571fbd35e3 100644 --- a/drivers/nvme/target/debugfs.c +++ b/drivers/nvme/target/debugfs.c @@ -78,7 +78,7 @@ static int nvmet_ctrl_state_show(struct seq_file *m, void *p) bool sep = false; int i; - for (i = 0; ...
76e51db43fe4aaaebcc5ddda67b0807f7c9bdecc
Analyze and fix the following issue in the Linux kernel code: objtool, spi: amd: Fix out-of-bounds stack access in amd_set_spi_freq()
Problem Details: If speed_hz < AMD_SPI_MIN_HZ, amd_set_spi_freq() iterates over the entire amd_spi_freq array without breaking out early, causing 'i' to go beyond the array bounds. Fix that by stopping the loop when it gets to the last entry, so the low speed_hz value gets clamped up to AMD_SPI_MIN_HZ. Fixes the foll...
```diff diff --git a/drivers/spi/spi-amd.c b/drivers/spi/spi-amd.c index c85997478b81..17fc0b17e756 100644 --- a/drivers/spi/spi-amd.c +++ b/drivers/spi/spi-amd.c @@ -302,7 +302,7 @@ static void amd_set_spi_freq(struct amd_spi *amd_spi, u32 speed_hz) { unsigned int i, spd7_val, alt_spd; - for (i = 0; i < ARRAY_SIZ...
4d38328eb442dc06aec4350fd9594ffa6488af02
Analyze and fix the following issue in the Linux kernel code: tracing: Fix synth event printk format for str fields
Problem Details: The printk format for synth event uses "%.*s" to print string fields, but then only passes the pointer part as var arg. Replace %.*s with %s as the C string is guaranteed to be null-terminated. The output in print fmt should never have been updated as __get_str() handles the string limit because it c...
```diff diff --git a/kernel/trace/trace_events_synth.c b/kernel/trace/trace_events_synth.c index a5c5f34c207a..6d592cbc38e4 100644 --- a/kernel/trace/trace_events_synth.c +++ b/kernel/trace/trace_events_synth.c @@ -305,7 +305,7 @@ static const char *synth_field_fmt(char *type) else if (strcmp(type, "gfp_t") == 0) ...
dc84bc2aba85a1508f04a936f9f9a15f64ebfb31
Analyze and fix the following issue in the Linux kernel code: x86/mm/pat: Fix VM_PAT handling when fork() fails in copy_page_range()
Problem Details: If track_pfn_copy() fails, we already added the dst VMA to the maple tree. As fork() fails, we'll cleanup the maple tree, and stumble over the dst VMA for which we neither performed any reservation nor copied any page tables. Consequently untrack_pfn() will see VM_PAT and try obtaining the PAT informa...
```diff diff --git a/arch/x86/mm/pat/memtype.c b/arch/x86/mm/pat/memtype.c index e40861c9cb90..72d8cbc61158 100644 --- a/arch/x86/mm/pat/memtype.c +++ b/arch/x86/mm/pat/memtype.c @@ -984,29 +984,42 @@ static int get_pat_info(struct vm_area_struct *vma, resource_size_t *paddr, return -EINVAL; } -/* - * track_pfn_co...
c7d82913d5f9e97860772ee4051eaa66b56a6273
Analyze and fix the following issue in the Linux kernel code: net: libwx: fix Tx L4 checksum
Problem Details: The hardware only supports L4 checksum offload for TCP/UDP/SCTP protocol. There was a bug to set Tx checksum flag for the other protocol that results in Tx ring hang. Fix to compute software checksum for these packets. Fixes: 3403960cdf86 ("net: wangxun: libwx add tx offload functions") Signed-off-by:...
```diff diff --git a/drivers/net/ethernet/wangxun/libwx/wx_lib.c b/drivers/net/ethernet/wangxun/libwx/wx_lib.c index 9294a9d8c554..497abf2723a5 100644 --- a/drivers/net/ethernet/wangxun/libwx/wx_lib.c +++ b/drivers/net/ethernet/wangxun/libwx/wx_lib.c @@ -1337,6 +1337,7 @@ static void wx_tx_csum(struct wx_ring *tx_ring,...
a44940d094afa2e04b5b164b1e136fc18bcb4a2d
Analyze and fix the following issue in the Linux kernel code: net: libwx: fix Tx descriptor content for some tunnel packets
Problem Details: The length of skb header was incorrectly calculated when transmit a tunnel packet with outer IPv6 extension header, or a IP over IP packet which has inner IPv6 header. Thus the correct Tx context descriptor cannot be composed, resulting in Tx ring hang. Fixes: 3403960cdf86 ("net: wangxun: libwx add tx...
```diff diff --git a/drivers/net/ethernet/wangxun/libwx/wx_lib.c b/drivers/net/ethernet/wangxun/libwx/wx_lib.c index 2b3d6586f44a..9294a9d8c554 100644 --- a/drivers/net/ethernet/wangxun/libwx/wx_lib.c +++ b/drivers/net/ethernet/wangxun/libwx/wx_lib.c @@ -1082,26 +1082,6 @@ static void wx_tx_ctxtdesc(struct wx_ring *tx_...
bf2986fcf82a449441f9ee4335df19be19e83970
Analyze and fix the following issue in the Linux kernel code: atm: Fix NULL pointer dereference
Problem Details: When MPOA_cache_impos_rcvd() receives the msg, it can trigger Null Pointer Dereference Vulnerability if both entry and holding_time are NULL. Because there is only for the situation where entry is NULL and holding_time exists, it can be passed when both entry and holding_time are NULL. If these are NUL...
```diff diff --git a/net/atm/mpc.c b/net/atm/mpc.c index 324e3ab96bb3..12da0269275c 100644 --- a/net/atm/mpc.c +++ b/net/atm/mpc.c @@ -1314,6 +1314,8 @@ static void MPOA_cache_impos_rcvd(struct k_message *msg, holding_time = msg->content.eg_info.holding_time; dprintk("(%s) entry = %p, holding_time = %u\n", mpc->...
1ec52c157b4298986257c0380bfcfe72e05c7c9b
Analyze and fix the following issue in the Linux kernel code: thermal/drivers/mediatek/lvts: Only update IRQ enable for valid sensors
Problem Details: Only sensors that are valid need to have their interrupts enable status updated based on their thresholds. Use the lvts_for_each_valid_sensor() helper in lvts_update_irq_mask() to ignore invalid sensors. Currently, since the invalid sensors will always contain zeroed out thresholds (from kzalloc), the...
```diff diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c index 38668b5b34c7..088481d91e6e 100644 --- a/drivers/thermal/mediatek/lvts_thermal.c +++ b/drivers/thermal/mediatek/lvts_thermal.c @@ -346,7 +346,7 @@ static void lvts_update_irq_mask(struct lvts_ctrl *lvts_ctrl) ...
2738fb3ec6838a10d2c4ce65cefdb3b90b11bd61
Analyze and fix the following issue in the Linux kernel code: thermal/drivers/mediatek/lvts: Start sensor interrupts disabled
Problem Details: Interrupts are enabled per sensor in lvts_update_irq_mask() as needed, there's no point in enabling all of them during initialization. Change the MONINT register initial value so all sensor interrupts start disabled. Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Sig...
```diff diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c index 04bfbfe93a71..38668b5b34c7 100644 --- a/drivers/thermal/mediatek/lvts_thermal.c +++ b/drivers/thermal/mediatek/lvts_thermal.c @@ -65,7 +65,6 @@ #define LVTS_HW_FILTER 0x0 #define LVTS_TSSEL_CONF 0x131211...
fa17ff8e325a657c84be1083f06e54ee7eea82e4
Analyze and fix the following issue in the Linux kernel code: thermal/drivers/mediatek/lvts: Disable low offset IRQ for minimum threshold
Problem Details: In order to get working interrupts, a low offset value needs to be configured. The minimum value for it is 20 Celsius, which is what is configured when there's no lower thermal trip (ie the thermal core passes -INT_MAX as low trip temperature). However, when the temperature gets that low and fluctuates...
```diff diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c index 0aaa44b734ca..04bfbfe93a71 100644 --- a/drivers/thermal/mediatek/lvts_thermal.c +++ b/drivers/thermal/mediatek/lvts_thermal.c @@ -67,10 +67,14 @@ #define LVTS_CALSCALE_CONF 0x300 #define LVTS_MONINT_CONF 0...
c612cbcdf603aefb3358b2e3964dcd5aa3f827a0
Analyze and fix the following issue in the Linux kernel code: thermal/drivers/mediatek/lvts: Disable Stage 3 thermal threshold
Problem Details: The Stage 3 thermal threshold is currently configured during the controller initialization to 105 Celsius. From the kernel perspective, this configuration is harmful because: * The stage 3 interrupt that gets triggered when the threshold is crossed is not handled in any way by the IRQ handler, it jus...
```diff diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c index a1a438ebad33..0aaa44b734ca 100644 --- a/drivers/thermal/mediatek/lvts_thermal.c +++ b/drivers/thermal/mediatek/lvts_thermal.c @@ -65,7 +65,7 @@ #define LVTS_HW_FILTER 0x0 #define LVTS_TSSEL_CONF 0x131211...
65594b3745024857f812145a58db3601d733676c
Analyze and fix the following issue in the Linux kernel code: thermal/drivers/mediatek/lvts: Disable monitor mode during suspend
Problem Details: When configured in filtered mode, the LVTS thermal controller will monitor the temperature from the sensors and trigger an interrupt once a thermal threshold is crossed. Currently this is true even during suspend and resume. The problem with that is that when enabling the internal clock of the LVTS co...
```diff diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c index 07f7f3b7a2fb..a1a438ebad33 100644 --- a/drivers/thermal/mediatek/lvts_thermal.c +++ b/drivers/thermal/mediatek/lvts_thermal.c @@ -860,6 +860,32 @@ static int lvts_ctrl_init(struct device *dev, struct lvts_domain...
9e6ec8cf64e2973f0ec74f09023988cabd218426
Analyze and fix the following issue in the Linux kernel code: thermal: core: Remove duplicate struct declaration
Problem Details: The struct thermal_zone_device is already declared on line 32, so the duplicate declaration has been removed. Fixes: b1ae92dcfa8e ("thermal: core: Make struct thermal_zone_device definition internal") Signed-off-by: xueqin Luo <luoxueqin@kylinos.cn> Link: https://lore.kernel.org/r/20250206081436.51785...
```diff diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 69f9bedd0ee8..0b5ed6821080 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -86,8 +86,6 @@ struct thermal_trip { #define THERMAL_TRIP_PRIV_TO_INT(_val_) (uintptr_t)(_val_) #define THERMAL_INT_TO_TRIP_PRIV(_val_) (void *)...
ee022e5cae052e0c67ca7c5fec0f2e7bc897c70e
Analyze and fix the following issue in the Linux kernel code: thermal/drivers/rockchip: Add missing rk3328 mapping entry
Problem Details: The mapping table for the rk3328 is missing the entry for -25C which is found in the TRM section 9.5.2 "Temperature-to-code mapping". NOTE: the kernel uses the tsadc_q_sel=1'b1 mode which is defined as: 4096-<code in table>. Whereas the table in the TRM gives the code "3774" for -25C, the ...
```diff diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c index f551df48eef9..a8ad85feb68f 100644 --- a/drivers/thermal/rockchip_thermal.c +++ b/drivers/thermal/rockchip_thermal.c @@ -386,6 +386,7 @@ static const struct tsadc_table rk3328_code_table[] = { {296, -40000}, {304, -350...
355d63e5de95de72561891b4d17b83ba82cfe42a
Analyze and fix the following issue in the Linux kernel code: arch: mips: defconfig: Drop obsolete CONFIG_NET_CLS_TCINDEX
Problem Details: This option was removed from the Kconfig in commit 8c710f75256b ("net/sched: Retire tcindex classifier") but it was not removed from the defconfigs. Fixes: 8c710f75256b ("net/sched: Retire tcindex classifier") Signed-off-by: Johan Korsnes <johan.korsnes@gmail.com> Cc: Thomas Bogendoerfer <tsbogend@alp...
```diff diff --git a/arch/mips/configs/gpr_defconfig b/arch/mips/configs/gpr_defconfig index 92fc0edbac47..12f3eed8a946 100644 --- a/arch/mips/configs/gpr_defconfig +++ b/arch/mips/configs/gpr_defconfig @@ -116,7 +116,6 @@ CONFIG_NET_SCH_DSMARK=m CONFIG_NET_SCH_NETEM=m CONFIG_NET_SCH_INGRESS=m CONFIG_NET_CLS_BASIC=m...
fd87b7783802b45cdd261b273e6b2b792823064d
Analyze and fix the following issue in the Linux kernel code: net: Fix the devmem sock opts and msgs for parisc
Problem Details: The devmem socket options and socket control message definitions introduced in the TCP devmem series[1] incorrectly continued the socket definitions for arch/parisc. The UAPI change seems safe as there are currently no drivers that declare support for devmem TCP RX via PP_FLAG_ALLOW_UNREADABLE_NETMEM....
```diff diff --git a/arch/parisc/include/uapi/asm/socket.h b/arch/parisc/include/uapi/asm/socket.h index aa9cd4b951fe..96831c988606 100644 --- a/arch/parisc/include/uapi/asm/socket.h +++ b/arch/parisc/include/uapi/asm/socket.h @@ -132,16 +132,16 @@ #define SO_PASSPIDFD 0x404A #define SO_PEERPIDFD 0x404B -#define ...
eed14eb510c040a3826b633048244bb7a816c67d
Analyze and fix the following issue in the Linux kernel code: Bluetooth: MGMT: Add LL Privacy Setting
Problem Details: This adds LL Privacy (bit 22) to Read Controller Information so the likes of bluetoothd(1) can detect when the controller supports it or not. Fixes: e209e5ccc5ac ("Bluetooth: MGMT: Mark LL Privacy as stable") Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
```diff diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h index affac861efdc..3575cd16049a 100644 --- a/include/net/bluetooth/mgmt.h +++ b/include/net/bluetooth/mgmt.h @@ -113,6 +113,7 @@ struct mgmt_rp_read_index_list { #define MGMT_SETTING_CIS_PERIPHERAL BIT(19) #define MGMT_SETTING_ISO_BROAD...
3a7fdfb7d876910cfe734488f553dbbc938f8f16
Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_event: Fix handling of HCI_EV_LE_DIRECT_ADV_REPORT
Problem Details: Some controllers seems to generate HCI_EV_LE_DIRECT_ADV_REPORT even when scan_filter is not set to 0x02 or 0x03, which indicates that local privacy is enabled, causing them to be ignored thus breaking auto-connect logic: < HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7 Type: Passive ...
```diff diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 83990c975c1f..1d8616f2e740 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -6060,8 +6060,17 @@ static void process_adv_report(struct hci_dev *hdev, u8 type, bdaddr_t *bdaddr, * a LE Direct Advertising Report ev...
1f77c05408c96bc0b58ae476a9cadc9e5b9cfd0f
Analyze and fix the following issue in the Linux kernel code: Bluetooth: btnxpuart: Fix kernel panic during FW release
Problem Details: This fixes a kernel panic seen during release FW in a stress test scenario where WLAN and BT FW download occurs simultaneously, and due to a HW bug, chip sends out only 1 bootloader signatures. When driver receives the bootloader signature, it enters FW download mode, but since no consequtive bootload...
```diff diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c index 5eae622990b8..5091dea762a0 100644 --- a/drivers/bluetooth/btnxpuart.c +++ b/drivers/bluetooth/btnxpuart.c @@ -701,8 +701,10 @@ static int nxp_download_firmware(struct hci_dev *hdev) &nxpdev->tx_state), msecs_t...
bf81cf29b77c09b8c0a5ef3d574945e57dfde787
Analyze and fix the following issue in the Linux kernel code: Bluetooth: btnxpuart: Handle bootloader error during cmd5 and cmd7
Problem Details: This handles the scenario where the driver receives an error code after sending cmd5 or cmd7 in the bootloader signature during FW download. The bootloader error code is handled by the driver and FW offset is corrected accordingly, and the cmd5 or cmd7 is re-sent to the controller in case of CRC error....
```diff diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c index b9d2fe5e992d..5eae622990b8 100644 --- a/drivers/bluetooth/btnxpuart.c +++ b/drivers/bluetooth/btnxpuart.c @@ -168,6 +168,12 @@ struct btnxpuart_data { const char *fw_name_old; }; +enum bootloader_param_change { + not_changed, ...
c59d88101cd9ed609678880e93b8e7684c7ba68e
Analyze and fix the following issue in the Linux kernel code: Bluetooth: btnxpuart: Add correct bootloader error codes
Problem Details: This corrects the bootloader error codes for NXP chipsets. Since we have a common handling for all error codes, there is no backward compatibility issue. Added error handling for CRC error code in V3 bootloader signature. Fixes: 27489364299a ("Bluetooth: btnxpuart: Add handling for boot-signature time...
```diff diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c index b440ba9292ec..b9d2fe5e992d 100644 --- a/drivers/bluetooth/btnxpuart.c +++ b/drivers/bluetooth/btnxpuart.c @@ -210,10 +210,11 @@ struct btnxpuart_dev { #define NXP_NAK_V3 0x7b #define NXP_CRC_ERROR_V3 0x7c -/* Bootloader signat...
34f051accedb642087fdcf19b3501fe150fbee49
Analyze and fix the following issue in the Linux kernel code: drm/vc4: hdmi: Call HDMI hotplug helper on disconnect
Problem Details: drm_atomic_helper_connector_hdmi_hotplug() must be called regardless of the connection status, otherwise the HDMI audio disconnect event won't be notified. Fixes: 2ea9ec5d2c20 ("drm/vc4: hdmi: use drm_atomic_helper_connector_hdmi_hotplug()") Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>...
```diff diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 37238a12baa5..37a7d45695f2 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -372,13 +372,13 @@ static void vc4_hdmi_handle_hotplug(struct vc4_hdmi *vc4_hdmi, * the lock for now. */ + drm...
3afcb3b2e3a4ead24e3ab476576e87877d55ee22
Analyze and fix the following issue in the Linux kernel code: io_uring: defer iowq cqe overflow via task_work
Problem Details: Don't handle CQE overflows in io_req_complete_post() and defer it to flush_completions. It cuts some duplication, and I also want to limit the number of places directly overflowing completions. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/9046410ac27e18f2baa6f...
```diff diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index e6c462948273..1fcfe62cecd9 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -892,6 +892,7 @@ bool io_req_post_cqe(struct io_kiocb *req, s32 res, u32 cflags) static void io_req_complete_post(struct io_kiocb *req, unsigned issue_flags) { ...
3f0cb8de56b9a5c052a9e43fa548856926059810
Analyze and fix the following issue in the Linux kernel code: io_uring: fix retry handling off iowq
Problem Details: io_req_complete_post() doesn't handle reissue and if called with a REQ_F_REISSUE request it might post extra unexpected completions. Fix it by pushing into flush_completion via task work. Fixes: d803d123948fe ("io_uring/rw: handle -EAGAIN retry at IO completion time") Signed-off-by: Pavel Begunkov <as...
```diff diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index e1128b9551aa..e6c462948273 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -904,7 +904,7 @@ static void io_req_complete_post(struct io_kiocb *req, unsigned issue_flags) * Handle special CQ sync cases via task_work. DEFER_TASKRUN requi...
1ae1d705a1120e8e0ca41698c5a0fff6f5290bc1
Analyze and fix the following issue in the Linux kernel code: net: dsa: microchip: fix DCB apptrust configuration on KSZ88x3
Problem Details: Remove KSZ88x3-specific priority and apptrust configuration logic that was based on incorrect register access assumptions. Also fix the register offset for KSZ8_REG_PORT_1_CTRL_0 to align with get_port_addr() logic. The KSZ88x3 switch family uses a different register layout compared to KSZ9477-compati...
```diff diff --git a/drivers/net/dsa/microchip/ksz8.c b/drivers/net/dsa/microchip/ksz8.c index da7110d67558..be433b4e2b1c 100644 --- a/drivers/net/dsa/microchip/ksz8.c +++ b/drivers/net/dsa/microchip/ksz8.c @@ -1625,7 +1625,6 @@ void ksz8_port_setup(struct ksz_device *dev, int port, bool cpu_port) const u16 *regs = d...
a5b230e7f3a55bd8bd8d012eec75a4b7baa671d5
Analyze and fix the following issue in the Linux kernel code: drm/imagination: fix firmware memory leaks
Problem Details: Free the memory used to hold the results of firmware image processing when the module is unloaded. Fix the related issue of the same memory being leaked if processing of the firmware image fails during module load. Ensure all firmware GEM objects are destroyed if firmware image processing fails. Fix...
```diff diff --git a/drivers/gpu/drm/imagination/pvr_fw.c b/drivers/gpu/drm/imagination/pvr_fw.c index 3debc9870a82..d09c4c684116 100644 --- a/drivers/gpu/drm/imagination/pvr_fw.c +++ b/drivers/gpu/drm/imagination/pvr_fw.c @@ -732,7 +732,7 @@ pvr_fw_process(struct pvr_device *pvr_dev) fw_mem->core_data, fw...
4ba2abe154ef68f9612eee9d6fbfe53a1736b064
Analyze and fix the following issue in the Linux kernel code: drm/imagination: take paired job reference
Problem Details: For paired jobs, have the fragment job take a reference on the geometry job, so that the geometry job cannot be freed until the fragment job has finished with it. The geometry job structure is accessed when the fragment job is being prepared by the GPU scheduler. Taking the reference prevents the geom...
```diff diff --git a/drivers/gpu/drm/imagination/pvr_job.c b/drivers/gpu/drm/imagination/pvr_job.c index 618503a212a7..aad183a57371 100644 --- a/drivers/gpu/drm/imagination/pvr_job.c +++ b/drivers/gpu/drm/imagination/pvr_job.c @@ -677,6 +677,13 @@ pvr_jobs_link_geom_frag(struct pvr_job_data *job_data, u32 *job_count) ...
ba6f418fbf64bb8c0e98dc1b548c151beeedd16c
Analyze and fix the following issue in the Linux kernel code: net: bubble up taking netdev instance lock to callers of net_devmem_unbind_dmabuf()
Problem Details: A recent commit added taking the netdev instance lock in netdev_nl_bind_rx_doit(), but didn't remove it in net_devmem_unbind_dmabuf() which it calls from an error path. Always expect the callers of net_devmem_unbind_dmabuf() to hold the lock. This is consistent with net_devmem_bind_dmabuf(). (Not so) ...
```diff diff --git a/net/core/devmem.c b/net/core/devmem.c index 6802e82a4d03..ee145a2aa41c 100644 --- a/net/core/devmem.c +++ b/net/core/devmem.c @@ -128,12 +128,10 @@ void net_devmem_unbind_dmabuf(struct net_devmem_dmabuf_binding *binding) rxq->mp_params.mp_priv = NULL; rxq->mp_params.mp_ops = NULL; - netdev...
3b5715aeb8bed22aa8be37abd4f3d2672646596f
Analyze and fix the following issue in the Linux kernel code: t blameBluetooth: btintel: Fix leading white space
Problem Details: Remove the unwanted leading whitespace. Fixes: 6ed83047389c ("Bluetooth: btintel_pcie: Setup buffers for firmware traces") Fixes: bb3569ac3604 ("Bluetooth: btintel: Add DSBR support for ScP") Signed-off-by: Kiran K <kiran.k@intel.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
```diff diff --git a/drivers/bluetooth/btintel.h b/drivers/bluetooth/btintel.h index b2b5be28e803..2aece3effa4e 100644 --- a/drivers/bluetooth/btintel.h +++ b/drivers/bluetooth/btintel.h @@ -56,7 +56,7 @@ struct intel_tlv { #define BTINTEL_CNVI_BLAZARIW 0x901 #define BTINTEL_CNVI_GAP 0x910 #define BTINTEL_CNVI_BLA...
ece69af2ede103e190ffdfccd9f9ec850606ab5e
Analyze and fix the following issue in the Linux kernel code: rwonce: handle KCSAN like KASAN in read_word_at_a_time()
Problem Details: read_word_at_a_time() is allowed to read out of bounds by straddling the end of an allocation (and the caller is expected to then mask off out-of-bounds data). This works as long as the caller guarantees that the access won't hit a pagefault (either by ensuring that addr is aligned or by explicitly che...
```diff diff --git a/include/asm-generic/rwonce.h b/include/asm-generic/rwonce.h index 8d0a6280e982..e9f2b84d2338 100644 --- a/include/asm-generic/rwonce.h +++ b/include/asm-generic/rwonce.h @@ -79,11 +79,14 @@ unsigned long __read_once_word_nocheck(const void *addr) (typeof(x))__read_once_word_nocheck(&(x)); \ })...
e8c00f5433d020a2230226abe7e43f43dc686920
Analyze and fix the following issue in the Linux kernel code: Bluetooth: HCI: Add definition of hci_rp_remote_name_req_cancel
Problem Details: Return Parameters is not only status, also bdaddr: BLUETOOTH CORE SPECIFICATION Version 5.4 | Vol 4, Part E page 1870: BLUETOOTH CORE SPECIFICATION Version 5.0 | Vol 2, Part E page 802: Return parameters: Status: Size: 1 octet BD_ADDR: Size: 6 octets Note that it also fixes the warning: "Blu...
```diff diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 6da61c185c94..a8586c3058c7 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h @@ -879,6 +879,11 @@ struct hci_cp_remote_name_req_cancel { bdaddr_t bdaddr; } __packed; +struct hci_rp_remote_name_req_cancel {...
13218453521d75916dfed55efb8e809bfc03cb4b
Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_core: Enable buffer flow control for SCO/eSCO
Problem Details: This enables buffer flow control for SCO/eSCO (see: Bluetooth Core 6.0 spec: 6.22. Synchronous Flow Control Enable), recently this has caused the following problem and is actually a nice addition for the likes of Socket TX complete: < HCI Command: Read Buffer Size (0x04|0x0005) plen 0 > HCI Event: Com...
```diff diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index aa684d2b079f..6da61c185c94 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h @@ -208,6 +208,13 @@ enum { */ HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED, + /* When this quirk is set consider Sync Flow Control as ...
42c6c7a0cfc4339cf9727a64f3e7d7d66a26855d
Analyze and fix the following issue in the Linux kernel code: Bluetooth: btintel_pci: Fix build warning
Problem Details: This fixes the following warning: drivers/bluetooth/btintel_pcie.c:695:20: warning: unused function 'btintel_pcie_in_rom' [-Wunused-function] 695 | static inline bool btintel_pcie_in_rom(struct btintel_pcie_data *data) | ^~~~~~~~~~~~~~~~~~~ Signed-off-by: Luiz Augusto von D...
```diff diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c index f3ab5b41b050..9114be1fc3ce 100644 --- a/drivers/bluetooth/btintel_pcie.c +++ b/drivers/bluetooth/btintel_pcie.c @@ -685,20 +685,6 @@ static int btintel_pcie_enable_bt(struct btintel_pcie_data *data) return 0; } -/* BIT(0...
1f04b0e5e3b90b30f3ae7bee7e3d42a55fa91d5f
Analyze and fix the following issue in the Linux kernel code: Bluetooth: btusb: Fix regression in the initialization of fake Bluetooth controllers
Problem Details: Set HCI_READ_VOICE_SETTING and HCI_READ_PAGE_SCAN_TYPE as broken. Once the min/max length of the commands began to be asserted, these fake controllers can no longer be initialized because they return a smaller report for these commands. This affects various fake controllers reusing the 0A12:0001 VID/...
```diff diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 7080d02f610b..5012b5ff92c8 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -2509,6 +2509,8 @@ static int btusb_setup_csr(struct hci_dev *hdev) set_bit(HCI_QUIRK_BROKEN_ERR_DATA_REPORTING, &hdev->quirks); set...
5df5dafc171b90d0b8d51547a82657cd5a1986c7
Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_uart: Fix another race during initialization
Problem Details: Do not set 'HCI_UART_PROTO_READY' before call 'hci_uart_register_dev()'. Possible race is when someone calls 'hci_tty_uart_close()' after this bit is set, but 'hci_uart_register_dev()' wasn't done. This leads to access to uninitialized fields. To fix it let's set this bit after device was registered (a...
```diff diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c index b955dc96b483..acba83156de9 100644 --- a/drivers/bluetooth/hci_ldisc.c +++ b/drivers/bluetooth/hci_ldisc.c @@ -102,7 +102,8 @@ static inline struct sk_buff *hci_uart_dequeue(struct hci_uart *hu) if (!skb) { percpu_down_read(&hu...
366ceff495f902182d42b6f41525c2474caf3f9a
Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_uart: fix race during initialization
Problem Details: 'hci_register_dev()' calls power up function, which is executed by kworker - 'hci_power_on()'. This function does access to bluetooth chip using callbacks from 'hci_ldisc.c', for example 'hci_uart_send_frame()'. Now 'hci_uart_send_frame()' checks 'HCI_UART_PROTO_READY' bit set, and if not - it fails. P...
```diff diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c index d2d6ba8d2f8b..b955dc96b483 100644 --- a/drivers/bluetooth/hci_ldisc.c +++ b/drivers/bluetooth/hci_ldisc.c @@ -707,12 +707,13 @@ static int hci_uart_set_proto(struct hci_uart *hu, int id) hu->proto = p; + set_bit(HCI_UART_PROT...
461159ece0586b6892d7ba4febae096aa2632ce4
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix code style warning
Problem Details: Output of checkpatch shows warning: drivers/bluetooth/bfusb.c:368: WARNING: braces {} are not necessary for single statement blocks Remove braces for single line statement. Signed-off-by: Jeremy Clifton <deaner92@yahoo.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
```diff diff --git a/drivers/bluetooth/bfusb.c b/drivers/bluetooth/bfusb.c index cab93935cc7f..0d6ad50da046 100644 --- a/drivers/bluetooth/bfusb.c +++ b/drivers/bluetooth/bfusb.c @@ -365,9 +365,8 @@ static void bfusb_rx_complete(struct urb *urb) buf += 3; } - if (count < len) { + if (count < len) bt_de...
4944be2f5ad8c74b93e4e272f3a0f1a136bbc438
Analyze and fix the following issue in the Linux kernel code: virtio_net: Allocate rss_hdr with devres
Problem Details: virtnet_probe() lacks the code to free rss_hdr in its error path. Allocate rss_hdr with devres so that it will be automatically freed. Fixes: 86a48a00efdf ("virtio_net: Support dynamic rss indirection table size") Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Acked-by: Jason Wang <jasowang@r...
```diff diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index e46241c6fdab..aac5a5184ba9 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -3642,7 +3642,7 @@ static int virtnet_set_queues(struct virtnet_info *vi, u16 queue_pairs) if (vi->has_rss && !netif_is_rxfh_configured(dev)...
97841341e302eac13d54eb5e968570b5626196a7
Analyze and fix the following issue in the Linux kernel code: virtio_net: Fix endian with virtio_net_ctrl_rss
Problem Details: Mark the fields of struct virtio_net_ctrl_rss as little endian as they are in struct virtio_net_rss_config, which it follows. Fixes: c7114b1249fa ("drivers/net/virtio_net: Added basic RSS support.") Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Acked-by: Jason Wang <jasowang@redhat.com> Revi...
```diff diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 34cec2b11b74..65e1ef77a1a9 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -368,15 +368,15 @@ struct receive_queue { */ #define VIRTIO_NET_RSS_MAX_KEY_SIZE 40 struct virtio_net_ctrl_rss { - u32 hash_types; - u...
c7629ccfa175e16bb44a60c469214e1a6051f63d
Analyze and fix the following issue in the Linux kernel code: Bluetooth: btusb: Add new VID/PID for WCN785x
Problem Details: Add VID 0489 & PID e10d for Qualcomm WCN785x USB Bluetooth chip. The information in /sys/kernel/debug/usb/devices about the Bluetooth device is listed as the below. T: Bus=01 Lev=01 Prnt=01 Port=03 Cnt=03 Dev#= 4 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vend...
```diff diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 5b7dec28de8b..53514708d4c9 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -376,6 +376,8 @@ static const struct usb_device_id quirks_table[] = { BTUSB_WIDEBAND_SPEECH }, { USB_DEVICE(0x0489, 0xe0f3),...
a76db26a96982857a306d3e9dbc7f44d5ae45d9d
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix duplicate checksum error messages in write path
Problem Details: Also, improve the message in prep_encoded_data() - it now prints good/bad checksums, and checksum type. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/io_write.c b/fs/bcachefs/io_write.c index 14c5c5c98d51..9613361a519b 100644 --- a/fs/bcachefs/io_write.c +++ b/fs/bcachefs/io_write.c @@ -434,12 +434,6 @@ void bch2_write_op_error(struct bch_write_op *op, u64 offset, const char *fmt, . printbuf_exit(&buf); } -static void bch2_write...
3ba0240a8789f8c059990b81c6f34c29769a5a49
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix silent short reads in data read retry path
Problem Details: __bch2_read, before calling __bch2_read_extent(), sets bvec_iter.bi_size to "the size we can read from the current extent" with a swap, and restores it to "the size for the total read" after the read_extent call with another swap. But we neglected to do the restore before the "if (ret) goto err;" - wh...
```diff diff --git a/fs/bcachefs/fs-io-buffered.c b/fs/bcachefs/fs-io-buffered.c index 5ab1c73c8d4c..a03e2c780cba 100644 --- a/fs/bcachefs/fs-io-buffered.c +++ b/fs/bcachefs/fs-io-buffered.c @@ -225,11 +225,11 @@ static void bchfs_read(struct btree_trans *trans, bch2_read_extent(trans, rbio, iter.pos, data_b...
660d1c6385b96c3985010589382c9c7849d4734c
Analyze and fix the following issue in the Linux kernel code: drm/i915/vrr: Refactor condition for computing vmax and LRR
Problem Details: LRR and Vmax can be computed only if VRR is supported and vrr.in_range is set. Currently we proceed with vrr timings only for VRR supporting panels and return otherwise. For using VRR TG with fix timings, need to continue even for panels that do not support VRR. To achieve this, refactor the condition...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c index c682c487eb25..e68c13ae21b3 100644 --- a/drivers/gpu/drm/i915/display/intel_vrr.c +++ b/drivers/gpu/drm/i915/display/intel_vrr.c @@ -365,14 +365,16 @@ intel_vrr_compute_config(struct intel_crtc_state *crtc_stat...
5af61dbd96275e184adcfe615507b0f04ed7b328
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix nonce inconsistency in bch2_write_prep_encoded_data()
Problem Details: If we're moving an extent that was partially overwritten, bch2_write_rechecksum() will trim it to the currenty live range. If we then also want to compress it, it'll be decrypted - but the nonce has been advanced for the overwritten start of the extent that we dropped, and we were using the nonce we c...
```diff diff --git a/fs/bcachefs/io_write.c b/fs/bcachefs/io_write.c index 29671075e3f1..14c5c5c98d51 100644 --- a/fs/bcachefs/io_write.c +++ b/fs/bcachefs/io_write.c @@ -839,7 +839,6 @@ static noinline int bch2_write_prep_encoded_data(struct bch_write_op *op, struct { struct bch_fs *c = op->c; struct bio *bio = &...
5e8df79497ce522170b5964d92c7f7df28dc1fa7
Analyze and fix the following issue in the Linux kernel code: net: au1000_eth: Mark au1000_ReleaseDB() static
Problem Details: This fixes the following build warning: ``` drivers/net/ethernet/amd/au1000_eth.c:574:6: warning: no previous prototype for 'au1000_ReleaseDB' [-Wmissing-prototypes] 574 | void au1000_ReleaseDB(struct au1000_private *aup, struct db_dest *pDB) | ^~~~~~~~~~~~~~~~ ``` Signed-off-by: Johan Ko...
```diff diff --git a/drivers/net/ethernet/amd/au1000_eth.c b/drivers/net/ethernet/amd/au1000_eth.c index 0671a066913b..9d35ac348ebe 100644 --- a/drivers/net/ethernet/amd/au1000_eth.c +++ b/drivers/net/ethernet/amd/au1000_eth.c @@ -571,7 +571,7 @@ static struct db_dest *au1000_GetFreeDB(struct au1000_private *aup) ret...
0032c99e83b9ce6d5995d65900aa4b6ffb501cce
Analyze and fix the following issue in the Linux kernel code: net: fix NULL pointer dereference in l3mdev_l3_rcv
Problem Details: When delete l3s ipvlan: ip link del link eth0 ipvlan1 type ipvlan mode l3s This may cause a null pointer dereference: Call trace: ip_rcv_finish+0x48/0xd0 ip_rcv+0x5c/0x100 __netif_receive_skb_one_core+0x64/0xb0 __netif_receive_skb+0x20/0x80 process_backlog+0xb4/0x204...
```diff diff --git a/drivers/net/ipvlan/ipvlan_l3s.c b/drivers/net/ipvlan/ipvlan_l3s.c index b4ef386bdb1b..7c017fe35522 100644 --- a/drivers/net/ipvlan/ipvlan_l3s.c +++ b/drivers/net/ipvlan/ipvlan_l3s.c @@ -226,5 +226,4 @@ void ipvlan_l3s_unregister(struct ipvl_port *port) dev->priv_flags &= ~IFF_L3MDEV_RX_HANDLER;...
d93a6caab5d7d9b5ce034d75b1e1e993338e3852
Analyze and fix the following issue in the Linux kernel code: ibmvnic: Use kernel helpers for hex dumps
Problem Details: Previously, when the driver was printing hex dumps, the buffer was cast to an 8 byte long and printed using string formatters. If the buffer size was not a multiple of 8 then a read buffer overflow was possible. Therefore, create a new ibmvnic function that loops over a buffer and calls hex_dump_to_bu...
```diff diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 0676fc547b6f..480606d1245e 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -4829,6 +4829,18 @@ static void vnic_add_client_data(struct ibmvnic_adapter *adapter, strscpy(vlcd->...
094ee6017ea09c11d6af187935a949df32803ce0
Analyze and fix the following issue in the Linux kernel code: bonding: check xdp prog when set bond mode
Problem Details: Following operations can trigger a warning[1]: ip netns add ns1 ip netns exec ns1 ip link add bond0 type bond mode balance-rr ip netns exec ns1 ip link set dev bond0 xdp obj af_xdp_kern.o sec xdp ip netns exec ns1 ip link set bond0 type bond mode broadcast ip netns del ns1 When de...
```diff diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index e45bba240cbc..4da5fcb7def4 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -322,9 +322,9 @@ static bool bond_sk_check(struct bonding *bond) } } -static bool bond_xdp_check(struct bondi...
9133607de37a4887c6f89ed937176a0a0c1ebb17
Analyze and fix the following issue in the Linux kernel code: exit: fix the usage of delay_group_leader->exit_code in do_notify_parent() and pidfs_exit()
Problem Details: Consider a process with a group leader L and a sub-thread T. L does sys_exit(1), then T does sys_exit_group(2). In this case wait_task_zombie(L) will notice SIGNAL_GROUP_EXIT and use L->signal->group_exit_code, this is correct. But, before that, do_notify_parent(L) called by release_task(T) will use ...
```diff diff --git a/kernel/exit.c b/kernel/exit.c index 5d1226fdfadc..1b51dc099f1e 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -268,6 +268,9 @@ repeat: leader = p->group_leader; if (leader != p && thread_group_empty(leader) && leader->exit_state == EXIT_ZOMBIE) { + /* for pidfs_exit() and do_notify_pare...
60031d9c3589c7983fd1deb4a4c0bebf0929890e
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: fix incorrect CE addresses
Problem Details: In the current ath12k implementation, the CE addresses CE_HOST_IE_ADDRESS and CE_HOST_IE_2_ADDRESS are incorrect. These values were inherited from ath11k, but ath12k does not currently use them. However, the Ath12k AHB support relies on these addresses. Therefore, correct the CE addresses for ath12k. ...
```diff diff --git a/drivers/net/wireless/ath/ath12k/ce.h b/drivers/net/wireless/ath/ath12k/ce.h index 1a14b9fb86b8..f85188af5de2 100644 --- a/drivers/net/wireless/ath/ath12k/ce.h +++ b/drivers/net/wireless/ath/ath12k/ce.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: BSD-3-Clause-Clear */ /* * Copyright (c) 2018-202...
0dd765fae295832934bf28e45dd5a355e0891ed4
Analyze and fix the following issue in the Linux kernel code: vmxnet3: unregister xdp rxq info in the reset path
Problem Details: vmxnet3 does not unregister xdp rxq info in the vmxnet3_reset_work() code path as vmxnet3_rq_destroy() is not invoked in this code path. So, we get below message with a backtrace. Missing unregister, handled but fix driver WARNING: CPU:48 PID: 500 at net/core/xdp.c:182 __xdp_rxq_info_reg+0x93/0xf0 Th...
```diff diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 6793fa09f9d1..3df6aabc7e33 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c @@ -2033,6 +2033,11 @@ vmxnet3_rq_cleanup(struct vmxnet3_rx_queue *rq, rq->comp_ring.gen = VMXNET3_INIT_G...
b709857ecbf511bb25603790ff9c3f12abe36559
Analyze and fix the following issue in the Linux kernel code: ipv6: fix _DEVADD() and _DEVUPD() macros
Problem Details: ip6_rcv_core() is using: __IP6_ADD_STATS(net, idev, IPSTATS_MIB_NOECTPKTS + (ipv6_get_dsfield(hdr) & INET_ECN_MASK), max_t(unsigned short, 1, skb_shinfo(skb)->gso_segs)); This is currently evaluating both expressions twice. Fix _DEVADD() and _DEVUPD() macros to evaluate their arguments on...
```diff diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 9614006f483c..2ccdf85f34f1 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h @@ -246,17 +246,20 @@ extern int sysctl_mld_qrv; #define _DEVADD(net, statname, mod, idev, field, val) \ ({ \ struct inet6_dev *_idev = (idev); \ + unsi...
2593f7e0dc93a898a84220b3fb180d86f1ca8c60
Analyze and fix the following issue in the Linux kernel code: firmware: cs_dsp: Ensure cs_dsp_load[_coeff]() returns 0 on success
Problem Details: Set ret = 0 on successful completion of the processing loop in cs_dsp_load() and cs_dsp_load_coeff() to ensure that the function returns 0 on success. All normal firmware files will have at least one data block, and processing this block will set ret == 0, from the result of either regmap_raw_write() ...
```diff diff --git a/drivers/firmware/cirrus/cs_dsp.c b/drivers/firmware/cirrus/cs_dsp.c index 42433c19eb30..560724ce21aa 100644 --- a/drivers/firmware/cirrus/cs_dsp.c +++ b/drivers/firmware/cirrus/cs_dsp.c @@ -1631,6 +1631,7 @@ static int cs_dsp_load(struct cs_dsp *dsp, const struct firmware *firmware, cs_dsp_debu...
bf6cb06c0e05ff6fb5bfab3e5d7c22e4617e23e0
Analyze and fix the following issue in the Linux kernel code: drm/xe/pf: Enable per-function engine activity stats
Problem Details: Enable per-function engine activity stats when VF's are enabled and disable when VF's are disabled v2: fix commit message remove reset stats from pf config (Michal) Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Signed-off-by: Riana Tauro <riana.tauro@intel.com> Reviewed-by: Umesh Nerlige Rama...
```diff diff --git a/drivers/gpu/drm/xe/xe_pci_sriov.c b/drivers/gpu/drm/xe/xe_pci_sriov.c index 09ee8a06fe2e..d69b6b2a3061 100644 --- a/drivers/gpu/drm/xe/xe_pci_sriov.c +++ b/drivers/gpu/drm/xe/xe_pci_sriov.c @@ -7,6 +7,7 @@ #include "xe_device.h" #include "xe_gt_sriov_pf_config.h" #include "xe_gt_sriov_pf_control...
8a4339fe2422a8080e45b76b4938827c807dcd52
Analyze and fix the following issue in the Linux kernel code: drm/xe/xe_pmu: Add PMU support for per-function engine activity stats
Problem Details: Add PMU support for per-function engine activity stats. per-function engine activity is enabled when VF's are enabled. If 2 VF's are enabled, then the applicable function values are 0 - PF engine activity 1 - VF1 engine activity 2 - VF2 engine activity This can be read from perf tool as shown below ...
```diff diff --git a/drivers/gpu/drm/xe/xe_pmu.c b/drivers/gpu/drm/xe/xe_pmu.c index f8f6ebb7c9c6..fde4222675fd 100644 --- a/drivers/gpu/drm/xe/xe_pmu.c +++ b/drivers/gpu/drm/xe/xe_pmu.c @@ -13,6 +13,7 @@ #include "xe_hw_engine.h" #include "xe_pm.h" #include "xe_pmu.h" +#include "xe_sriov_pf_helpers.h" /** * DO...
2de3f38fbf89d3cb96d1237aa7a10c0f6480f450
Analyze and fix the following issue in the Linux kernel code: drm/xe: Add support for per-function engine activity
Problem Details: Add support for function level engine activity stats. Engine activity stats are enabled when VF's are enabled v2: remove unnecessary initialization move offset to improve code readability (Umesh) remove global for function engine activity (Lucas) v3: fix commit message (Michal) v4: remove en...
```diff diff --git a/drivers/gpu/drm/xe/abi/guc_actions_abi.h b/drivers/gpu/drm/xe/abi/guc_actions_abi.h index ec516e838ee8..448afb86e05c 100644 --- a/drivers/gpu/drm/xe/abi/guc_actions_abi.h +++ b/drivers/gpu/drm/xe/abi/guc_actions_abi.h @@ -141,6 +141,7 @@ enum xe_guc_action { XE_GUC_ACTION_CLIENT_SOFT_RESET = 0x55...
406fad7698f5bf21ab6b5ca195bf4b9e0b3990ed
Analyze and fix the following issue in the Linux kernel code: cachefiles: Fix oops in vfs_mkdir from cachefiles_get_directory
Problem Details: Commit c54b386969a5 ("VFS: Change vfs_mkdir() to return the dentry.") changed cachefiles_get_directory, replacing "subdir" with a ERR_PTR from the result of cachefiles_inject_write_error, which is either 0 or some error code. This causes an oops when the resulting pointer is passed to vfs_mkdir. Use ...
```diff diff --git a/fs/cachefiles/namei.c b/fs/cachefiles/namei.c index 83a60126de0f..14d0cc894000 100644 --- a/fs/cachefiles/namei.c +++ b/fs/cachefiles/namei.c @@ -128,10 +128,11 @@ retry: ret = security_path_mkdir(&path, subdir, 0700); if (ret < 0) goto mkdir_error; - subdir = ERR_PTR(cachefiles_inject_w...
af7bb0d2ca459f15cb5ca604dab5d9af103643f0
Analyze and fix the following issue in the Linux kernel code: exec: fix the racy usage of fs_struct->in_exec
Problem Details: check_unsafe_exec() sets fs->in_exec under cred_guard_mutex, then execve() paths clear fs->in_exec lockless. This is fine if exec succeeds, but if it fails we have the following race: T1 sets fs->in_exec = 1, fails, drops cred_guard_mutex T2 sets fs->in_exec = 1 T1 clears fs->in_exec T2 continu...
```diff diff --git a/fs/exec.c b/fs/exec.c index f45859ad13ac..5d1c0d2dc403 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -1227,13 +1227,12 @@ int begin_new_exec(struct linux_binprm * bprm) */ bprm->point_of_no_return = true; - /* - * Make this the only thread in the thread group. - */ + /* Make this the only thre...
8661bb9c717a07b7636224339fe8818b65db6ddf
Analyze and fix the following issue in the Linux kernel code: selftests/pidfd: fixes syscall number defines
Problem Details: I had to spend some (a lot;) time to understand why pidfd_info_test (and more) fails with my patch under qemu on my machine ;) Until I applied the patch below. I think it is a bad idea to do the things like #ifndef __NR_clone3 #define __NR_clone3 -1 #endif because this can hide a problem. My work...
```diff diff --git a/tools/testing/selftests/clone3/clone3_selftests.h b/tools/testing/selftests/clone3/clone3_selftests.h index 3d2663fe50ba..eeca8005723f 100644 --- a/tools/testing/selftests/clone3/clone3_selftests.h +++ b/tools/testing/selftests/clone3/clone3_selftests.h @@ -16,7 +16,7 @@ #define ptr_to_u64(ptr) ((...
fede97b72b957b46260ca98fc924ba2b916e50d7
Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix scanline_offset for LNL+ and BMG+
Problem Details: Turns out LNL+ and BMG+ no longer have the weird extra scanline offset for HDMI outputs. Fix intel_crtc_scanline_offset() accordingly so that scanline evasion/etc. works correctly on HDMI outputs on these new platforms. Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_vblank.c b/drivers/gpu/drm/i915/display/intel_vblank.c index 4efd4f7d497a..7b240ce681a0 100644 --- a/drivers/gpu/drm/i915/display/intel_vblank.c +++ b/drivers/gpu/drm/i915/display/intel_vblank.c @@ -222,7 +222,9 @@ int intel_crtc_scanline_offset(const struct intel...
3a17f23f7c36bac3a3584aaf97d3e3e0b2790396
Analyze and fix the following issue in the Linux kernel code: dql: Fix dql->limit value when reset.
Problem Details: Executing dql_reset after setting a non-zero value for limit_min can lead to an unreasonable situation where dql->limit is less than dql->limit_min. For instance, after setting /sys/class/net/eth*/queues/tx-0/byte_queue_limits/limit_min, an ifconfig down/up operation might cause the ethernet driver to...
```diff diff --git a/lib/dynamic_queue_limits.c b/lib/dynamic_queue_limits.c index c1b7638a594a..f97a752e900a 100644 --- a/lib/dynamic_queue_limits.c +++ b/lib/dynamic_queue_limits.c @@ -190,7 +190,7 @@ EXPORT_SYMBOL(dql_completed); void dql_reset(struct dql *dql) { /* Reset all dynamic values */ - dql->limit = 0; ...
6aa63a4ec947f350d1a2f9f6aba8591a2455d192
Analyze and fix the following issue in the Linux kernel code: iommu: Sort out domain user data
Problem Details: When DMA/MSI cookies were made first-class citizens back in commit 46983fcd67ac ("iommu: Pull IOVA cookie management into the core"), there was no real need to further expose the two different cookie types. However, now that IOMMUFD wants to add a third type of MSI-mapping cookie, we do have a nicely c...
```diff diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c index 94263ed2c564..31a7b4b81656 100644 --- a/drivers/iommu/dma-iommu.c +++ b/drivers/iommu/dma-iommu.c @@ -42,11 +42,6 @@ struct iommu_dma_msi_page { phys_addr_t phys; }; -enum iommu_dma_cookie_type { - IOMMU_DMA_IOVA_COOKIE, - IOMMU_DMA_...
3f36781e57b37ad75c01f70e2e9a555efa3b03e5
Analyze and fix the following issue in the Linux kernel code: selftests/net: Add mixed select()+polling mode to TCP-AO tests
Problem Details: Currently, tcp_ao tests have two timeouts: TEST_RETRANSMIT_SEC and TEST_TIMEOUT_SEC [by default 1 and 5 seconds]. The first one, TEST_RETRANSMIT_SEC is used for operations that are expected to succeed in order for a test to pass. It is usually not consumed and exists only to avoid indefinite test run i...
```diff diff --git a/tools/testing/selftests/net/tcp_ao/connect-deny.c b/tools/testing/selftests/net/tcp_ao/connect-deny.c index 919e8d2b9134..93b61e9a36f1 100644 --- a/tools/testing/selftests/net/tcp_ao/connect-deny.c +++ b/tools/testing/selftests/net/tcp_ao/connect-deny.c @@ -4,6 +4,7 @@ #include "aolib.h" #defin...
55d657da8e50adab2847fbff965eeac72f429388
Analyze and fix the following issue in the Linux kernel code: drm/i915/dp_mst: Fix side-band message timeouts due to long PPS delays
Problem Details: The Panel Power Sequencer lock held on an eDP port (a) blocks a DP AUX transfer on another port (b), since the PPS lock is device global, thus shared by all ports. The PPS lock can be held on port (a) for a longer period due to the various PPS delays (panel/backlight on/off, power-cycle delays). This i...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux.c b/drivers/gpu/drm/i915/display/intel_dp_aux.c index ec27bbd70bcf..0496061203fb 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_aux.c +++ b/drivers/gpu/drm/i915/display/intel_dp_aux.c @@ -247,7 +247,7 @@ intel_dp_aux_xfer(struct intel_dp *intel_dp, u3...
a8bd38e04a05fef74fb7644ed389662e59a18cd7
Analyze and fix the following issue in the Linux kernel code: drm/ci: uprev mesa
Problem Details: LAVA was recently patched [1] with a fix on how parameters are parsed in `lava-test-case`, so we don't need to repeat quotes to send the arguments properly to it. Uprev mesa to fix this issue. [1] https://gitlab.com/lava/lava/-/commit/18c9cf79 Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com...
```diff diff --git a/drivers/gpu/drm/ci/build.sh b/drivers/gpu/drm/ci/build.sh index 19fe01257ab9..284873e94d8d 100644 --- a/drivers/gpu/drm/ci/build.sh +++ b/drivers/gpu/drm/ci/build.sh @@ -98,14 +98,14 @@ done make ${KERNEL_IMAGE_NAME} -mkdir -p /lava-files/ +mkdir -p /kernel/ for image in ${KERNEL_IMAGE_NAME};...
3a949fc08103c0ce3a1d0ef30459c7b3acc6a214
Analyze and fix the following issue in the Linux kernel code: ALSA: hda: tas2781-i2c: Remove unnecessary NULL check before release_firmware()
Problem Details: release_firmware() checks for NULL pointers internally. Remove unneeded NULL check for fmw here. Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Link: https://patch.msgid.link/20250325084939.801117-1-nichen@iscas.ac.cn Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c index 50c5e5f26589..9ed49b0dbe6b 100644 --- a/sound/pci/hda/tas2781_hda_i2c.c +++ b/sound/pci/hda/tas2781_hda_i2c.c @@ -753,8 +753,7 @@ static void tasdev_fw_ready(const struct firmware *fmw, void *context) out: mutex_unlock(&ta...
09e269f550f548a1249ba5282747fe67ba177608
Analyze and fix the following issue in the Linux kernel code: ALSA: hda: cs35l56: Remove unnecessary NULL check before release_firmware()
Problem Details: release_firmware() checks for NULL pointers internally. Remove unneeded NULL check for fmw here. Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Link: https://patch.msgid.link/20250325084639.801054-1-nichen@iscas.ac.cn Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/cs35l56_hda.c b/sound/pci/hda/cs35l56_hda.c index 4ef7878e8fd4..235d22049aa9 100644 --- a/sound/pci/hda/cs35l56_hda.c +++ b/sound/pci/hda/cs35l56_hda.c @@ -546,12 +546,10 @@ static void cs35l56_hda_release_firmware_files(const struct firmware *wmfw_firmw const struct firm...
61c39d8c83e2077f33e0a2c8980a76a7f323f0ce
Analyze and fix the following issue in the Linux kernel code: lockdep: Fix wait context check on softirq for PREEMPT_RT
Problem Details: Since: 0c1d7a2c2d32 ("lockdep: Remove softirq accounting on PREEMPT_RT.") the wait context test for mutex usage within "in softirq context" fails as it references @softirq_context: | wait context tests | -------------------------------------------------------------------------- ...
```diff diff --git a/kernel/softirq.c b/kernel/softirq.c index 4dae6ac2e83f..513b1945987c 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -126,6 +126,18 @@ static DEFINE_PER_CPU(struct softirq_ctrl, softirq_ctrl) = { .lock = INIT_LOCAL_LOCK(softirq_ctrl.lock), }; +#ifdef CONFIG_DEBUG_LOCK_ALLOC +static str...
70c716349a5c29ba1ada1f6945a68e93c4ab6afc
Analyze and fix the following issue in the Linux kernel code: drm/i915/dsi: convert parameter printing to drm_printer
Problem Details: The DSI VBT initialization debug logs a lot of parameters. Convert this to use struct drm_printer with a prefix. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://lore.kernel.org/r/50ff85e66c058a12b2fe0d0cba6a542f7cfa71cf.1742554320.git.jani.nikula@intel.com Signed-off-by: Jani ...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c index 7b2ffd14ae6e..802f210bfafe 100644 --- a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c +++ b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c @@ -695,54 +695,44 @@ void intel_dsi_vbt_exec_sequence(struct int...
0dd09e215a391805130338688586805fe8bf2b32
Analyze and fix the following issue in the Linux kernel code: x86/cacheinfo: Apply maintainer-tip coding style fixes
Problem Details: The x86/cacheinfo code has been heavily refactored and fleshed out at parent commits, where any necessary coding style fixes were also done in place. Apply Documentation/process/maintainer-tip.rst coding style fixes to the rest of the code, and align its assignment expressions for readability. Standa...
```diff diff --git a/arch/x86/kernel/cpu/cacheinfo.c b/arch/x86/kernel/cpu/cacheinfo.c index 71587570705f..cd48d34ac04b 100644 --- a/arch/x86/kernel/cpu/cacheinfo.c +++ b/arch/x86/kernel/cpu/cacheinfo.c @@ -1,11 +1,11 @@ // SPDX-License-Identifier: GPL-2.0 /* - * Routines to identify caches on Intel CPU. + * x86 CPU ...
cf8758205264707b4521163c0a37bf587c4425c4
Analyze and fix the following issue in the Linux kernel code: x86/cacheinfo: Use proper name for cacheinfo instances
Problem Details: The cacheinfo structure defined at <include/linux/cacheinfo.h> is a generic cache info object representation. Calling its instances at x86 cacheinfo.c "leaf" confuses it with a CPUID leaf -- especially that multiple CPUID calls are already sprinkled across that file. Most of such instances also have ...
```diff diff --git a/arch/x86/kernel/cpu/cacheinfo.c b/arch/x86/kernel/cpu/cacheinfo.c index 0fd4e9673665..be9be5e56b44 100644 --- a/arch/x86/kernel/cpu/cacheinfo.c +++ b/arch/x86/kernel/cpu/cacheinfo.c @@ -349,11 +349,10 @@ static int amd_get_l3_disable_slot(struct amd_northbridge *nb, unsigned slot) return -1; } ...
21e2a452dca34538db0731b45c113cfd31aa45e6
Analyze and fix the following issue in the Linux kernel code: x86/cacheinfo: Properly name amd_cpuid4()'s first parameter
Problem Details: amd_cpuid4()'s first parameter, "leaf", is not a CPUID leaf as the name implies. Rather, it's an index emulating CPUID(4)'s subleaf semantics; i.e. an ID for the cache object currently enumerated. Rename that parameter to "index". Apply minor coding style fixes to the rest of the function as well. ...
```diff diff --git a/arch/x86/kernel/cpu/cacheinfo.c b/arch/x86/kernel/cpu/cacheinfo.c index d0bfdb85b96a..0fd4e9673665 100644 --- a/arch/x86/kernel/cpu/cacheinfo.c +++ b/arch/x86/kernel/cpu/cacheinfo.c @@ -233,12 +233,10 @@ static const enum cache_type cache_type_map[] = { }; static void -amd_cpuid4(int leaf, unio...
116edfe173d0c59ec2aa87fb91f2f31d477b61b3
Analyze and fix the following issue in the Linux kernel code: tools/x86/kcpuid: Fix error handling
Problem Details: Error handling in kcpuid is unreliable. On malloc() failures, the code prints an error then just goes on. The error messages are also printed to standard output instead of standard error. Use err() and errx() from <err.h> to direct all error messages to standard error and automatically exit the prog...
```diff diff --git a/tools/arch/x86/kcpuid/kcpuid.c b/tools/arch/x86/kcpuid/kcpuid.c index 1b25c0a95d3f..40a9e59c2fd5 100644 --- a/tools/arch/x86/kcpuid/kcpuid.c +++ b/tools/arch/x86/kcpuid/kcpuid.c @@ -1,11 +1,12 @@ // SPDX-License-Identifier: GPL-2.0 #define _GNU_SOURCE -#include <stdio.h> +#include <err.h> +#inc...
24fe172b50b5749c315349e740e4a09e3a0165d5
Analyze and fix the following issue in the Linux kernel code: objtool: Fix up some outdated references to ENTRY/ENDPROC
Problem Details: ENTRY and ENDPROC were deprecated years ago and replaced with SYM_FUNC_{START,END}. Fix up a few outdated references in the objtool documentation and comments. Also fix a few typos. Suggested-by: Brendan Jackman <jackmanb@google.com> Suggested-by: Miroslav Benes <mbenes@suse.cz> Signed-off-by: Josh ...
```diff diff --git a/include/linux/linkage.h b/include/linux/linkage.h index 5c8865bb59d9..b11660b706c5 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h @@ -134,10 +134,6 @@ .size name, .-name #endif -/* If symbol 'name' is treated as a subroutine (gets called, and returns) - * then please use EN...
4fab2d7628dd38f3fa8a5e615199350ecaeb17a8
Analyze and fix the following issue in the Linux kernel code: objtool: Fix init_module() handling
Problem Details: If IBT is enabled and a module uses the deprecated init_module() magic function name rather than module_init(fn), its ENDBR will get removed, causing an IBT failure during module load. Objtool does print an obscure warning, but then does nothing to either correct it or return an error. Improve the us...
```diff diff --git a/tools/objtool/check.c b/tools/objtool/check.c index b2f6a7ff77b5..2f7aff1c367d 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -828,8 +828,11 @@ static int create_ibt_endbr_seal_sections(struct objtool_file *file) if (opts.module && sym && sym->type == STT_FUNC && insn->...
4759670bc3e670069c055c2b33174813099fea4f
Analyze and fix the following issue in the Linux kernel code: objtool: Fix CONFIG_OBJTOOL_WERROR for vmlinux.o
Problem Details: With (!X86_KERNEL_IBT && !LTO_CLANG && NOINSTR_VALIDATION), objtool runs on both translation units and vmlinux.o. With CONFIG_OBJTOOL_WERROR, the TUs get --Werror but vmlinux.o doesn't. Fix that. Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Li...
```diff diff --git a/scripts/Makefile.vmlinux_o b/scripts/Makefile.vmlinux_o index 0b6e2ebf60dc..f476f5605029 100644 --- a/scripts/Makefile.vmlinux_o +++ b/scripts/Makefile.vmlinux_o @@ -30,12 +30,20 @@ endif # objtool for vmlinux.o # --------------------------------------------------------------------------- # -# F...
1154bbd326de4453858cf78cf29420888b3ffd52
Analyze and fix the following issue in the Linux kernel code: objtool: Fix X86_FEATURE_SMAP alternative handling
Problem Details: For X86_FEATURE_SMAP alternatives which replace NOP with STAC or CLAC, uaccess validation skips the NOP branch to avoid following impossible code paths, e.g. where a STAC would be patched but a CLAC wouldn't. However, it's not safe to assume an X86_FEATURE_SMAP alternative is patching STAC/CLAC. Ther...
```diff diff --git a/arch/x86/include/asm/arch_hweight.h b/arch/x86/include/asm/arch_hweight.h index b5982b94bdba..cbc6157f0b4b 100644 --- a/arch/x86/include/asm/arch_hweight.h +++ b/arch/x86/include/asm/arch_hweight.h @@ -16,7 +16,8 @@ static __always_inline unsigned int __arch_hweight32(unsigned int w) { unsigned ...
eeff7ac61526a4a9c3916cf46885622078ad886b
Analyze and fix the following issue in the Linux kernel code: objtool: Warn when disabling unreachable warnings
Problem Details: Print a warning when disabling the unreachable warnings (due to a GCC bug). This will help determine if recent GCCs still have the issue and alert us if any other issues might be silently lurking behind the unreachable disablement. Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: In...
```diff diff --git a/tools/objtool/arch/x86/special.c b/tools/objtool/arch/x86/special.c index 9c1c9df09aaa..5f46d4e7f7f8 100644 --- a/tools/objtool/arch/x86/special.c +++ b/tools/objtool/arch/x86/special.c @@ -3,6 +3,7 @@ #include <objtool/special.h> #include <objtool/builtin.h> +#include <objtool/warn.h> #defi...
ef753d66051ca03bee1982ce047f9eaf90f81ab4
Analyze and fix the following issue in the Linux kernel code: objtool: Fix detection of consecutive jump tables on Clang 20
Problem Details: The jump table detection code assumes jump tables are in the same order as their corresponding indirect branches. That's apparently not always true with Clang 20. Fix that by changing how multiple jump tables are detected. In the first detection pass, mark the beginning of each jump table so the sec...
```diff diff --git a/tools/objtool/check.c b/tools/objtool/check.c index ca3435acc326..dae17ed4a5d7 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -1941,8 +1941,7 @@ __weak unsigned long arch_jump_table_sym_offset(struct reloc *reloc, struct relo return reloc->sym->offset + reloc_addend(reloc); } ...
3181424aeac2f6596534bf43021a10eae294a9b0
Analyze and fix the following issue in the Linux kernel code: x86/early_printk: Add support for MMIO-based UARTs
Problem Details: During the bring-up of an x86 board, the kernel was crashing before reaching the platform's console driver because of a bug in the firmware, leaving no trace of the boot progress. The only available method to debug the kernel boot process was via the platform's MMIO-based UART, as the board lacked an ...
```diff diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 866427da6add..649261e97628 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -1407,14 +1407,21 @@ earlyprintk=serial[,0x......
2c118f50d7fd4d9aefc4533a26f83338b2906b7a
Analyze and fix the following issue in the Linux kernel code: x86/dumpstack: Fix inaccurate unwinding from exception stacks due to misplaced assignment
Problem Details: Commit: 2e4be0d011f2 ("x86/show_trace_log_lvl: Ensure stack pointer is aligned, again") was intended to ensure alignment of the stack pointer; but it also moved the initialization of the "stack" variable down into the loop header. This was likely intended as a no-op cleanup, since the commit messa...
```diff diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c index 91639d1e4ec2..c6fefd4585f8 100644 --- a/arch/x86/kernel/dumpstack.c +++ b/arch/x86/kernel/dumpstack.c @@ -195,6 +195,7 @@ static void show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs, printk("%sCall Trace:\n", log_lv...
57e2428f8df8263275344566e02c277648a4b7f1
Analyze and fix the following issue in the Linux kernel code: x86/entry: Fix ORC unwinder for PUSH_REGS with save_ret=1
Problem Details: PUSH_REGS with save_ret=1 is used by interrupt entry helper functions that initially start with a UNWIND_HINT_FUNC ORC state. However, save_ret=1 means that we clobber the helper function's return address (and then later restore the return address further down on the stack); after that point, the only...
```diff diff --git a/arch/x86/entry/calling.h b/arch/x86/entry/calling.h index cb0911c5dc5d..d83236b96f22 100644 --- a/arch/x86/entry/calling.h +++ b/arch/x86/entry/calling.h @@ -70,6 +70,8 @@ For 32-bit we have the following conventions - kernel is built with pushq %rsi /* pt_regs->si */ movq 8(%rsp), %rsi /* tem...
ad9b861824ac55d81431815fffaaff5e981badc1
Analyze and fix the following issue in the Linux kernel code: x86/kbuild/64: Restrict clang versions that can use '-march=native'
Problem Details: There are two issues that can appear when building with clang and '-march=native'. The first issue is a compiler crash in the ipv6 stack with clang-18, such as when building allmodconfig. This was frequently reported on the LLVM issue tracker: # Link: https://github.com/llvm/llvm-project/issues?q=i...
```diff diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu index 87bede96e800..f928cf6e3252 100644 --- a/arch/x86/Kconfig.cpu +++ b/arch/x86/Kconfig.cpu @@ -248,6 +248,12 @@ endchoice config CC_HAS_MARCH_NATIVE # This flag might not be available in cross-compilers: def_bool $(cc-option, -march=native) + # LL...
2704ad556cf2b1f3a08526f4f12f9200cf7dcb03
Analyze and fix the following issue in the Linux kernel code: x86/Kconfig: Fix lists in X86_EXTENDED_PLATFORM help text
Problem Details: Support for STA2X11-based systems was removed in February in: dcbb01fbb7ae ("x86/pci: Remove old STA2x11 support") Intel MID for 32-bit platforms was removed from this list also in February in: ca5955dd5f08 ("x86/cpu: Document CONFIG_X86_INTEL_MID as 64-bit-only") Intel MID for 64-bit platforms...
```diff diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index ef48584c8889..ce46252af1e5 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -545,10 +545,8 @@ config X86_EXTENDED_PLATFORM 32-bit platforms (CONFIG_64BIT=n): Goldfish (mostly Android emulator) Intel CE media processor (CE4100) SoC - Intel ...
99bb1bd810eaf37e15ef757a30a815e774a2445b
Analyze and fix the following issue in the Linux kernel code: x86/Kconfig: Correct X86_X2APIC help text
Problem Details: Currently, it is not true that the kernel will panic with CONFIG_X86_X2APIC=n on systems that require it; it will try to disable the APIC and run without it to at least give the user a clear warning message. See the second variant of check_x2apic() in arch/x86/kernel/apic/apic.c . Also massage some ot...
```diff diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index e72cb7779038..ef48584c8889 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -471,14 +471,15 @@ config X86_X2APIC in 2019, but it can be disabled by the BIOS. It is also frequently emulated in virtual machines, even when the host CPU does not ...
2df0c02dab829dd89360d98a8a1abaa026ef5798
Analyze and fix the following issue in the Linux kernel code: x86 boot build: make git ignore stale 'tools' directory
Problem Details: We've had this before: when we remove infrastructure to generate files, the old stale build artifacts still remain in-tree. And when the infrastructure to generate them is gone, so is the gitignore file for those build artifacts. End result: git will see the old generated files, and people will mista...
```diff diff --git a/arch/x86/boot/.gitignore b/arch/x86/boot/.gitignore index 1189be057ebd..070ef534c915 100644 --- a/arch/x86/boot/.gitignore +++ b/arch/x86/boot/.gitignore @@ -12,3 +12,4 @@ fdimage mtools.conf image.iso hdimage +tools/ ```
3d6d238851dff53f49ff88d280ab9fc45eaec60a
Analyze and fix the following issue in the Linux kernel code: arch: xtensa: defconfig: Drop obsolete CONFIG_NET_CLS_TCINDEX
Problem Details: This option was removed from the Kconfig in commit 8c710f75256b ("net/sched: Retire tcindex classifier") but it was not removed from the defconfigs. Fixes: 8c710f75256b ("net/sched: Retire tcindex classifier") Signed-off-by: Johan Korsnes <johan.korsnes@gmail.com> Cc: Chris Zankel <chris@zankel.net> C...
```diff diff --git a/arch/xtensa/configs/common_defconfig b/arch/xtensa/configs/common_defconfig index fa9389869154..09e4a1d9d1f3 100644 --- a/arch/xtensa/configs/common_defconfig +++ b/arch/xtensa/configs/common_defconfig @@ -32,7 +32,6 @@ CONFIG_NET_SCH_TEQL=m CONFIG_NET_SCH_TBF=m CONFIG_NET_SCH_GRED=m CONFIG_NET_...
327e30123cafcb45c0fc5843da0367b90332999d
Analyze and fix the following issue in the Linux kernel code: drm/i915/xe2hpd: Identify the memory type for SKUs with GDDR + ECC
Problem Details: Some SKUs of Xe2_HPD platforms (such as BMG) have GDDR memory type with ECC enabled. We need to identify this scenario and add a new case in xelpdp_get_dram_info() to handle it. In addition, the derating value needs to be adjusted accordingly to compensate for the limited bandwidth. Bspec: 64602 Cc: M...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_bw.c b/drivers/gpu/drm/i915/display/intel_bw.c index dc7612658a9d..bb81efec08a0 100644 --- a/drivers/gpu/drm/i915/display/intel_bw.c +++ b/drivers/gpu/drm/i915/display/intel_bw.c @@ -250,6 +250,7 @@ static int icl_get_qgv_points(struct intel_display *display, ...
35d13f841a3d8159ef20d5e32a9ed3faa27875bc
Analyze and fix the following issue in the Linux kernel code: perf bpf-filter: Fix a parsing error with comma
Problem Details: The previous change to support cgroup filters introduced a bug that pathname can include commas. It confused the lexer to treat an item and the trailing comma as a single token. And it resulted in a parse error: $ sudo perf record -e cycles:P --filter 'period > 0, ip > 64' -- true perf_bpf_filte...
```diff diff --git a/tools/perf/tests/shell/record_bpf_filter.sh b/tools/perf/tests/shell/record_bpf_filter.sh index 1b58ccc1fd88..4d6c3c1b7fb9 100755 --- a/tools/perf/tests/shell/record_bpf_filter.sh +++ b/tools/perf/tests/shell/record_bpf_filter.sh @@ -89,7 +89,7 @@ test_bpf_filter_fail() { test_bpf_filter_group() {...
9daa05c84a27629577287897af4fcf19c238796a
Analyze and fix the following issue in the Linux kernel code: perf report: Fix a memory leak for perf_env on AMD
Problem Details: The env.pmu_mapping can be leaked when it reads data from a pipe on AMD. For a pipe data, it reads the header data including pmu_mapping from PERF_RECORD_HEADER_FEATURE runtime. But it's already set in: perf_session__new() __perf_session__new() evlist__init_trace_event_sample_raw() ...
```diff diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 1900965f8752..e3cdc3b7b4ab 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -2770,6 +2770,8 @@ static int process_pmu_mappings(struct feat_fd *ff, void *data __maybe_unused) free(name); pmu_num--; } + /* AMD ma...
1726ad035cb0c93cc5c3f2227ec71322ccd7c2f8
Analyze and fix the following issue in the Linux kernel code: net/mlx5: Start health poll after enable hca
Problem Details: The health poll mechanism performs periodic checks to detect firmware errors. One of the checks verifies the function is still enabled on firmware side, but the function is enabled only after enable_hca command completed. Start health poll after enable_hca command to avoid a race between function enabl...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c index ec956c4bcebd..7c3312d6aed9 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c @@ -1205,24 +1205,24 @@ static int mlx5_function_enable(s...
bdf549a7a4d738838d50833168881a0b6247446a
Analyze and fix the following issue in the Linux kernel code: net/mlx5: LAG, reload representors on LAG creation failure
Problem Details: When LAG creation fails, the driver reloads the RDMA devices. If RDMA representors are present, they should also be reloaded. This step was missed in the cited commit. Fixes: 598fe77df855 ("net/mlx5: Lag, Create shared FDB when in switchdev mode") Signed-off-by: Mark Bloch <mbloch@nvidia.com> Reviewed...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c b/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c index ed2ba272946b..6c9737c53734 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/lag/lag.c @@ -1052,6 +1052,10 @@ static void mlx5_do_bo...
5f2b28b79d2d1946ee36ad8b3dc0066f73c90481
Analyze and fix the following issue in the Linux kernel code: net: dsa: sja1105: fix kasan out-of-bounds warning in sja1105_table_delete_entry()
Problem Details: There are actually 2 problems: - deleting the last element doesn't require the memmove of elements [i + 1, end) over it. Actually, element i+1 is out of bounds. - The memmove itself should move size - i - 1 elements, because the last element is out of bounds. The out-of-bounds element still remain...
```diff diff --git a/drivers/net/dsa/sja1105/sja1105_static_config.c b/drivers/net/dsa/sja1105/sja1105_static_config.c index 3d790f8c6f4d..ffece8a400a6 100644 --- a/drivers/net/dsa/sja1105/sja1105_static_config.c +++ b/drivers/net/dsa/sja1105/sja1105_static_config.c @@ -1917,8 +1917,10 @@ int sja1105_table_delete_entry...
b6a177b559717b707087114e08537fd47a4d1aca
Analyze and fix the following issue in the Linux kernel code: net: dsa: sja1105: reject other RX filters than HWTSTAMP_FILTER_PTP_V2_L2_EVENT
Problem Details: This is all that we can support timestamping, so we shouldn't accept anything else. Also see sja1105_hwtstamp_get(). To avoid erroring out in an inconsistent state, operate on copies of priv->hwts_rx_en and priv->hwts_tx_en, and write them back when nothing else can fail anymore. Fixes: a602afd200f5 ...
```diff diff --git a/drivers/net/dsa/sja1105/sja1105_ptp.c b/drivers/net/dsa/sja1105/sja1105_ptp.c index a1f4ca6ad888..08b45fdd1d24 100644 --- a/drivers/net/dsa/sja1105/sja1105_ptp.c +++ b/drivers/net/dsa/sja1105/sja1105_ptp.c @@ -61,17 +61,21 @@ enum sja1105_ptp_clk_mode { int sja1105_hwtstamp_set(struct dsa_switch *...
00eb88752f48615ae7b4c1df6f9271cdd62c1d95
Analyze and fix the following issue in the Linux kernel code: net: dsa: sja1105: fix displaced ethtool statistics counters
Problem Details: Port counters with no name (aka sja1105_port_counters[__SJA1105_COUNTER_UNUSED]) are skipped when reporting sja1105_get_sset_count(), but are not skipped during sja1105_get_strings() and sja1105_get_ethtool_stats(). As a consequence, the first reported counter has an empty name and a bogus value (read...
```diff diff --git a/drivers/net/dsa/sja1105/sja1105_ethtool.c b/drivers/net/dsa/sja1105/sja1105_ethtool.c index 2ea64b1d026d..84d7d3f66bd0 100644 --- a/drivers/net/dsa/sja1105/sja1105_ethtool.c +++ b/drivers/net/dsa/sja1105/sja1105_ethtool.c @@ -571,6 +571,9 @@ void sja1105_get_ethtool_stats(struct dsa_switch *ds, int...
4af9939a4977e05ccaaa645848f6208e82e06c61
Analyze and fix the following issue in the Linux kernel code: mlxsw: spectrum_acl_bloom_filter: Workaround for some LLVM versions
Problem Details: This is a workaround to mitigate a compiler anomaly. During LLVM toolchain compilation of this driver on s390x architecture, an unreasonable __write_overflow_field warning occurs. Contextually, chunk_index is restricted to 0, 1 or 2. By expanding these possibilities, the compile warning is suppressed...
```diff diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_bloom_filter.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_bloom_filter.c index a54eedb69a3f..067f0055a55a 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_bloom_filter.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_bloo...
52fdc41c3278c981066a461d03d5477ebfcf270c
Analyze and fix the following issue in the Linux kernel code: net: dsa: mv88e6xxx: fix internal PHYs for 6320 family
Problem Details: Fix internal PHYs definition for the 6320 family, which has only 2 internal PHYs (on ports 3 and 4). Fixes: bc3931557d1d ("net: dsa: mv88e6xxx: Add number of internal PHYs") Signed-off-by: Marek Behún <kabel@kernel.org> Cc: <stable@vger.kernel.org> # 6.6.x Reviewed-by: Andrew Lunn <andrew@lunn.ch> Lin...
```diff diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 74b8bae226e4..88f479dc328c 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -6242,7 +6242,8 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = { .num_databases = 4096, .num_...
1428a6109b20e356188c3fb027bdb7998cc2fb98
Analyze and fix the following issue in the Linux kernel code: net: dsa: mv88e6xxx: enable STU methods for 6320 family
Problem Details: Commit c050f5e91b47 ("net: dsa: mv88e6xxx: Fill in STU support for all supported chips") introduced STU methods, but did not add them to the 6320 family. Fix it. Fixes: c050f5e91b47 ("net: dsa: mv88e6xxx: Fill in STU support for all supported chips") Signed-off-by: Marek Behún <kabel@kernel.org> Revie...
```diff diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index f886a69d7a3c..74b8bae226e4 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -5172,6 +5172,8 @@ static const struct mv88e6xxx_ops mv88e6320_ops = { .reset = mv88e6352_g1_reset, .vtu_g...
a2ef58e2c4aea4de166fc9832eb2b621e88c98d5
Analyze and fix the following issue in the Linux kernel code: net: dsa: mv88e6xxx: enable .port_set_policy() for 6320 family
Problem Details: Commit f3a2cd326e44 ("net: dsa: mv88e6xxx: introduce .port_set_policy") did not add the .port_set_policy() method for the 6320 family. Fix it. Fixes: f3a2cd326e44 ("net: dsa: mv88e6xxx: introduce .port_set_policy") Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch>...
```diff diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 3cddc8f084b3..f886a69d7a3c 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -5145,6 +5145,7 @@ static const struct mv88e6xxx_ops mv88e6320_ops = { .port_set_rgmii_delay = mv88e6320_por...