id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
a0a8306c823986c43ea58be13e8b366999a93cb2
Analyze and fix the following issue in the Linux kernel code: m68k: coldfire: Use proper clock rate for timers
Problem Details: The DMA and PIT timers are clocked at fsys/2. Fix it. While at it, fix the comment naming for DMA timers (duplicated tmr.2). Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org> Signed-off-by: Greg Ungerer <gerg@kernel.org>
```diff diff --git a/arch/m68k/coldfire/m5441x.c b/arch/m68k/coldfire/m5441x.c index 405e9d5c832c..7a25cfc7ac07 100644 --- a/arch/m68k/coldfire/m5441x.c +++ b/arch/m68k/coldfire/m5441x.c @@ -33,14 +33,14 @@ DEFINE_CLK(0, "mcfuart.0", 24, MCF_BUSCLK); DEFINE_CLK(0, "mcfuart.1", 25, MCF_BUSCLK); DEFINE_CLK(0, "mcfuart....
0d2c022ffa7ccbd5bed5b18eefbda7ef2df4f81f
Analyze and fix the following issue in the Linux kernel code: i3c: fix kdoc parameter description for module_i3c_i2c_driver()
Problem Details: A typo mentioned I3C when it should have been I2C. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20241219220338.10315-1-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni <alexandr...
```diff diff --git a/include/linux/i3c/device.h b/include/linux/i3c/device.h index 0a8a44ac2f02..b674f64d0822 100644 --- a/include/linux/i3c/device.h +++ b/include/linux/i3c/device.h @@ -283,7 +283,7 @@ static inline void i3c_i2c_driver_unregister(struct i3c_driver *i3cdrv, * module_i3c_i2c_driver() - Register a modu...
b75439c945b94dd8a2b645355bdb56f948052601
Analyze and fix the following issue in the Linux kernel code: i3c: dw: Fix use-after-free in dw_i3c_master driver due to race condition
Problem Details: In dw_i3c_common_probe, &master->hj_work is bound with dw_i3c_hj_work. And dw_i3c_master_irq_handler can call dw_i3c_master_irq_handle_ibis function to start the work. If we remove the module which will call dw_i3c_common_remove to make cleanup, it will free master->base through i3c_master_unregister ...
```diff diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c index 5b5c2e4bdc51..f1c564b4801e 100644 --- a/drivers/i3c/master/dw-i3c-master.c +++ b/drivers/i3c/master/dw-i3c-master.c @@ -1647,6 +1647,7 @@ EXPORT_SYMBOL_GPL(dw_i3c_common_probe); void dw_i3c_common_remove(struct dw_i3c_...
d4a95adeabc6b5a39405e49c6d5ed14dd83682c4
Analyze and fix the following issue in the Linux kernel code: nvme: Add error path for xa_store in nvme_init_effects
Problem Details: The xa_store() may fail due to memory allocation failure because there is no guarantee that the index NVME_CSI_NVM is already used. This fix introduces a new function to handle the error path. Fixes: cc115cbe12d9 ("nvme: always initialize known command effects") Signed-off-by: Keisuke Nishimura <keisu...
```diff diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 4bdd5144af7c..2a0555856795 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -3175,6 +3175,25 @@ free_data: return ret; } +static int nvme_init_effects_log(struct nvme_ctrl *ctrl, + u8 csi, struct nvme_effects_log...
e4a0a3058de85bc623f1ba90eec68f239d0a11b2
Analyze and fix the following issue in the Linux kernel code: nvme-pci: fix comment typo
Problem Details: envent -> event. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Signed-off-by: Keith Busch <kbusch@kernel.org>
```diff diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 57e8e32c4529..c3bfbe11ee57 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -372,7 +372,7 @@ static bool nvme_dbbuf_update_and_check_event(u16 value, __le32 *dbbuf_db, /* * Ensure that the doorbell is updated before...
6e5773d52f4a2d9c80692245f295069260cff6fc
Analyze and fix the following issue in the Linux kernel code: of/address: Fix WARN when attempting translating non-translatable addresses
Problem Details: The recently added WARN() for deprecated #address-cells and #size-cells triggered a WARN when of_platform_populate() (which calls of_address_to_resource()) is used on nodes with non-translatable addresses. This case is expected to return an error. Rework the bus matching to allow no match and make the...
```diff diff --git a/drivers/of/address.c b/drivers/of/address.c index c1f1c810e810..8770004d9b08 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c @@ -340,6 +340,15 @@ static int of_bus_default_flags_match(struct device_node *np) return of_property_present(np, "#address-cells") && (of_bus_n_addr_cells(np)...
c8571eab11131cce6dcce76b3345c1524e074071
Analyze and fix the following issue in the Linux kernel code: hwmon: Fix help text for aspeed-g6-pwm-tach
Problem Details: The help text has the wrong module name mentioned, and the capitalisation of the title is inconsistent. Fixes: 7e1449cd15d1 ("hwmon: (aspeed-g6-pwm-tacho): Support for ASPEED g6 PWM/Fan tach") Signed-off-by: Joel Stanley <joel@jms.id.au> Link: https://lore.kernel.org/r/20250110114737.64035-1-joel@jms....
```diff diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig index 86897b4d105f..760c1a1cf30c 100644 --- a/drivers/hwmon/Kconfig +++ b/drivers/hwmon/Kconfig @@ -413,7 +413,7 @@ config SENSORS_ASPEED will be called aspeed_pwm_tacho. config SENSORS_ASPEED_G6 - tristate "ASPEED g6 PWM and Fan tach driver" + t...
012b8276f08a67b9f2e2fd0f35363ae4a75e5267
Analyze and fix the following issue in the Linux kernel code: iio: dac: ad3552r-hs: clear reset status flag
Problem Details: Clear reset status flag, to keep error status register clean after reset (ad3552r manual, rev B table 38). Reset error flag was left to 1, so debugging registers, the "Error Status Register" was dirty (0x01). It is important to clear this bit, so if there is any reset event over normal working mode, i...
```diff diff --git a/drivers/iio/dac/ad3552r-hs.c b/drivers/iio/dac/ad3552r-hs.c index 216c634f3eaf..8974df625670 100644 --- a/drivers/iio/dac/ad3552r-hs.c +++ b/drivers/iio/dac/ad3552r-hs.c @@ -329,6 +329,12 @@ static int ad3552r_hs_setup(struct ad3552r_hs_state *st) dev_info(st->dev, "Chip ID error. Expected 0x%x,...
1e758b613212b6964518a67939535910b5aee831
Analyze and fix the following issue in the Linux kernel code: iio: dac: ad3552r-common: fix ad3541/2r ranges
Problem Details: Fix ad3541/2r voltage ranges to be as per ad3542r datasheet, rev. C, table 38 (page 57). The wrong ad354xr ranges was generating erroneous Vpp output. In more details: - fix wrong number of ranges, they are 5 ranges, not 6, - remove non-existent 0-3V range, - adjust order, since ad3552r_find_range() ...
```diff diff --git a/drivers/iio/dac/ad3552r-common.c b/drivers/iio/dac/ad3552r-common.c index 0f495df2e5ce..03e0864f5084 100644 --- a/drivers/iio/dac/ad3552r-common.c +++ b/drivers/iio/dac/ad3552r-common.c @@ -22,11 +22,10 @@ EXPORT_SYMBOL_NS_GPL(ad3552r_ch_ranges, "IIO_AD3552R"); const s32 ad3542r_ch_ranges[AD3542...
20eb1fae4145bc45717aa8a6d05fcd6a64ed856a
Analyze and fix the following issue in the Linux kernel code: iio: chemical: bme680: Fix uninitialized variable in __bme680_read_raw()
Problem Details: The bme680_read_temp() function takes a pointer to s16 but we're passing an int pointer to it. This will not work on big endian systems and it also means that the other 16 bits are uninitialized. Pass an s16 type variable. Fixes: f51171ce2236 ("iio: chemical: bme680: Add SCALE and RAW channels") Sig...
```diff diff --git a/drivers/iio/chemical/bme680_core.c b/drivers/iio/chemical/bme680_core.c index d12270409c8a..a2949daf9467 100644 --- a/drivers/iio/chemical/bme680_core.c +++ b/drivers/iio/chemical/bme680_core.c @@ -874,11 +874,11 @@ static int bme680_read_raw(struct iio_dev *indio_dev, case IIO_CHAN_INFO_RAW: ...
a665e3bc88081dd65642d83fc22a1abdb6a901bc
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: coresight: Give TRBE enabled state to KVM
Problem Details: Currently in nVHE, KVM has to check if TRBE is enabled on every guest switch even if it was never used. Because it's a debug feature and is more likely to not be used than used, give KVM the TRBE buffer status to allow a much simpler and faster do-nothing path in the hyp. Protected mode now disables t...
```diff diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h index e7c740c99ee3..fec53d84e990 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h @@ -614,6 +614,8 @@ struct kvm_host_data { #define KVM_HOST_DATA_FLAG_HAS_TRBE 1 #define KVM_HOST_DATA_FL...
fb2fcfbe5eef9ae26b0425978435ae1308951e51
Analyze and fix the following issue in the Linux kernel code: wifi: rtw88: sdio: Fix disconnection after beacon loss
Problem Details: This is the equivalent of commit 28818b4d871b ("wifi: rtw88: usb: Fix disconnection after beacon loss") for SDIO chips. Tested on Pinephone (RTL8723CS), random disconnections became rare, instead of a frequent nuisance. Cc: stable@vger.kernel.org Signed-off-by: Fiona Klute <fiona.klute@gmx.de> Tested-...
```diff diff --git a/drivers/net/wireless/realtek/rtw88/sdio.c b/drivers/net/wireless/realtek/rtw88/sdio.c index 799230eb5f16..e024061bdbf7 100644 --- a/drivers/net/wireless/realtek/rtw88/sdio.c +++ b/drivers/net/wireless/realtek/rtw88/sdio.c @@ -1192,6 +1192,8 @@ static void rtw_sdio_indicate_tx_status(struct rtw_dev ...
a806a8160a0fcaff368bb510c8a52eff37faf727
Analyze and fix the following issue in the Linux kernel code: wifi: rtw88: 8703b: Fix RX/TX issues
Problem Details: Fix 3 typos in 8703b driver. 2 typos in calibration routines are not fatal and do not seem to have any impact, just fix them to match vendor driver. However the last one in rtw8703b_set_channel_bb() clears too many bits in REG_OFDM0_TX_PSD_NOISE, causing TX and RX issues (neither rate goes above MCS0-...
```diff diff --git a/drivers/net/wireless/realtek/rtw88/rtw8703b.c b/drivers/net/wireless/realtek/rtw88/rtw8703b.c index a19b94d022ee..1d232adbdd7e 100644 --- a/drivers/net/wireless/realtek/rtw88/rtw8703b.c +++ b/drivers/net/wireless/realtek/rtw88/rtw8703b.c @@ -903,7 +903,7 @@ static void rtw8703b_set_channel_bb(struc...
5b1b9545262b5126a3c2776e7e64ff29765cbe6e
Analyze and fix the following issue in the Linux kernel code: wifi: rtw88: Add USB PHY configuration
Problem Details: Add some extra configuration for USB devices. Currently only RTL8822BU version (cut) D needs this. The new code makes use of the existing usb3_param_8822b array from rtw8822b.c. A user reported that TP-Link Archer T3U in USB 3 mode was randomly disconnecting from USB: [ 26.036502] usb 2-2: new SuperS...
```diff diff --git a/drivers/net/wireless/realtek/rtw88/reg.h b/drivers/net/wireless/realtek/rtw88/reg.h index e4d506cf9c33..95a39ae74cd3 100644 --- a/drivers/net/wireless/realtek/rtw88/reg.h +++ b/drivers/net/wireless/realtek/rtw88/reg.h @@ -871,7 +871,17 @@ #define REG_USB_MOD 0xf008 #define REG_USB3_RXITV 0xf050...
ba4bb0402c60e945c4c396c51f0acac3c3e3ea5c
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: fix race between cancel_hw_scan and hw_scan completion
Problem Details: The rtwdev->scanning flag isn't protected by mutex originally, so cancel_hw_scan can pass the condition, but suddenly hw_scan completion unset the flag and calls ieee80211_scan_completed() that will free local->hw_scan_req. Then, cancel_hw_scan raises null-ptr-deref and use-after-free. Fix it by moving...
```diff diff --git a/drivers/net/wireless/realtek/rtw89/mac80211.c b/drivers/net/wireless/realtek/rtw89/mac80211.c index 793db52ad60a..b3669e0074df 100644 --- a/drivers/net/wireless/realtek/rtw89/mac80211.c +++ b/drivers/net/wireless/realtek/rtw89/mac80211.c @@ -1285,11 +1285,11 @@ static void rtw89_ops_cancel_hw_scan(...
35642ba31dc4a1816a20191e90156a9e329beb10
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: mcc: consider time limits not divisible by 1024
Problem Details: For each MCC role, time limits, including max_tob_us, max_toa_us, and mac_dur_us, are calculated if there are NoA attributes. The relation between these time limits is "max_dur_us = max_tob_us + max_toa_us". Then, the unit is converted from us to TU. However, originally, each time limit was divided by ...
```diff diff --git a/drivers/net/wireless/realtek/rtw89/chan.c b/drivers/net/wireless/realtek/rtw89/chan.c index c06d305519df..4df4e04c3e67 100644 --- a/drivers/net/wireless/realtek/rtw89/chan.c +++ b/drivers/net/wireless/realtek/rtw89/chan.c @@ -802,7 +802,7 @@ fill: mcc_role->limit.max_toa = max_toa_us / 1024; ...
6ab452d458fd060644ce62c604baa2fe444a6822
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: pci: treat first receiving part as first segment for 8922AE
Problem Details: For early chips, the RX BD info contains FS/LS bits for first/last segments of a receiving packet. For 8922AE, the FS bit should be ignored, or it may throw warning: rtw89_8922ae 0000:1a:00.0: skb should not be ready before first segment start To have compatible logic, FS determined by what pending...
```diff diff --git a/drivers/net/wireless/realtek/rtw89/pci.c b/drivers/net/wireless/realtek/rtw89/pci.c index 516160147191..3b3b12fe4136 100644 --- a/drivers/net/wireless/realtek/rtw89/pci.c +++ b/drivers/net/wireless/realtek/rtw89/pci.c @@ -321,10 +321,11 @@ static u32 rtw89_pci_get_rx_skb_idx(struct rtw89_dev *rtwde...
2f7667675df1b40b73ecc53b4b8c3189b1e5f2c1
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: avoid to init mgnt_entry list twice when WoWLAN failed
Problem Details: If WoWLAN failed in resume flow, the rtw89_ops_add_interface() triggered without removing the interface first. Then the mgnt_entry list init again, causing the list_empty() check in rtw89_chanctx_ops_assign_vif() useless, and list_add_tail() again. Therefore, we have added a check to prevent double add...
```diff diff --git a/drivers/net/wireless/realtek/rtw89/mac80211.c b/drivers/net/wireless/realtek/rtw89/mac80211.c index 5eac0b524060..793db52ad60a 100644 --- a/drivers/net/wireless/realtek/rtw89/mac80211.c +++ b/drivers/net/wireless/realtek/rtw89/mac80211.c @@ -189,10 +189,10 @@ static int rtw89_ops_add_interface(stru...
b2658bf4d7f2f2e37ae9d2463ecc40618f587834
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: correct header conversion rule for MLO only
Problem Details: Header conversion should only be used with MLO connections. Otherwise P2P connection fails due to wrong probe responses sent. Fix it accordingly. Fixes: b8499664fca9 ("wifi: rtw89: Add header conversion for MLO connections") Signed-off-by: Po-Hao Huang <phhuang@realtek.com> Signed-off-by: Ping-Ke Shih...
```diff diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c index bb4621d38658..74bf590ad88c 100644 --- a/drivers/net/wireless/realtek/rtw89/core.c +++ b/drivers/net/wireless/realtek/rtw89/core.c @@ -980,6 +980,11 @@ rtw89_core_tx_update_desc_info(struct rtw89_dev *rtwdev,...
e4790b3e314a4814f1680a5dc552031fb199b878
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: chan: fix soft lockup in rtw89_entity_recalc_mgnt_roles()
Problem Details: During rtw89_entity_recalc_mgnt_roles(), there is a normalizing process which will re-order the list if an entry with target pattern is found. And once one is found, should have aborted the list_for_each_entry. But, `break` just aborted the inner for-loop. The outer list_for_each_entry still continues....
```diff diff --git a/drivers/net/wireless/realtek/rtw89/chan.c b/drivers/net/wireless/realtek/rtw89/chan.c index abc78716596d..c06d305519df 100644 --- a/drivers/net/wireless/realtek/rtw89/chan.c +++ b/drivers/net/wireless/realtek/rtw89/chan.c @@ -391,11 +391,12 @@ static void rtw89_entity_recalc_mgnt_roles(struct rtw89...
e47f0a5898540eb19b953708707887d4b3020645
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: fix proceeding MCC with wrong scanning state after sequence changes
Problem Details: When starting/proceeding MCC, it will abort an ongoing hw scan process. In the proceeding cases, it unexpectedly tries to abort a non-exist hw scan process. Then, a trace shown at the bottom will happen. This problem is caused by a previous commit which changed some call sequence inside rtw89_hw_scan_c...
```diff diff --git a/drivers/net/wireless/realtek/rtw89/chan.c b/drivers/net/wireless/realtek/rtw89/chan.c index fb9449930c40..abc78716596d 100644 --- a/drivers/net/wireless/realtek/rtw89/chan.c +++ b/drivers/net/wireless/realtek/rtw89/chan.c @@ -2530,7 +2530,25 @@ void rtw89_chanctx_pause(struct rtw89_dev *rtwdev, h...
7d0da8f862340c5f42f0062b8560b8d0971a6ac4
Analyze and fix the following issue in the Linux kernel code: net: airoha: Fix channel configuration for ETS Qdisc
Problem Details: Limit ETS QoS channel to AIROHA_NUM_QOS_CHANNELS in airoha_tc_setup_qdisc_ets() in order to align the configured channel to the value set in airoha_dev_select_queue(). Fixes: 20bf7d07c956 ("net: airoha: Add sched ETS offload support") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Reviewed-by: M...
```diff diff --git a/drivers/net/ethernet/mediatek/airoha_eth.c b/drivers/net/ethernet/mediatek/airoha_eth.c index b9f1c42f0a40..a30c417d66f2 100644 --- a/drivers/net/ethernet/mediatek/airoha_eth.c +++ b/drivers/net/ethernet/mediatek/airoha_eth.c @@ -2840,11 +2840,14 @@ static int airoha_qdma_get_tx_ets_stats(struct ai...
594c82329eef335ad90f5276ae0d2dff4d6d2668
Analyze and fix the following issue in the Linux kernel code: usb: host: xhci-plat: Assign shared_hcd->rsrc_start
Problem Details: When inserting a USB device, examining hcd->rsrc_start can be helpful in identifying which hcd is mounted, as the physical address represented here is typically unique. The following code snippet demonstrates this: struct usb_hcd *hcd = bus_to_hcd(udev->bus); unsigned long long usb_hcd_addr = (uns...
```diff diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index e6c9006bd568..457e839b9b53 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -329,6 +329,8 @@ int xhci_plat_probe(struct platform_device *pdev, struct device *sysdev, const s usb3_hcd->can_do_streams ...
7d3934884babcfb1252c4296e0060c7a0749a429
Analyze and fix the following issue in the Linux kernel code: usb: dwc3: omap: Fix devm_regulator_get_optional() error handling
Problem Details: Commit 533561a8aad5 ("usb: dwc3: omap: Use devm_regulator_get_optional()") assumed NULL was returned, but devm_regulator_get_optional() returns -ENODEV rather than NULL like other *_get_optional() functions. Fixes: 533561a8aad5 ("usb: dwc3: omap: Use devm_regulator_get_optional()") Signed-off-by: Rob ...
```diff diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index 9b1d10ac33c1..fe74d11bb629 100644 --- a/drivers/usb/dwc3/dwc3-omap.c +++ b/drivers/usb/dwc3/dwc3-omap.c @@ -484,8 +484,11 @@ static int dwc3_omap_probe(struct platform_device *pdev) return PTR_ERR(base); vbus_reg = devm_regula...
a266462b937beba065e934a563efe13dd246a164
Analyze and fix the following issue in the Linux kernel code: usb: dwc3-am62: Fix an OF node leak in phy_syscon_pll_refclk()
Problem Details: phy_syscon_pll_refclk() leaks an OF node obtained by of_parse_phandle_with_fixed_args(), thus add an of_node_put() call. Cc: stable <stable@kernel.org> Fixes: e8784c0aec03 ("drivers: usb: dwc3: Add AM62 USB wrapper driver") Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Acked-by: Thinh Nguyen ...
```diff diff --git a/drivers/usb/dwc3/dwc3-am62.c b/drivers/usb/dwc3/dwc3-am62.c index a740d3d70e87..2ced686e012e 100644 --- a/drivers/usb/dwc3/dwc3-am62.c +++ b/drivers/usb/dwc3/dwc3-am62.c @@ -170,6 +170,7 @@ static int phy_syscon_pll_refclk(struct dwc3_am62 *am62) if (ret) return ret; + of_node_put(args.np); ...
e3a9bd247cddfb6fa0c29c2361f70b76c359eaa0
Analyze and fix the following issue in the Linux kernel code: usb: dwc3: Skip resume if pm_runtime_set_active() fails
Problem Details: When the system begins to enter suspend mode, dwc3_suspend() is called by PM suspend. There is a problem that if someone interrupt the system suspend process between dwc3_suspend() and pm_suspend() of its parent device, PM suspend will be canceled and attempt to resume suspended devices so that dwc3_re...
```diff diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index c22b8678e02e..7578c5133568 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -2609,12 +2609,15 @@ static int dwc3_resume(struct device *dev) pinctrl_pm_select_default_state(dev); pm_runtime_disable(dev); - pm_runtime_...
bc7584e009c39375294794f7ca751a6b2622c425
Analyze and fix the following issue in the Linux kernel code: mips: fix shmctl/semctl/msgctl syscall for o32
Problem Details: The commit 275f22148e87 ("ipc: rename old-style shmctl/semctl/msgctl syscalls") switched various architectures to use sys_old_*ctl() with ipc_parse_version, including mips n32/n64. However, for mips o32, commit 0d6040d46817 ("arch: add split IPC system calls where needed") added separate IPC syscalls w...
```diff diff --git a/arch/mips/kernel/syscalls/syscall_o32.tbl b/arch/mips/kernel/syscalls/syscall_o32.tbl index 349b8aad1159..e8a57c206758 100644 --- a/arch/mips/kernel/syscalls/syscall_o32.tbl +++ b/arch/mips/kernel/syscalls/syscall_o32.tbl @@ -382,15 +382,15 @@ 368 o32 io_pgetevents sys_io_pgetevents_time32 compa...
42a39e4aa59a10aa4afdc14194f3ee63d2db94e1
Analyze and fix the following issue in the Linux kernel code: mips/math-emu: fix emulation of the prefx instruction
Problem Details: Currently, installation of Debian 12.8 for mipsel fails on machines without an FPU [1]. This is caused by the fact that zstd (which is used for initramfs compression) executes the prefx instruction, which is not emulated properly by the kernel. The prefx (Prefetch Indexed) instruction fetches data fro...
```diff diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c index 265bc57819df..c89e70df43d8 100644 --- a/arch/mips/math-emu/cp1emu.c +++ b/arch/mips/math-emu/cp1emu.c @@ -1660,7 +1660,7 @@ static int fpux_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx, break; } - case 0x3: + case 0x7: ...
bd2212d658d7659b9d83c7e2f3a06789d4db1e90
Analyze and fix the following issue in the Linux kernel code: MIPS: Loongson64: remove ROM Size unit in boardinfo
Problem Details: Per Appendix A.7 in Q/LS 0013-2014 (龙芯CPU开发系统固件与内核接口规范 V2.2, lit. Loongson DevSys Firmware Kernel Interface Specification V2.2), interface_info.size is size of this interface, not size of the LEFI BIOS ROM. In any case, the BIOS ROM Size just cannot be several kilobytes (KB) on Loongson64 LEFI platfor...
```diff diff --git a/arch/mips/loongson64/boardinfo.c b/arch/mips/loongson64/boardinfo.c index 280989c5a137..8bb275c93ac0 100644 --- a/arch/mips/loongson64/boardinfo.c +++ b/arch/mips/loongson64/boardinfo.c @@ -21,13 +21,11 @@ static ssize_t boardinfo_show(struct kobject *kobj, "BIOS Info\n" "Vendor...
ddd068d81445b17ac0bed084dfeb9e58b4df3ddd
Analyze and fix the following issue in the Linux kernel code: MIPS: ftrace: Declare ftrace_get_parent_ra_addr() as static
Problem Details: Declare ftrace_get_parent_ra_addr() as static to suppress clang compiler warning that 'no previous prototype'. This function is not intended to be called from other parts. Fix follow error with clang-19: arch/mips/kernel/ftrace.c:251:15: error: no previous prototype for function 'ftrace_get_parent_ra...
```diff diff --git a/arch/mips/kernel/ftrace.c b/arch/mips/kernel/ftrace.c index 8c401e42301c..f39e85fd58fa 100644 --- a/arch/mips/kernel/ftrace.c +++ b/arch/mips/kernel/ftrace.c @@ -248,7 +248,7 @@ int ftrace_disable_ftrace_graph_caller(void) #define S_R_SP (0xafb0 << 16) /* s{d,w} R, offset(sp) */ #define OFFSET_MA...
078b831638e1aa06dd7ffa9f244c8ac6b2995561
Analyze and fix the following issue in the Linux kernel code: Revert "MIPS: csrc-r4k: Select HAVE_UNSTABLE_SCHED_CLOCK if SMP && 64BIT"
Problem Details: This reverts commit 426fa8e4fe7bb914b5977cbce453a9926bf5b2e6. The commit has caused two issues on Loongson 3A4000: 1. The timestamp in dmesg become erratic, like: [3.736957] amdgpu 0000:04:00.0: ... ... [3.748895] [drm] Initialized amdgpu ... ... [18446744073.381141] amdgpu 0000:04:00:0:...
```diff diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 467b10f4361a..5078ebf071ec 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -1084,7 +1084,6 @@ config CSRC_IOASIC config CSRC_R4K select CLOCKSOURCE_WATCHDOG if CPU_FREQ - select HAVE_UNSTABLE_SCHED_CLOCK if SMP && 64BIT bool config CSR...
3398b1b8111d3b7a0cf8c3296320cf265fa56541
Analyze and fix the following issue in the Linux kernel code: MIPS: Fix the wrong format specifier
Problem Details: Make a minor change to eliminate a static checker warning. The type of cpu is unsigned int, so the correct format specifier should be %u instead of %d. Signed-off-by: liujing <liujing@cmss.chinamobile.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
```diff diff --git a/arch/mips/kernel/cevt-bcm1480.c b/arch/mips/kernel/cevt-bcm1480.c index d39a2963b451..2a14dc4ee57e 100644 --- a/arch/mips/kernel/cevt-bcm1480.c +++ b/arch/mips/kernel/cevt-bcm1480.c @@ -103,7 +103,7 @@ void sb1480_clockevent_init(void) BUG_ON(cpu > 3); /* Only have 4 general purpose timers */ ...
60a6002432448bb3f291d80768ae98d62efc9c77
Analyze and fix the following issue in the Linux kernel code: hostfs: fix string handling in __dentry_name()
Problem Details: strcpy() should not be used with destination potentially overlapping the source; what's more, strscpy() in there is pointless - we already know the amount we want to copy; might as well use memcpy(). Fixes: c278e81b8a02 "hostfs: Remove open coded strcpy()" Signed-off-by: Al Viro <viro@zeniv.linux.org....
```diff diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 7e51d2cec64b..bd6503b73142 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c @@ -95,32 +95,17 @@ __uml_setup("hostfs=", hostfs_args, static char *__dentry_name(struct dentry *dentry, char *name) { char *p = dentry_path_raw...
2bf66e66d2e6feece6175ec09ec590a0a8563bdd
Analyze and fix the following issue in the Linux kernel code: selftests/powerpc: Fix argument order to timer_sub()
Problem Details: Commit c814bf958926 ("powerpc/selftests: Use timersub() for gettimeofday()"), got the order of arguments to timersub() wrong, leading to a negative time delta being reported, eg: test: gettimeofday tags: git_version:v6.12-rc5-409-gdddf291c3030 time = -3.297781 success: gettimeofday The correc...
```diff diff --git a/tools/testing/selftests/powerpc/benchmarks/gettimeofday.c b/tools/testing/selftests/powerpc/benchmarks/gettimeofday.c index 580fcac0a09f..b71ef8a493ed 100644 --- a/tools/testing/selftests/powerpc/benchmarks/gettimeofday.c +++ b/tools/testing/selftests/powerpc/benchmarks/gettimeofday.c @@ -20,7 +20,...
8f70caad82e9c088ed93b4fea48d941ab6441886
Analyze and fix the following issue in the Linux kernel code: powerpc/pseries/iommu: IOMMU incorrectly marks MMIO range in DDW
Problem Details: Power Hypervisor can possibily allocate MMIO window intersecting with Dynamic DMA Window (DDW) range, which is over 32-bit addressing. These MMIO pages needs to be marked as reserved so that IOMMU doesn't map DMA buffers in this range. The current code is not marking these pages correctly which is re...
```diff diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index 76381e14e800..0ebae6e4c19d 100644 --- a/arch/powerpc/kernel/iommu.c +++ b/arch/powerpc/kernel/iommu.c @@ -687,7 +687,7 @@ void iommu_table_clear(struct iommu_table *tbl) void iommu_table_reserve_pages(struct iommu_table *tbl, unsig...
26ea81638fa0fb9c02b76775301995722368356a
Analyze and fix the following issue in the Linux kernel code: NFSD: Insulate nfsd4_encode_read_plus_data() from page boundaries in the encode buffer
Problem Details: Commit eeadcb757945 ("NFSD: Simplify READ_PLUS") replaced the use of write_bytes_to_xdr_buf(), copying what was in nfsd4_encode_read() at the time. However, the current code will corrupt the encoded data if the XDR data items that are reserved early and then poked into the XDR buffer later happen to f...
```diff diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 474fd663b0a9..3a68bed1829d 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -5305,13 +5305,20 @@ nfsd4_encode_read_plus_data(struct nfsd4_compoundres *resp, struct file *file = read->rd_nf->nf_file; struct xdr_stream *xdr = resp->xdr; bool ...
c9fc7772bacb28a8bd8efb08399c5af7217fbbb7
Analyze and fix the following issue in the Linux kernel code: NFSD: Insulate nfsd4_encode_read_plus() from page boundaries in the encode buffer
Problem Details: Commit eeadcb757945 ("NFSD: Simplify READ_PLUS") replaced the use of write_bytes_to_xdr_buf(), copying what was in nfsd4_encode_read() at the time. However, the current code will corrupt the encoded data if the XDR data items that are reserved early and then poked into the XDR buffer later happen to f...
```diff diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 2399b17db052..474fd663b0a9 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -5337,16 +5337,17 @@ nfsd4_encode_read_plus(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_read *read = &u->read; struct file *file = read->rd_nf->nf_fil...
1a861150bd6a69ea14da7a0d752da2b442e6a5dc
Analyze and fix the following issue in the Linux kernel code: NFSD: Insulate nfsd4_encode_read() from page boundaries in the encode buffer
Problem Details: Commit 28d5bc468efe ("NFSD: Optimize nfsd4_encode_readv()") replaced the use of write_bytes_to_xdr_buf() because it's expensive and the data items to be encoded are already properly aligned. However, the current code will corrupt the encoded data if the XDR data items that are reserved early and then ...
```diff diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index b2243b5dbf18..2399b17db052 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -4317,6 +4317,15 @@ static __be32 nfsd4_encode_splice_read( int status, space_left; __be32 nfserr; + /* + * Splice read doesn't work if encoding has already wander...
ef3675b45bcb6c17cabbbde620c6cea52ffb21ac
Analyze and fix the following issue in the Linux kernel code: NFSD: Encode COMPOUND operation status on page boundaries
Problem Details: J. David reports an odd corruption of a READDIR reply sent to a FreeBSD client. xdr_reserve_space() has to do a special trick when the @nbytes value requests more space than there is in the current page of the XDR buffer. In that case, xdr_reserve_space() returns a pointer to the start of the next pa...
```diff diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 4dcb03cd9292..b2243b5dbf18 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -5761,15 +5761,14 @@ nfsd4_encode_operation(struct nfsd4_compoundres *resp, struct nfsd4_op *op) struct nfs4_stateowner *so = resp->cstate.replay_owner; struct svc_rq...
ac32057acc7f3d7a238dafaa9b2aa2bc9750080e
Analyze and fix the following issue in the Linux kernel code: nvme: Add error check for xa_store in nvme_get_effects_log
Problem Details: The xa_store() may fail due to memory allocation failure because there is no guarantee that the index csi is already used. This fix adds an error check of the return value of xa_store() in nvme_get_effects_log(). Fixes: 1cf7a12e09aa ("nvme: use an xarray to lookup the Commands Supported and Effects lo...
```diff diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index c2250ddef5a2..4bdd5144af7c 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -3092,7 +3092,7 @@ int nvme_get_log(struct nvme_ctrl *ctrl, u32 nsid, u8 log_page, u8 lsp, u8 csi, static int nvme_get_effects_log(struct nvm...
32193789878c259e39b97bd0c0f2f0ccbe5cb8a8
Analyze and fix the following issue in the Linux kernel code: nvme-tcp: Fix I/O queue cpu spreading for multiple controllers
Problem Details: Since day-1 we are assigning the queue io_cpu very naively. We always base the queue id (controller scope) and assign it its matching cpu from the online mask. This works fine when the number of queues match the number of cpu cores. The problem starts when we have less queues than cpu cores. First, we...
```diff diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index 28c76a3e1bd2..dc5bbca58c6d 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -54,6 +54,8 @@ MODULE_PARM_DESC(tls_handshake_timeout, "nvme TLS handshake timeout in seconds (default 10)"); #endif +static atomic_t nvme_...
af3525d41001431e3d170214170dfe7dd73435b9
Analyze and fix the following issue in the Linux kernel code: net: warn during dump if NAPI list is not sorted
Problem Details: Dump continuation depends on the NAPI list being sorted. Broken netlink dump continuation may be rare and hard to debug so add a warning if we notice the potential problem while walking the list. Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Reviewed-by: Joe Damato <jdamato@fast...
```diff diff --git a/net/core/netdev-genl.c b/net/core/netdev-genl.c index a3bdaf075b6b..c59619a2ec23 100644 --- a/net/core/netdev-genl.c +++ b/net/core/netdev-genl.c @@ -263,14 +263,21 @@ netdev_nl_napi_dump_one(struct net_device *netdev, struct sk_buff *rsp, struct netdev_nl_dump_ctx *ctx) { struct napi_struct...
460b52835e60605cbb31710e8d290ee27b3e412b
Analyze and fix the following issue in the Linux kernel code: net: ethernet: ti: cpsw: fix the comment regarding VLAN-aware ALE
Problem Details: In all 3 cases (cpsw, cpsw-new, am65-cpsw) ALE is being configured in VLAN-aware mode, while the comment states the opposite. Seems to be a typo copy-pasted from one driver to another. Fix the commend which has been puzzling some people (including me) for at least a decade. Link: https://lore.kernel.o...
```diff diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c index 5465bf872734..dcb6662b473d 100644 --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c @@ -762,7 +762,7 @@ static int am65_cpsw_nuss_common_open(struct am65_cpsw_common...
06cc8786516f65bf0171402bfc2a4db6818b380b
Analyze and fix the following issue in the Linux kernel code: tls: skip setting sk_write_space on rekey
Problem Details: syzbot reported a problem when calling setsockopt(SO_SNDBUF) after a rekey. SO_SNDBUF calls sk_write_space, ie tls_write_space, which then calls the original socket's sk_write_space, saved in ctx->sk_write_space. Rekeys should skip re-assigning ctx->sk_write_space, so we don't end up with tls_write_spa...
```diff diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c index 9ee5a83c5b40..99ca4465f702 100644 --- a/net/tls/tls_main.c +++ b/net/tls/tls_main.c @@ -737,6 +737,10 @@ static int do_tls_setsockopt_conf(struct sock *sk, sockptr_t optval, else ctx->rx_conf = conf; update_sk_prot(sk, ctx); + + if (update) + re...
47e55e4b410f7d552e43011baa5be1aab4093990
Analyze and fix the following issue in the Linux kernel code: openvswitch: fix lockup on tx to unregistering netdev with carrier
Problem Details: Commit in a fixes tag attempted to fix the issue in the following sequence of calls: do_output -> ovs_vport_send -> dev_queue_xmit -> __dev_queue_xmit -> netdev_core_pick_tx -> skb_tx_hash When device is unregistering, the 'dev->real_num_tx_queues...
```diff diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c index 16e260014684..704c858cf209 100644 --- a/net/openvswitch/actions.c +++ b/net/openvswitch/actions.c @@ -934,7 +934,9 @@ static void do_output(struct datapath *dp, struct sk_buff *skb, int out_port, { struct vport *vport = ovs_vport_rcu(dp...
e7e441a4100e4bc90b52f80494a28a9667993975
Analyze and fix the following issue in the Linux kernel code: net: ravb: Fix max TX frame size for RZ/V2M
Problem Details: When tx_max_frame_size was added to struct ravb_hw_info, no value was set in ravb_rzv2m_hw_info so the default value of zero was used. The maximum MTU is set by subtracting from tx_max_frame_size to allow space for headers and frame checksums. As ndev->max_mtu is unsigned, this subtraction wraps aroun...
```diff diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index ac0f093f647a..bc395294a32d 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -2763,6 +2763,7 @@ static const struct ravb_hw_info ravb_rzv2m_hw_info = { ....
b493f881aaa70ac63a448267bd447ad1eb2b16a1
Analyze and fix the following issue in the Linux kernel code: net: ethtool: Use hwprov under rcu_read_lock
Problem Details: hwprov should be protected by rcu_read_lock to prevent possible UAF Fixes: 4c61d809cf60 ("net: ethtool: Fix suspicious rcu_dereference usage") Signed-off-by: Li RongQing <lirongqing@baidu.com> Acked-by: Kory Maincent <kory.maincent@bootlin.com> diff with v1: move and use err varialbe, instead of defi...
```diff diff --git a/net/ethtool/common.c b/net/ethtool/common.c index 2607aea1fbfb..2bd77c94f9f1 100644 --- a/net/ethtool/common.c +++ b/net/ethtool/common.c @@ -869,6 +869,7 @@ int __ethtool_get_ts_info(struct net_device *dev, struct kernel_ethtool_ts_info *info) { struct hwtstamp_provider *hwprov; + int err...
eaeea5028fa82412392d9325c44624ef8fcd1869
Analyze and fix the following issue in the Linux kernel code: net: mana: Cleanup "mana" debugfs dir after cleanup of all children
Problem Details: In mana_driver_exit(), mana_debugfs_root gets cleanup before any of it's children (which happens later in the pci_unregister_driver()). Due to this, when mana driver is configured as a module and rmmod is invoked, following stack gets printed along with failure in rmmod command. [ 2399.317651] BUG: ke...
```diff diff --git a/drivers/net/ethernet/microsoft/mana/gdma_main.c b/drivers/net/ethernet/microsoft/mana/gdma_main.c index 2dc0c6ad54be..be95336ce089 100644 --- a/drivers/net/ethernet/microsoft/mana/gdma_main.c +++ b/drivers/net/ethernet/microsoft/mana/gdma_main.c @@ -1656,9 +1656,9 @@ static int __init mana_driver_i...
5ef44b3cb43bda4009ba7fe3d54e0d258ae4aee7
Analyze and fix the following issue in the Linux kernel code: xsk: Bring back busy polling support
Problem Details: Commit 86e25f40aa1e ("net: napi: Add napi_config") moved napi->napi_id assignment to a later point in time (napi_hash_add_with_id). This breaks __xdp_rxq_info_reg which copies napi_id at an earlier time and now stores 0 napi_id. It also makes sk_mark_napi_id_once_xdp and __sk_mark_napi_id_once useless ...
```diff diff --git a/include/net/busy_poll.h b/include/net/busy_poll.h index c858270141bc..c39a426ebf52 100644 --- a/include/net/busy_poll.h +++ b/include/net/busy_poll.h @@ -174,12 +174,4 @@ static inline void sk_mark_napi_id_once(struct sock *sk, #endif } -static inline void sk_mark_napi_id_once_xdp(struct sock *...
f0aa6a37a3dbb40b272df5fc6db93c114688adcd
Analyze and fix the following issue in the Linux kernel code: eth: bnxt: always recalculate features after XDP clearing, fix null-deref
Problem Details: Recalculate features when XDP is detached. Before: # ip li set dev eth0 xdp obj xdp_dummy.bpf.o sec xdp # ip li set dev eth0 xdp off # ethtool -k eth0 | grep gro rx-gro-hw: off [requested on] After: # ip li set dev eth0 xdp obj xdp_dummy.bpf.o sec xdp # ip li set dev eth0 xdp off # etht...
```diff diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index aeaa74f03046..b6f844cac80e 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -4708,7 +4708,7 @@ void bnxt_set_ring_params(struct bnxt *bp) /* Changing...
b3af60928ab9129befa65e6df0310d27300942bf
Analyze and fix the following issue in the Linux kernel code: bpf: Fix bpf_sk_select_reuseport() memory leak
Problem Details: As pointed out in the original comment, lookup in sockmap can return a TCP ESTABLISHED socket. Such TCP socket may have had SO_ATTACH_REUSEPORT_EBPF set before it was ESTABLISHED. In other words, a non-NULL sk_reuseport_cb does not imply a non-refcounted socket. Drop sk's reference in both error paths...
```diff diff --git a/net/core/filter.c b/net/core/filter.c index 834614071727..2fb45a86f3dd 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -11251,6 +11251,7 @@ BPF_CALL_4(sk_select_reuseport, struct sk_reuseport_kern *, reuse_kern, bool is_sockarray = map->map_type == BPF_MAP_TYPE_REUSEPORT_SOCKARRAY; st...
54428671aac88dd11074c47cb7e7726e41d40f4a
Analyze and fix the following issue in the Linux kernel code: scsi: fnic: Test for memory allocation failure and return error code
Problem Details: Fix kernel test robot warning. Test for memory allocation failure, and free memory for queues allocated in a multiqueue and non-multiqueue scenario. Return appropriate error code. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/r/202412312347.FE4ZgEoM-lkp@intel.com/ Re...
```diff diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c index 9ed42d5819d5..f8fe67bebf3e 100644 --- a/drivers/scsi/fnic/fnic_main.c +++ b/drivers/scsi/fnic/fnic_main.c @@ -582,6 +582,14 @@ static void fnic_scsi_init(struct fnic *fnic) host->transportt = fnic_fc_transport; } +static void ...
3986001ca11ec630d631467d788aac513c61cb52
Analyze and fix the following issue in the Linux kernel code: scsi: fnic: Return appropriate error code from failure of scsi drv init
Problem Details: Return appropriate error code from fnic_probe caused by failure of fnic_scsi_drv_init. Fix bug report. Suggested-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Reviewed-by: Gian Carlo Boffa <gcboffa...
```diff diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c index 2d51adf18501..9ed42d5819d5 100644 --- a/drivers/scsi/fnic/fnic_main.c +++ b/drivers/scsi/fnic/fnic_main.c @@ -1039,7 +1039,8 @@ static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) fnic_fdls_init(fnic, (...
7dbe3aa2f3f83949174b64860dadfaeec3454cff
Analyze and fix the following issue in the Linux kernel code: scsi: fnic: Return appropriate error code for mem alloc failure
Problem Details: Return appropriate error code from fnic_probe when memory create slab pool fails. Fix bug report. Suggested-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Reviewed-by: Gian Carlo Boffa <gcboffa@cisc...
```diff diff --git a/drivers/scsi/fnic/fnic_main.c b/drivers/scsi/fnic/fnic_main.c index 3a900d540f21..2d51adf18501 100644 --- a/drivers/scsi/fnic/fnic_main.c +++ b/drivers/scsi/fnic/fnic_main.c @@ -888,24 +888,32 @@ static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) } pool = mempool_cre...
8ccc5947f5d1608f7217cdbee532c7fc2431f7c9
Analyze and fix the following issue in the Linux kernel code: scsi: fnic: Fix use of uninitialized value in debug message
Problem Details: The oxid variable in fdls_process_abts_req() was only being initialized inside the if (tport) block, but was being used in a debug print statement after that block. If tport was NULL, oxid would remain uninitialized. Move the oxid initialization to happen at declaration using FNIC_STD_GET_OX_ID(fchdr)...
```diff diff --git a/drivers/scsi/fnic/fdls_disc.c b/drivers/scsi/fnic/fdls_disc.c index 2513a82a8915..b535c7bf57ba 100644 --- a/drivers/scsi/fnic/fdls_disc.c +++ b/drivers/scsi/fnic/fdls_disc.c @@ -3900,7 +3900,7 @@ fdls_process_abts_req(struct fnic_iport_s *iport, struct fc_frame_header *fchdr) uint8_t *frame; st...
bab8551e33f7f5e8743ccb49be41fe3228178e8a
Analyze and fix the following issue in the Linux kernel code: scsi: fnic: Remove unnecessary else to fix warning in FDLS FIP
Problem Details: Implement review comments from Martin: Remove unnecessary else from fip.c to fix a warning. Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com> Reviewed-by: Arun Easi <aeasi@cisco.com> Signed-of...
```diff diff --git a/drivers/scsi/fnic/fip.c b/drivers/scsi/fnic/fip.c index aaf5f768a9bd..7bb85949033f 100644 --- a/drivers/scsi/fnic/fip.c +++ b/drivers/scsi/fnic/fip.c @@ -154,16 +154,15 @@ void fnic_fcoe_process_vlan_resp(struct fnic *fnic, struct fip_header *fiph) vlan->state = FIP_VLAN_AVAIL; list_add_tai...
5b6179d4b661e3c22ffa5f3fe2523bad4cd01983
Analyze and fix the following issue in the Linux kernel code: scsi: fnic: Remove unnecessary else and unnecessary break in FDLS
Problem Details: Incorporate review comments from Martin: Remove unnecessary else and unnecessary break to fix warnings in the FDLS code. Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com> Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com> Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com> Reviewed-by: Arun...
```diff diff --git a/drivers/scsi/fnic/fdls_disc.c b/drivers/scsi/fnic/fdls_disc.c index 2534af2fff53..2513a82a8915 100644 --- a/drivers/scsi/fnic/fdls_disc.c +++ b/drivers/scsi/fnic/fdls_disc.c @@ -2776,23 +2776,19 @@ fdls_process_tgt_prli_rsp(struct fnic_iport_s *iport, /*Retry Plogi again from the timer routine....
295006f6e8c17212d3098811166e29627d19e05c
Analyze and fix the following issue in the Linux kernel code: scsi: mpi3mr: Fix possible crash when setting up bsg fails
Problem Details: If bsg_setup_queue() fails, the bsg_queue is assigned a non-NULL value. Consequently, in mpi3mr_bsg_exit(), the condition "if(!mrioc->bsg_queue)" will not be satisfied, preventing execution from entering bsg_remove_queue(), which could lead to the following crash: BUG: kernel NULL pointer dereference,...
```diff diff --git a/drivers/scsi/mpi3mr/mpi3mr_app.c b/drivers/scsi/mpi3mr/mpi3mr_app.c index 10b8e4dc64f8..7589f48aebc8 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_app.c +++ b/drivers/scsi/mpi3mr/mpi3mr_app.c @@ -2951,6 +2951,7 @@ void mpi3mr_bsg_init(struct mpi3mr_ioc *mrioc) .max_hw_sectors = MPI3MR_MAX_APP_XFER_SE...
1e95c798d8a7f70965f0f88d4657b682ff0ec75f
Analyze and fix the following issue in the Linux kernel code: scsi: ufs: bsg: Set bsg_queue to NULL after removal
Problem Details: Currently, this does not cause any issues, but I believe it is necessary to set bsg_queue to NULL after removing it to prevent potential use-after-free (UAF) access. Signed-off-by: Guixin Liu <kanie@linux.alibaba.com> Link: https://lore.kernel.org/r/20241218014214.64533-3-kanie@linux.alibaba.com Revie...
```diff diff --git a/drivers/ufs/core/ufs_bsg.c b/drivers/ufs/core/ufs_bsg.c index 58023f735c19..8d4ad0a3f2cf 100644 --- a/drivers/ufs/core/ufs_bsg.c +++ b/drivers/ufs/core/ufs_bsg.c @@ -216,6 +216,7 @@ void ufs_bsg_remove(struct ufs_hba *hba) return; bsg_remove_queue(hba->bsg_queue); + hba->bsg_queue = NULL; ...
fcf247deb3c3e1c6be5774e3fa03bbd018eff1a9
Analyze and fix the following issue in the Linux kernel code: scsi: ufs: bsg: Delete bsg_dev when setting up bsg fails
Problem Details: We should remove the bsg device when bsg_setup_queue() fails to release the resources. Fixes: df032bf27a41 ("scsi: ufs: Add a bsg endpoint that supports UPIUs") Signed-off-by: Guixin Liu <kanie@linux.alibaba.com> Link: https://lore.kernel.org/r/20241218014214.64533-2-kanie@linux.alibaba.com Reviewed-b...
```diff diff --git a/drivers/ufs/core/ufs_bsg.c b/drivers/ufs/core/ufs_bsg.c index 6c09d97ae006..58023f735c19 100644 --- a/drivers/ufs/core/ufs_bsg.c +++ b/drivers/ufs/core/ufs_bsg.c @@ -257,6 +257,7 @@ int ufs_bsg_probe(struct ufs_hba *hba) NULL, 0); if (IS_ERR(q)) { ret = PTR_ERR(q); + device_del(bsg_dev); ...
98b37881b7492ae9048ad48260cc8a6ee9eb39fd
Analyze and fix the following issue in the Linux kernel code: scsi: st: Don't set pos_unknown just after device recognition
Problem Details: Commit 9604eea5bd3a ("scsi: st: Add third party poweron reset handling") in v6.6 added new code to handle the Power On/Reset Unit Attention (POR UA) sense data. This was in addition to the existing method. When this Unit Attention is received, the driver blocks attempts to read, write and some other op...
```diff diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index e8ef27d7ef61..ebbd50ec0cda 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -1030,6 +1030,11 @@ static int test_ready(struct scsi_tape *STp, int do_wait) retval = new_session ? CHKRES_NEW_SESSION : CHKRES_READY; break; } + if (STp->first...
77a4157ac75c67d1793c972f172dae215ccc75ad
Analyze and fix the following issue in the Linux kernel code: scsi: aic7xxx: Fix build 'aicasm' warning
Problem Details: When building with CONFIG_AIC7XXX_BUILD_FIRMWARE=y or CONFIG_AIC79XX_BUILD_FIRMWARE=y, the warning messages are as follows: aicasm_gram.tab.c:1722:16: warning: implicit declaration of function ‘yylex’ [-Wimplicit-function-declaration] aicasm_macro_gram.c:68:25: warning: implicit declaration o...
```diff diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y index 65182ad9cdf8..b1c9ce477cbd 100644 --- a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y +++ b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y @@ -102,6 +102,7 @@ static void add_conditional(symbol_t *symbol); static vo...
a2a3374c47c428c0edb0bbc693638d4783f81e31
Analyze and fix the following issue in the Linux kernel code: sched_ext: idle: Refresh idle masks during idle-to-idle transitions
Problem Details: With the consolidation of put_prev_task/set_next_task(), see commit 436f3eed5c69 ("sched: Combine the last put_prev_task() and the first set_next_task()"), we are now skipping the transition between these two functions when the previous and the next tasks are the same. As a result, the scx idle state ...
```diff diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index 68150e110451..19813b387ef9 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -3590,16 +3590,8 @@ static void reset_idle_masks(void) cpumask_copy(idle_masks.smt, cpu_online_mask); } -void __scx_update_idle(struct rq *rq, bool idle) +static...
defac894af93cb347fae0520fe8f14ca36f6fe87
Analyze and fix the following issue in the Linux kernel code: bpftool: Fix control flow graph segfault during edge creation
Problem Details: If the last instruction of a control flow graph building block is a BPF_CALL, an incorrect edge with e->dst set to NULL is created and results in a segfault during graph output. Ensure that BPF_CALL as last instruction of a building block is handled correctly and only generates a single edge unlike ac...
```diff diff --git a/tools/bpf/bpftool/cfg.c b/tools/bpf/bpftool/cfg.c index eec437cca2ea..e3785f9a697d 100644 --- a/tools/bpf/bpftool/cfg.c +++ b/tools/bpf/bpftool/cfg.c @@ -302,6 +302,7 @@ static bool func_add_bb_edges(struct func_node *func) insn = bb->tail; if (!is_jmp_insn(insn->code) || + BPF_OP(insn...
37d061e1ace17a376eda34b10dde28b144296534
Analyze and fix the following issue in the Linux kernel code: scsi: scsi_debug: Constify sdebug_driver_template
Problem Details: It's better to have sdebug_driver_template as const, so update the probe path to set the shost members directly after allocation and make that change. Signed-off-by: John Garry <john.g.garry@oracle.com> Link: https://lore.kernel.org/r/20250107153325.1689432-1-john.g.garry@oracle.com Reviewed-by: Bart ...
```diff diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 07aa83a9df9a..5ceaa4665e5d 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -8707,7 +8707,7 @@ static int sdebug_init_cmd_priv(struct Scsi_Host *shost, struct scsi_cmnd *cmd) return 0; } -static struct scsi_ho...
bd2703b42decebdcddf76e277ba76b4c4a142d73
Analyze and fix the following issue in the Linux kernel code: io_uring: don't touch sqd->thread off tw add
Problem Details: With IORING_SETUP_SQPOLL all requests are created by the SQPOLL task, which means that req->task should always match sqd->thread. Since accesses to sqd->thread should be separately protected, use req->task in io_req_normal_work_add() instead. Note, in the eyes of io_req_normal_work_add(), the SQPOLL t...
```diff diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index d3403c8216db..5eb119002099 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -1226,10 +1226,7 @@ static void io_req_normal_work_add(struct io_kiocb *req) /* SQPOLL doesn't need the task_work added, it'll run it itself */ if (ctx->fla...
4b7cfa8b6c28a9fa22b86894166a1a34f6d630ba
Analyze and fix the following issue in the Linux kernel code: io_uring/sqpoll: zero sqd->thread on tctx errors
Problem Details: Syzkeller reports: BUG: KASAN: slab-use-after-free in thread_group_cputime+0x409/0x700 kernel/sched/cputime.c:341 Read of size 8 at addr ffff88803578c510 by task syz.2.3223/27552 Call Trace: <TASK> ... kasan_report+0x143/0x180 mm/kasan/report.c:602 thread_group_cputime+0x409/0x700 kernel/sche...
```diff diff --git a/io_uring/sqpoll.c b/io_uring/sqpoll.c index 9e5bd79fd2b5..8961a3c1e73c 100644 --- a/io_uring/sqpoll.c +++ b/io_uring/sqpoll.c @@ -268,8 +268,12 @@ static int io_sq_thread(void *data) DEFINE_WAIT(wait); /* offload context creation failed, just exit */ - if (!current->io_uring) + if (!current->...
d4842e578771bc907511c424492513aa5c224082
Analyze and fix the following issue in the Linux kernel code: scsi: transport: sas: spi: Fix kernel-doc for exported functions
Problem Details: Fix kernel-doc for sas_port_alloc(), sas_port_alloc_num(), and spi_dv_device(). This allows them to be part of the SCSI driver-api docbook. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20241212205217.597844-6-rdunlap@infradead.org CC: James E.J. Bottomley <James...
```diff diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c index 4e33f1661e4c..351b028ef893 100644 --- a/drivers/scsi/scsi_transport_sas.c +++ b/drivers/scsi/scsi_transport_sas.c @@ -888,7 +888,8 @@ static void sas_port_delete_link(struct sas_port *port, sysfs_remove_link(&phy->dev.kob...
39d2112ab7c8050642fdc2830a0a3edc5337827f
Analyze and fix the following issue in the Linux kernel code: scsi: scsi_lib: Add kernel-doc for exported functions
Problem Details: Add kernel-doc for scsi_failures_reset_retries() and scsi_alloc_request() since these are exported. This allows them to be part of the SCSI driver-api docbook. Fix kernel-doc comments for scsi_vpd_tpg_id() [add kernel-doc for one parameter and fix a typo]. Signed-off-by: Randy Dunlap <rdunlap@infrad...
```diff diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index adee6f60c966..1023f58b2373 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -184,6 +184,10 @@ void scsi_queue_insert(struct scsi_cmnd *cmd, int reason) __scsi_queue_insert(cmd, reason, true); } +/** + * scsi_failures_...
f647dc6512efa88bd1a3dc2444a9d1ea170f4045
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Support pdev Puncture Stats
Problem Details: Add support to request pdev puncture stats from firmware through HTT stats type 46. These stats give the count of number of subbands used in different wifi standards. Sample output: ------------- echo 46 > /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats_type cat /sys/kernel/debug/ath12k/pci...
```diff diff --git a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c index 9294ef41a169..41e4ef2ef3af 100644 --- a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c +++ b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c @@ -3522,6 +3522,104 @@ ath12k_htt_pr...
89699f029cd42ddf913a201c917ce4f7b213b068
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Support AST Entry Stats
Problem Details: Add support to request Address Search Table(AST) entries stats from firmware through HTT stats type 41. These stats give AST entries related information such as software peer id, MAC address, pdev id, vdev, id, next hop, etc. Sample output: ------------- echo 41 > /sys/kernel/debug/ath12k/pci-0000\:06...
```diff diff --git a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c index c43bf032270f..9294ef41a169 100644 --- a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c +++ b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c @@ -3469,6 +3469,59 @@ ath12k_htt_pri...
3f482f2434753a0647dc8753a127f86878348458
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Support Transmit Buffer OFDMA Stats
Problem Details: Add support to request OFDMA stats of transmit buffers from firmware through HTT stats type 32. These stats give information about NDPA, NDP, BRP and steering mechanisms. Note: WCN7850 firmware version - WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 does not support HTT stats type 32. Sa...
```diff diff --git a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c index d72eb22a719b..c43bf032270f 100644 --- a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c +++ b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c @@ -2668,6 +2668,240 @@ ath12k_htt_pr...
c9f6ee2701d798c2b79b8557b842da7b106fcd5c
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: Support Transmit Rate Buffer Stats
Problem Details: Add support to request transmit rate buffer stats from firmware through HTT stats type 31. These stats give information such as MCS, NSS and bandwidth of transmit and input buffer. Sample output: ------------- echo 31 > /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats_type cat /sys/kernel/de...
```diff diff --git a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c index d8f137bfba7b..d72eb22a719b 100644 --- a/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c +++ b/drivers/net/wireless/ath/ath12k/debugfs_htt_stats.c @@ -2576,6 +2576,98 @@ ath12k_htt_pri...
35ca53b7b0f0ffd16c6675fd76abac9409cf83e0
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Do not elevate mem_type change to full update
Problem Details: [Why] There should not be any need to revalidate bandwidth on memory placement change, since the fb is expected to be pinned to DCN-accessable memory before scanout. For APU it's DRAM, and DGPU, it's VRAM. However, async flips + memory type change needs to be rejected. [How] Do not set lock_and_vali...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 56b47e02db0b..dcc5d8ded662 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -11379,6 +11379,25 @@ static int dm_crtc_g...
ff2e4d874726c549130308b6b46aa0f8a34e04cb
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Do not wait for PSR disable on vbl enable
Problem Details: [Why] Outside of a modeset/link configuration change, we should not have to wait for the panel to exit PSR. Depending on the panel and it's state, it may take multiple frames for it to exit PSR. Therefore, waiting in all scenarios may cause perceived stuttering, especially in combination with faster v...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index cd16dae534dc..56b47e02db0b 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -9100,7 +9100,7 @@ static void amdgpu_dm_c...
3412860cc4c0c484f53f91b371483e6e4440c3e5
Analyze and fix the following issue in the Linux kernel code: Revert "drm/amd/display: Enable urgent latency adjustments for DCN35"
Problem Details: Revert commit 284f141f5ce5 ("drm/amd/display: Enable urgent latency adjustments for DCN35") [Why & How] Urgent latency increase caused 2.8K OLED monitor caused it to block this panel support P0. Reverting this change does not reintroduce the netflix corruption issue which it fixed. Fixes: 284f141f...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c b/drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c index beed7adbbd43..47d785204f29 100644 --- a/drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c @@ -195,9 +195,9 @@ struct _vcs_d...
adb4998f4928a17d91be054218a902ba9f8c1f93
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Reduce accessing remote DPCD overhead
Problem Details: [Why] Observed frame rate get dropped by tool like glxgear. Even though the output to monitor is 60Hz, the rendered frame rate drops to 30Hz lower. It's due to code path in some cases will trigger dm_dp_mst_is_port_support_mode() to read out remote Link status to assess the available bandwidth for dsc...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h index 6464a8378387..2227cd8e4a89 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h @@ -697,6 +697,8 @@ struct amdgpu_dm_connecto...
b5cd418f016fb801be413fd52fe4711d2d13018c
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Validate mdoe under MST LCT=1 case as well
Problem Details: [Why & How] Currently in dm_dp_mst_is_port_support_mode(), when valdidating mode under dsc decoding at the last DP link config, we only validate the case when there is an UFP. However, if the MSTB LCT=1, there is no UFP. Under this case, use root_link_bw_in_kbps as the available bw to compare. Link: ...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c index 6e4359490613..aadaa61ac5ac 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c @@ -1...
c475b68155942cc2142aca02f3fc19f6e730f17e
Analyze and fix the following issue in the Linux kernel code: soc/tegra: Fix spelling error in tegra234_lookup_slave_timeout()
Problem Details: Fix spelling error in tegra234_lookup_slave_timeout(). Signed-off-by: liujing <liujing@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20241209055148.3749-1-liujing@cmss.chinamobile.com Signed-off-by: Thierry Reding <treding@nvidia.com>
```diff diff --git a/drivers/soc/tegra/cbb/tegra234-cbb.c b/drivers/soc/tegra/cbb/tegra234-cbb.c index 5cf0e8c34164..c74629af9bb5 100644 --- a/drivers/soc/tegra/cbb/tegra234-cbb.c +++ b/drivers/soc/tegra/cbb/tegra234-cbb.c @@ -277,7 +277,7 @@ static void tegra234_lookup_slave_timeout(struct seq_file *file, struct tegra...
b615fbd70fce8582d92b3bdbbf3c9b80cadcfb55
Analyze and fix the following issue in the Linux kernel code: arm64: tegra: Fix Tegra234 PCIe interrupt-map
Problem Details: For interrupt-map entries, the DTS specification requires that #address-cells is defined for both the child node and the interrupt parent. For the PCIe interrupt-map entries, the parent node ("gic") has not specified #address-cells. The existing layout of the PCIe interrupt-map entries indicates that ...
```diff diff --git a/arch/arm64/boot/dts/nvidia/tegra234.dtsi b/arch/arm64/boot/dts/nvidia/tegra234.dtsi index 28c7aacf6bc1..2601b43b2d8c 100644 --- a/arch/arm64/boot/dts/nvidia/tegra234.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra234.dtsi @@ -4018,6 +4018,8 @@ #redistributor-regions = <1>; #interrupt-cells = <3...
ac0ac75189a4d6a29a2765a7adbb62bc6cc650c7
Analyze and fix the following issue in the Linux kernel code: perf report: Fix misleading help message about --demangle
Problem Details: The wrong help message may mislead users. This commit fixes it. Fixes: 328ccdace8855289 ("perf report: Add --no-demangle option") Reviewed-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Jiachen Zhang <me@jcix.top> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shi...
```diff diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index e5478082845c..f5fbd670d619 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -1420,7 +1420,7 @@ int cmd_report(int argc, const char **argv) OPT_STRING(0, "addr2line", &addr2line_path, "path", "addr2l...
510f0247cdac26dfc2fed6e712f3cb616da49b5c
Analyze and fix the following issue in the Linux kernel code: perf ftrace: Fix display for range of the first bucket
Problem Details: When min_latency is not given, it prints 0 - 0. It should be 0 - 1. Before: $ sudo ./perf ftrace latency -a -T do_futex sleep 1 # DURATION | COUNT | GRAPH | 0 - 0 us | 321 | ########### | .....
```diff diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c index 90cf2c9915a7..cfd770ec7286 100644 --- a/tools/perf/builtin-ftrace.c +++ b/tools/perf/builtin-ftrace.c @@ -840,7 +840,7 @@ static void display_histogram(struct perf_ftrace *ftrace, int buckets[]) bar_len = buckets[0] * bar_total / tot...
dd01b985c52a964ed5b193972e475481fefa0f45
Analyze and fix the following issue in the Linux kernel code: perf ftrace: Check min/max latency only with bucket range
Problem Details: It's an optional feature and remains 0 when bucket range is not given. And it makes the histogram goes to the last entry always because any latency (num) is greater than or equal to 0. Before: $ sudo ./perf ftrace latency -a -T do_futex sleep 1 # DURATION | COUNT | GRAPH ...
```diff diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c index 08c1cc429b27..90cf2c9915a7 100644 --- a/tools/perf/builtin-ftrace.c +++ b/tools/perf/builtin-ftrace.c @@ -796,8 +796,10 @@ static void make_histogram(struct perf_ftrace *ftrace, int buckets[], // than the min latency desired. i...
e4c00c9b1f70cd11792ff5b825899a6ee0234a62
Analyze and fix the following issue in the Linux kernel code: of: Correct child specifier used as input of the 2nd nexus node
Problem Details: API of_parse_phandle_with_args_map() will use wrong input for nexus node Nexus_2 as shown below: Node_1 Nexus_1 Nexus_2 &Nexus_1,arg_1 -> arg_1,&Nexus_2,arg_2' -> &Nexus_2,arg_2 -> arg_2,... map-pass-thru=<...> Nexus_1's output arg_2 should be used as input of Ne...
```diff diff --git a/drivers/of/base.c b/drivers/of/base.c index bf18d5997770..969b99838655 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -1536,7 +1536,6 @@ int of_parse_phandle_with_args_map(const struct device_node *np, * specifier into the out_args structure, keeping the * bits specified in <list...
cb4ccc70344c3dc29a5d0045361a4f0959bc5a6b
Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: Add static_call_inline.c to STATIC BRANCH/CALL
Problem Details: Commit 8fd4ddda2f49 ("static_call: Don't make __static_call_return0 static") split static_call.c and created static_call_inline.c. This was not reflected in MAINTAINERS. Fix it by changing the MAINTAINERS line to be a glob: static_call*.c. Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> Signe...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index 9bcd4e72a2dc..7da973afe26b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -22450,7 +22450,7 @@ F: arch/*/kernel/static_call.c F: include/linux/jump_label*.h F: include/linux/static_call*.h F: kernel/jump_label.c -F: kernel/static_call.c +F: kernel/static_call*.c ...
812a33a65d00e3d813f5ed2c9923569acd0b445c
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: 3.2.316
Problem Details: This version brings along following fixes: - Add some feature for secure display - Add replay desync error count tracking and reset - Update chip_cap defines and usage - Remove unnecessary eDP power down - Fix some stuttering/corruption issue on PSR panel - Cleanup and refactoring DML2.1 Acked-by: Way...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 5fb15c6315a4..053481ab69ef 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -55,7 +55,7 @@ struct aux_payload; struct set_config_cmd_payload; struct dmub_notification; -#...
ec6d8d49f44b4d0cbf8674f81374ea4df04228da
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Apply DML21 Patches
Problem Details: [Why & How] Add several DML21 fixes Reviewed-by: Wenjing Liu <wenjing.liu@amd.com> Signed-off-by: Austin Zheng <Austin.Zheng@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c index a3ffb8c95d25..c4dbf27abaf8 100644 --- a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c +++ b/drivers/...
4caacd1671b7a013ad04cd8b6398f002540bdd4d
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Do not elevate mem_type change to full update
Problem Details: [Why] There should not be any need to revalidate bandwidth on memory placement change, since the fb is expected to be pinned to DCN-accessable memory before scanout. For APU it's DRAM, and DGPU, it's VRAM. However, async flips + memory type change needs to be rejected. [How] Do not set lock_and_vali...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 3ad548254d6c..9121abe0e5ef 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -11464,6 +11464,25 @@ static int dm_crtc_g...
aa6713fa2046f4c09bf3013dd1420ae15603ca6f
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Do not wait for PSR disable on vbl enable
Problem Details: [Why] Outside of a modeset/link configuration change, we should not have to wait for the panel to exit PSR. Depending on the panel and it's state, it may take multiple frames for it to exit PSR. Therefore, waiting in all scenarios may cause perceived stuttering, especially in combination with faster v...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 1db955c287ae..3ad548254d6c 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -9180,7 +9180,7 @@ static void amdgpu_dm_c...
c7ccfc0d4241a834c25a9a9e1e78b388b4445d23
Analyze and fix the following issue in the Linux kernel code: Revert "drm/amd/display: Enable urgent latency adjustments for DCN35"
Problem Details: Revert commit 284f141f5ce5 ("drm/amd/display: Enable urgent latency adjustments for DCN35") [Why & How] Urgent latency increase caused 2.8K OLED monitor caused it to block this panel support P0. Reverting this change does not reintroduce the netflix corruption issue which it fixed. Fixes: 284f141f...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c b/drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c index beed7adbbd43..47d785204f29 100644 --- a/drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c @@ -195,9 +195,9 @@ struct _vcs_d...
4a9a918545455a5979c6232fcf61ed3d8f0db3ae
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Reduce accessing remote DPCD overhead
Problem Details: [Why] Observed frame rate get dropped by tool like glxgear. Even though the output to monitor is 60Hz, the rendered frame rate drops to 30Hz lower. It's due to code path in some cases will trigger dm_dp_mst_is_port_support_mode() to read out remote Link status to assess the available bandwidth for dsc...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h index 76fa3e7859ef..d2703ca7dff3 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h @@ -699,6 +699,8 @@ struct amdgpu_dm_connecto...
a04d9534a8a75b2806c5321c387be450c364b55e
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Validate mdoe under MST LCT=1 case as well
Problem Details: [Why & How] Currently in dm_dp_mst_is_port_support_mode(), when valdidating mode under dsc decoding at the last DP link config, we only validate the case when there is an UFP. However, if the MSTB LCT=1, there is no UFP. Under this case, use root_link_bw_in_kbps as the available bw to compare. Link: ...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c index ca864f71ae66..a504aa1243e9 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c @@ -1...
00d53a0d8aa863d8202c932185bd7495766bd654
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Update chip_cap defines and usage
Problem Details: [WHY] The defines have also been updated with prefix AMD_ and atomfirmware.h has been temporarily updated with both sets of defines to allow the transition. This update is being made to standardize workaround chip_cap flags, in order to support more workaround flags in the future. [HOW] Updated EXT_DI...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c index c9a6de110b74..a62f6c51301c 100644 --- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c +++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c @@ -3088,11 +3088,12 @@ static enum bp_re...
55cf2f4b945f6a6416cc2524ba740b83cc9af25a
Analyze and fix the following issue in the Linux kernel code: binfmt_flat: Fix integer overflow bug on 32 bit systems
Problem Details: Most of these sizes and counts are capped at 256MB so the math doesn't result in an integer overflow. The "relocs" count needs to be checked as well. Otherwise on 32bit systems the calculation of "full_data" could be wrong. full_data = data_len + relocs * sizeof(unsigned long); Fixes: c995ee28d29d...
```diff diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c index 390808ce935d..b5b5ca1a44f7 100644 --- a/fs/binfmt_flat.c +++ b/fs/binfmt_flat.c @@ -478,7 +478,7 @@ static int load_flat_file(struct linux_binprm *bprm, * 28 bits (256 MB) is way more than reasonable in this case. * If some top bits are set we have pr...
7579790915387396e26041ceafbc07348658edef
Analyze and fix the following issue in the Linux kernel code: ALSA: hda: Fix compilation of snd_hdac_adsp_xxx() helpers
Problem Details: The snd_hdac_adsp_xxx() wrap snd_hdac_reg_xxx() helpers to simplify register access for AudioDSP drivers e.g.: the avs-driver. Byte- and word-variants of said helps do not expand to bare readx/writex() operations but functions instead and, due to pointer type incompatibility, cause compilation to fail....
```diff diff --git a/include/sound/hdaudio_ext.h b/include/sound/hdaudio_ext.h index 957295364a5e..4c7a40e149a5 100644 --- a/include/sound/hdaudio_ext.h +++ b/include/sound/hdaudio_ext.h @@ -2,8 +2,6 @@ #ifndef __SOUND_HDAUDIO_EXT_H #define __SOUND_HDAUDIO_EXT_H -#include <linux/io-64-nonatomic-lo-hi.h> -#include <...
a93694188127a5f7ba3baa2f98b275ce388a5246
Analyze and fix the following issue in the Linux kernel code: gendwarfksyms: Add support for reserved and ignored fields
Problem Details: Distributions that want to maintain a stable kABI need the ability to make ABI compatible changes to kernel data structures without affecting symbol versions, either because of LTS updates or backports. With genksyms, developers would typically hide these changes from version calculation with #ifndef ...
```diff diff --git a/scripts/gendwarfksyms/dwarf.c b/scripts/gendwarfksyms/dwarf.c index 17f7e6b9a7ff..746a89d9e3d4 100644 --- a/scripts/gendwarfksyms/dwarf.c +++ b/scripts/gendwarfksyms/dwarf.c @@ -3,10 +3,33 @@ * Copyright (C) 2024 Google LLC */ +#include <assert.h> #include <inttypes.h> #include <stdarg.h> ...
5b7780e86857f70249df2c4f8982cad3ba931eee
Analyze and fix the following issue in the Linux kernel code: gendwarfksyms: Expand base_type
Problem Details: Start making gendwarfksyms more useful by adding support for expanding DW_TAG_base_type types and basic DWARF attributes. Example: $ echo loops_per_jiffy | \ scripts/gendwarfksyms/gendwarfksyms \ --debug --dump-dies vmlinux.o ... gendwarfksyms: process_symbol: loops_per_jiffy va...
```diff diff --git a/scripts/gendwarfksyms/dwarf.c b/scripts/gendwarfksyms/dwarf.c index 81df3e2ad3ae..74e75b8ec891 100644 --- a/scripts/gendwarfksyms/dwarf.c +++ b/scripts/gendwarfksyms/dwarf.c @@ -3,8 +3,21 @@ * Copyright (C) 2024 Google LLC */ +#include <inttypes.h> +#include <stdarg.h> #include "gendwarfksym...
e966eae72762ecfdbdb82627e2cda48845b9dd66
Analyze and fix the following issue in the Linux kernel code: misc: fastrpc: Fix copy buffer page size
Problem Details: For non-registered buffer, fastrpc driver copies the buffer and pass it to the remote subsystem. There is a problem with current implementation of page size calculation which is not considering the offset in the calculation. This might lead to passing of improper and out-of-bounds page size which could...
```diff diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index 56dc3b3a8940..7b7a22c91fe4 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -1019,8 +1019,8 @@ static int fastrpc_get_args(u32 kernel, struct fastrpc_invoke_ctx *ctx) (pkt_size - rlen); pages[i].addr = pages[i].addr ...
6ca4ea1f88a06a04ed7b2c9c6bf9f00833b68214
Analyze and fix the following issue in the Linux kernel code: misc: fastrpc: Fix registered buffer page address
Problem Details: For registered buffers, fastrpc driver sends the buffer information to remote subsystem. There is a problem with current implementation where the page address is being sent with an offset leading to improper buffer address on DSP. This is leads to functional failures as DSP expects base address in pag...
```diff diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index b116ed068b99..56dc3b3a8940 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -992,7 +992,7 @@ static int fastrpc_get_args(u32 kernel, struct fastrpc_invoke_ctx *ctx) mmap_read_lock(current->mm); vma = find_vma(current->...
637c20002dc8c347001292664055bfbf56544ec6
Analyze and fix the following issue in the Linux kernel code: misc: fastrpc: Deregister device nodes properly in error scenarios
Problem Details: During fastrpc_rpmsg_probe, if secure device node registration succeeds but non-secure device node registration fails, the secure device node deregister is not called during error cleanup. Add proper exit paths to ensure proper cleanup in case of error. Fixes: 3abe3ab3cdab ("misc: fastrpc: add secure ...
```diff diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index dd766c8018e4..b116ed068b99 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -2346,7 +2346,7 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev) err = fastrpc_device_register(rdev, data, false, domains[domain_id]...