id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
e7a1cbca0b4255ac3e03f53d440fa38f7a41d8cc
Analyze and fix the following issue in the Linux kernel code: drm/gem-shmem: Do not map s/g table by default
Problem Details: The vast majority of drivers that use GEM-SHMEM helpers do not use an s/g table for imported buffers; specifically all drivers that use DRM_GEM_SHMEM_DRIVER_OPS. Therefore convert the initializer macro to DRM_GEM_SHMEM_DRIVER_OPS_NO_MAP_SGT and remove the latter. This helps to avoid swiotbl errors, suc...
```diff diff --git a/drivers/gpu/drm/ast/ast_drv.c b/drivers/gpu/drm/ast/ast_drv.c index 054acda41909..6fbf62a99c48 100644 --- a/drivers/gpu/drm/ast/ast_drv.c +++ b/drivers/gpu/drm/ast/ast_drv.c @@ -64,7 +64,7 @@ static const struct drm_driver ast_driver = { .minor = DRIVER_MINOR, .patchlevel = DRIVER_PATCHLEVEL, ...
203817de269539c062724d97dfa5af3cdf77a3ec
Analyze and fix the following issue in the Linux kernel code: io_uring/zcrx: fix pp destruction warnings
Problem Details: With multiple page pools and in some other cases we can have allocated niovs on page pool destruction. Remove a misplaced warning checking that all niovs are returned to zcrx on io_pp_zc_destroy(). It was reported before but apparently got lost. Reported-by: Pedro Tammela <pctammela@mojatatu.com> Fixe...
```diff diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c index ade4da9c4e31..67c518d22e0c 100644 --- a/io_uring/zcrx.c +++ b/io_uring/zcrx.c @@ -862,10 +862,7 @@ static int io_pp_zc_init(struct page_pool *pp) static void io_pp_zc_destroy(struct page_pool *pp) { struct io_zcrx_ifq *ifq = io_pp_to_ifq(pp); - struct io_...
0e2cebd72321caeef84b6ba7084e85be0287fb4b
Analyze and fix the following issue in the Linux kernel code: platform/mellanox: mlxbf-pmc: Use kstrtobool() to check 0/1 input
Problem Details: For setting the enable value, the input should be 0 or 1 only. Use kstrtobool() in place of kstrtoint() in mlxbf_pmc_enable_store() to accept only valid input. Fixes: 423c3361855c ("platform/mellanox: mlxbf-pmc: Add support for BlueField-3") Signed-off-by: Shravan Kumar Ramani <shravankr@nvidia.com> R...
```diff diff --git a/drivers/platform/mellanox/mlxbf-pmc.c b/drivers/platform/mellanox/mlxbf-pmc.c index c654b4bf141f..4776013e0764 100644 --- a/drivers/platform/mellanox/mlxbf-pmc.c +++ b/drivers/platform/mellanox/mlxbf-pmc.c @@ -1890,13 +1890,14 @@ static ssize_t mlxbf_pmc_enable_store(struct device *dev, { struct...
f8c1311769d3b2c82688b294b4ae03e94f1c326d
Analyze and fix the following issue in the Linux kernel code: platform/mellanox: mlxbf-pmc: Validate event/enable input
Problem Details: Before programming the event info, validate the event number received as input by checking if it exists in the event_list. Also fix a typo in the comment for mlxbf_pmc_get_event_name() to correctly mention that it returns the event name when taking the event number as input, and not the other way round...
```diff diff --git a/drivers/platform/mellanox/mlxbf-pmc.c b/drivers/platform/mellanox/mlxbf-pmc.c index 2b692a76398e..c654b4bf141f 100644 --- a/drivers/platform/mellanox/mlxbf-pmc.c +++ b/drivers/platform/mellanox/mlxbf-pmc.c @@ -1223,7 +1223,7 @@ static int mlxbf_pmc_get_event_num(const char *blk, const char *evt) ...
44e6ca8faeeed12206f3e7189c5ac618b810bb9c
Analyze and fix the following issue in the Linux kernel code: platform/mellanox: mlxbf-pmc: Remove newline char from event name input
Problem Details: Since the input string passed via the command line appends a newline char, it needs to be removed before comparison with the event_list. Fixes: 1a218d312e65 ("platform/mellanox: mlxbf-pmc: Add Mellanox BlueField PMC driver") Signed-off-by: Shravan Kumar Ramani <shravankr@nvidia.com> Reviewed-by: David...
```diff diff --git a/drivers/platform/mellanox/mlxbf-pmc.c b/drivers/platform/mellanox/mlxbf-pmc.c index a1c529f1ff1a..2b692a76398e 100644 --- a/drivers/platform/mellanox/mlxbf-pmc.c +++ b/drivers/platform/mellanox/mlxbf-pmc.c @@ -15,6 +15,7 @@ #include <linux/hwmon.h> #include <linux/platform_device.h> #include <li...
78eb18020a88a4eed15f5af7700ed570642ff8f1
Analyze and fix the following issue in the Linux kernel code: firmware: tegra: Fix IVC dependency problems
Problem Details: The IVC code is library code that other drivers need to select if they need that library. However, if the symbol is user-selectable this can lead to conflicts. Fix this by making the symbol only selectable for COMPILE_TEST and add a select TEGRA_IVC to TEGRA_BPMP, which is currently the only user. Li...
```diff diff --git a/drivers/firmware/tegra/Kconfig b/drivers/firmware/tegra/Kconfig index cde1ab8bd9d1..91f2320c0d0f 100644 --- a/drivers/firmware/tegra/Kconfig +++ b/drivers/firmware/tegra/Kconfig @@ -2,7 +2,7 @@ menu "Tegra firmware driver" config TEGRA_IVC - bool "Tegra IVC protocol" + bool "Tegra IVC protocol"...
5cddd546df0fa21316735d1d60fe826886e0dc21
Analyze and fix the following issue in the Linux kernel code: rust: pci: fix documentation related to Device instances
Problem Details: Device instances in the pci crate represent a valid struct pci_dev, not a struct device. Fixes: 7b948a2af6b5 ("rust: pci: fix unrestricted &mut pci::Device") Signed-off-by: Rahul Rameshbabu <sergeantsagara@protonmail.com> Link: https://lore.kernel.org/r/20250706035944.18442-3-sergeantsagara@protonmail...
```diff diff --git a/rust/kernel/pci.rs b/rust/kernel/pci.rs index 9afe2a8ed637..a1febfbfc7d7 100644 --- a/rust/kernel/pci.rs +++ b/rust/kernel/pci.rs @@ -250,7 +250,8 @@ pub trait Driver: Send { /// /// # Invariants /// -/// A [`Device`] instance represents a valid `struct device` created by the C portion of the ke...
d4e83784b2a9be58b938d55efb232d2751c4cab4
Analyze and fix the following issue in the Linux kernel code: platform/x86: dell-ddv: Fix taking the psy->extensions_sem lock twice
Problem Details: Calling power_supply_get_property() inside dell_wmi_ddv_battery_translate() can cause a deadlock since this function is also being called from the power supply extension code, in which case psy->extensions_sem is already being held. Fix this by using the new power_supply_get_property_direct() function...
```diff diff --git a/drivers/platform/x86/dell/dell-wmi-ddv.c b/drivers/platform/x86/dell/dell-wmi-ddv.c index 67f3d7158403..62e3d060f038 100644 --- a/drivers/platform/x86/dell/dell-wmi-ddv.c +++ b/drivers/platform/x86/dell/dell-wmi-ddv.c @@ -689,9 +689,13 @@ static int dell_wmi_ddv_battery_translate(struct dell_wmi_dd...
3ebed2fddf6fac5729ffc8c471c87d111b641678
Analyze and fix the following issue in the Linux kernel code: power: supply: core: Add power_supply_get/set_property_direct()
Problem Details: Power supply extensions might want to interact with the underlying power supply to retrieve data like serial numbers, charging status and more. However doing so causes psy->extensions_sem to be locked twice, possibly causing a deadlock. Provide special variants of power_supply_get/set_property() that ...
```diff diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/supply/power_supply_core.c index 33a5bfce4604..cfb0e3e0d4aa 100644 --- a/drivers/power/supply/power_supply_core.c +++ b/drivers/power/supply/power_supply_core.c @@ -1235,9 +1235,8 @@ bool power_supply_has_property(struct power_supply *psy, ...
8346c6af27f1c1410eb314f4be5875fdf1579a10
Analyze and fix the following issue in the Linux kernel code: platform/x86: alienware-wmi-wmax: Fix `dmi_system_id` array
Problem Details: Add missing empty member to `awcc_dmi_table`. Cc: stable@vger.kernel.org Fixes: 6d7f1b1a5db6 ("platform/x86: alienware-wmi: Split DMI table") Signed-off-by: Kurt Borja <kuurtb@gmail.com> Reviewed-by: Hans de Goede <hansg@kernel.org> Link: https://lore.kernel.org/r/20250707-dmi-fix-v1-1-6730835d824d@gm...
```diff diff --git a/drivers/platform/x86/dell/alienware-wmi-wmax.c b/drivers/platform/x86/dell/alienware-wmi-wmax.c index 20ec122a9fe0..1c21be25dba5 100644 --- a/drivers/platform/x86/dell/alienware-wmi-wmax.c +++ b/drivers/platform/x86/dell/alienware-wmi-wmax.c @@ -233,6 +233,7 @@ static const struct dmi_system_id awc...
d78f76457d70d30e80b5d2e067d45de7a0505fc0
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek: Enable headset Mic on Positivo K116J
Problem Details: Positivo K116J is equipped with ALC269VC, and needs a fix to make the headset mic to work. Also must to limits the internal microphone boost. Signed-off-by: Edson Juliano Drosdeck <edson.drosdeck@gmail.com> Link: https://patch.msgid.link/20250707114537.8291-1-edson.drosdeck@gmail.com Signed-off-by: Ta...
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index c7720a2f47c3..060db37eab83 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -11426,6 +11426,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x2782, 0x0228, "Infinix ZERO BO...
830a9e37cfb203aa0f73cd947eda89eda89cc48c
Analyze and fix the following issue in the Linux kernel code: coredump: fix PIDFD_INFO_COREDUMP ioctl check
Problem Details: In Commit 1d8db6fd698de1f73b1a7d72aea578fdd18d9a87 ("pidfs, coredump: add PIDFD_INFO_COREDUMP"), the following code was added: if (mask & PIDFD_INFO_COREDUMP) { kinfo.mask |= PIDFD_INFO_COREDUMP; kinfo.coredump_mask = READ_ONCE(pidfs_i(inode)->__pei.coredump_mask); } [...] ...
```diff diff --git a/fs/pidfs.c b/fs/pidfs.c index 69919be1c9d8..4625e097e3a0 100644 --- a/fs/pidfs.c +++ b/fs/pidfs.c @@ -319,7 +319,7 @@ static long pidfd_info(struct file *file, unsigned int cmd, unsigned long arg) if (!c) return -ESRCH; - if (!(kinfo.mask & PIDFD_INFO_COREDUMP)) { + if ((kinfo.mask & PIDFD_I...
cb863540e7c756abe7e709673a3e073c6a7aa8c0
Analyze and fix the following issue in the Linux kernel code: drm/bridge: tc358767: fix uninitialized variable regression
Problem Details: Commit a59a27176914 ("drm/bridge: tc358767: convert to devm_drm_bridge_alloc() API") split tc_probe_bridge_endpoint() in two functions, thus duplicating the loop over the endpoints in each of those functions. However it missed duplicating the of_graph_parse_endpoint() call which initializes the struct ...
```diff diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index 61559467e2d2..562fea47b3ec 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -2422,6 +2422,7 @@ static int tc_probe_bridge_endpoint(struct tc_data *tc, enum tc_mode mode) struct dev...
48f05c3b4b701ae7687fd44d462c88b7ac67e952
Analyze and fix the following issue in the Linux kernel code: drm/bridge: analogix_dp: Use devm_drm_bridge_alloc() API
Problem Details: devm_drm_bridge_alloc() is the new API to be used for allocating (and partially initializing) a private driver struct embedding a struct drm_bridge. Analogix DP driver somehow missed the automated conversion in commit 9c399719cfb9 ("drm: convert many bridge drivers from devm_kzalloc() to devm_drm_brid...
```diff diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index a1bc3e96dd35..ed35e567d117 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -1041,7 +1041,7 @@ static int analogix...
85e323bdbe28d4638aaefd8d9192763874efe9b0
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/tas2781: Fix calibration data parser issue
Problem Details: We will copy calibration data from position behind to front. We have created a variable (tmp_val) point on top of calibration data buffer, and tmp_val[1] is max of node number in original calibration data structure, it will be overwritten after first data copy, so can't be used as max node number check...
```diff diff --git a/sound/pci/hda/tas2781_hda.c b/sound/pci/hda/tas2781_hda.c index 5f1d4b3e9688..34217ce9f28e 100644 --- a/sound/pci/hda/tas2781_hda.c +++ b/sound/pci/hda/tas2781_hda.c @@ -44,7 +44,7 @@ static void tas2781_apply_calib(struct tasdevice_priv *p) TASDEVICE_REG(0, 0x13, 0x70), TASDEVICE_REG(0, 0x18...
b581e472d95d584d2e30e34f3e055d9754faddb2
Analyze and fix the following issue in the Linux kernel code: usb: gadget: f_fs: Remove unnecessary spinlocks.
Problem Details: Commit 24729b307eefc ("usb: gadget: f_fs: Fix race between aio_cancel() and AIO request complete") moved the call to usb_ep_free_request() from ffs_epfile_async_io_complete() to ffs_user_copy_worker(). In ffs_user_copy_worker(), ki_complete() is called before usb_ep_free_request(). Once ki_complete()...
```diff diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index 67fea7da4652..03308a065d5a 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@ -854,7 +854,6 @@ static void ffs_user_copy_worker(struct work_struct *work) work); int ret...
2b7eec2ec3015f52fc74cf45d0408925e984ecd1
Analyze and fix the following issue in the Linux kernel code: usb: early: xhci-dbc: Fix early_ioremap leak
Problem Details: Using the kernel param earlyprintk=xdbc,keep without proper hardware setup leads to this: [ ] xhci_dbc:early_xdbc_parse_parameter: dbgp_num: 0 ... [ ] xhci_dbc:early_xdbc_setup_hardware: failed to setup the connection to host ... [ ] calling kmemleak_late_init+0x0/0xa0 @ 1 [ ] kmemleak: Kernel ...
```diff diff --git a/drivers/usb/early/xhci-dbc.c b/drivers/usb/early/xhci-dbc.c index 341408410ed9..41118bba9197 100644 --- a/drivers/usb/early/xhci-dbc.c +++ b/drivers/usb/early/xhci-dbc.c @@ -681,6 +681,10 @@ int __init early_xdbc_setup_hardware(void) xdbc.table_base = NULL; xdbc.out_buf = NULL; + + early_i...
62783c30d78aecf9810dae46fd4d11420ad38b74
Analyze and fix the following issue in the Linux kernel code: USB: gadget: f_hid: Fix memory leak in hidg_bind error path
Problem Details: In hidg_bind(), if alloc_workqueue() fails after usb_assign_descriptors() has successfully allocated the USB descriptors, the current error handling does not call usb_free_all_descriptors() to free the allocated descriptors, resulting in a memory leak. Restructure the error handling by adding proper c...
```diff diff --git a/drivers/usb/gadget/function/f_hid.c b/drivers/usb/gadget/function/f_hid.c index 97a62b926415..8e1d1e884050 100644 --- a/drivers/usb/gadget/function/f_hid.c +++ b/drivers/usb/gadget/function/f_hid.c @@ -1278,18 +1278,19 @@ static int hidg_bind(struct usb_configuration *c, struct usb_function *f) ...
67a59f82196c8c4f50c83329f0577acfb1349b50
Analyze and fix the following issue in the Linux kernel code: usb: musb: fix gadget state on disconnect
Problem Details: When unplugging the USB cable or disconnecting a gadget in usb peripheral mode with echo "" > /sys/kernel/config/usb_gadget/<your_gadget>/UDC, /sys/class/udc/musb-hdrc.0/state does not change from USB_STATE_CONFIGURED. Testing on dwc2/3 shows they both update the state to USB_STATE_NOTATTACHED. Add c...
```diff diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 6869c58367f2..caf4d4cd4b75 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -1913,6 +1913,7 @@ static int musb_gadget_stop(struct usb_gadget *g) * gadget driver here and have everything work;...
737bb912ebbe4571195c56eba557c4d7315b26fb
Analyze and fix the following issue in the Linux kernel code: wifi: prevent A-MSDU attacks in mesh networks
Problem Details: This patch is a mitigation to prevent the A-MSDU spoofing vulnerability for mesh networks. The initial update to the IEEE 802.11 standard, in response to the FragAttacks, missed this case (CVE-2025-27558). It can be considered a variant of CVE-2020-24588 but for mesh networks. This patch tries to dete...
```diff diff --git a/net/wireless/util.c b/net/wireless/util.c index ed868c0f7ca8..1ad5a6bdfd75 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -820,6 +820,52 @@ bool ieee80211_is_valid_amsdu(struct sk_buff *skb, u8 mesh_hdr) } EXPORT_SYMBOL(ieee80211_is_valid_amsdu); + +/* + * Detects if an MSDU fram...
2ce6ad9262256dd345cb104ba0ac6cf4aeed25a3
Analyze and fix the following issue in the Linux kernel code: wifi: rt2x00: fix remove callback type mismatch
Problem Details: The function is used as remove callback for a platform driver. It was missed during the conversion from int to void Fixes: 0edb555a65d1 ("platform: Make platform_driver::remove() return void") Signed-off-by: Felix Fietkau <nbd@nbd.name> Link: https://patch.msgid.link/20250706092053.97724-1-nbd@nbd.nam...
```diff diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00soc.c b/drivers/net/wireless/ralink/rt2x00/rt2x00soc.c index eface610178d..f7f3a2340c39 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00soc.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00soc.c @@ -108,7 +108,7 @@ exit_free_device: } EXPORT_SYMBOL_G...
58fcb1b4287ce38850402bb2bb16d09bf77b91d9
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: reject VHT opmode for unsupported channel widths
Problem Details: VHT operating mode notifications are not defined for channel widths below 20 MHz. In particular, 5 MHz and 10 MHz are not valid under the VHT specification and must be rejected. Without this check, malformed notifications using these widths may reach ieee80211_chan_width_to_rx_bw(), leading to a WARN_...
```diff diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index d9d88f2f2831..954795b0fe48 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1959,6 +1959,20 @@ static int sta_link_apply_parameters(struct ieee80211_local *local, ieee80211_sta_init_nss(link_sta); if (params->opmode_notif_used) { + en...
3b602ddc0df723992721b0d286c90c9bdd755b34
Analyze and fix the following issue in the Linux kernel code: wifi: mwifiex: discard erroneous disassoc frames on STA interface
Problem Details: When operating in concurrent STA/AP mode with host MLME enabled, the firmware incorrectly sends disassociation frames to the STA interface when clients disconnect from the AP interface. This causes kernel warnings as the STA interface processes disconnect events that don't apply to it: [ 1303.240540] ...
```diff diff --git a/drivers/net/wireless/marvell/mwifiex/util.c b/drivers/net/wireless/marvell/mwifiex/util.c index 4c5b1de0e936..6882e90e90b2 100644 --- a/drivers/net/wireless/marvell/mwifiex/util.c +++ b/drivers/net/wireless/marvell/mwifiex/util.c @@ -459,7 +459,9 @@ mwifiex_process_mgmt_packet(struct mwifiex_privat...
e1e6ebf490e55fee1ae573aa443c1d4aea5e4a40
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: fix non-transmitted BSSID profile search
Problem Details: When the non-transmitted BSSID profile is found, immediately return from the search to not return the wrong profile_len when the profile is found in a multiple BSSID element that isn't the last one in the frame. Fixes: 5023b14cf4df ("mac80211: support profile split between elements") Reported-by: Mich...
```diff diff --git a/net/mac80211/parse.c b/net/mac80211/parse.c index 96584b39215e..c5e0f7f46004 100644 --- a/net/mac80211/parse.c +++ b/net/mac80211/parse.c @@ -758,7 +758,6 @@ static size_t ieee802_11_find_bssid_profile(const u8 *start, size_t len, { const struct element *elem, *sub; size_t profile_len = 0; - b...
c5fd399a24c8e2865524361f7dc4d4a6899be4f4
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: correctly identify S1G short beacon
Problem Details: mac80211 identifies a short beacon by the presence of the next TBTT field, however the standard actually doesn't explicitly state that the next TBTT can't be in a long beacon or even that it is required in a short beacon - and as a result this validation does not work for all vendor implementations. T...
```diff diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 22f39e5e2ff1..996be3c2cff0 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h @@ -662,18 +662,6 @@ static inline bool ieee80211_s1g_has_cssid(__le16 fc) (fc & cpu_to_le16(IEEE80211_S1G_BCN_CSSID)); } -/** - * ieee...
c1dc61aede55a571d34fe20415b1413a3c86ee24
Analyze and fix the following issue in the Linux kernel code: PCI: dwc: Make dw_pcie_ptm_ops static
Problem Details: dw_pcie_ptm_ops is not used outside of this file, so make it static. This also fixes the sparse warning: drivers/pci/controller/dwc/pcie-designware-debugfs.c:868:27: warning: symbol 'dw_pcie_ptm_ops' was not declared. Should it be static? Fixes: 852a1fdd34a8 ("PCI: dwc: Add debugfs support for PTM ...
```diff diff --git a/drivers/pci/controller/dwc/pcie-designware-debugfs.c b/drivers/pci/controller/dwc/pcie-designware-debugfs.c index 6f438a36f840..0fbf86c0b97e 100644 --- a/drivers/pci/controller/dwc/pcie-designware-debugfs.c +++ b/drivers/pci/controller/dwc/pcie-designware-debugfs.c @@ -865,7 +865,7 @@ static bool d...
fbe94be09fa81343d623a86ec64a742759b669b3
Analyze and fix the following issue in the Linux kernel code: arm64: dts: freescale: imx8mm-verdin: Keep LDO5 always on
Problem Details: LDO5 regulator is used to power the i.MX8MM NVCC_SD2 I/O supply, that is used for the SD2 card interface and also for some GPIOs. When the SD card interface is not enabled the regulator subsystem could turn off this supply, since it is not used anywhere else, however this will also remove the power to...
```diff diff --git a/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi index d29710772569..1594ce9182a5 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-verdin.dtsi @@ -464,6 +464,7 @@ }; reg_nvcc_sd: LDO...
6fdd4d8c84f36c4814ec7d499e9fb88b170669c5
Analyze and fix the following issue in the Linux kernel code: dt-bindings: vendor-prefixes: Document Argon40
Problem Details: Argon 40 Technologies Limited is a SBC expansion board vendor. Document the prefix. For details see https://argon40.com . Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Link: https://lore.kernel.org/r/20250629220757.936212-1-marek.vasut...
```diff diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 5d2a7a8d3ac6..e5e5bd34136a 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -149,6 +149,8 @@ patte...
0b4d1abe5ca568c5b7f667345ec2b5ad0fb2e54b
Analyze and fix the following issue in the Linux kernel code: pwm: rockchip: Round period/duty down on apply, up on get
Problem Details: With CONFIG_PWM_DEBUG=y, the rockchip PWM driver produces warnings like this: rockchip-pwm fd8b0010.pwm: .apply is supposed to round down duty_cycle (requested: 23529/50000, applied: 23542/50000) This is because the driver chooses ROUND_CLOSEST for purported idempotency reasons. However, it's pos...
```diff diff --git a/drivers/pwm/pwm-rockchip.c b/drivers/pwm/pwm-rockchip.c index c5f50e5eaf41..67b85bdb491b 100644 --- a/drivers/pwm/pwm-rockchip.c +++ b/drivers/pwm/pwm-rockchip.c @@ -8,6 +8,8 @@ #include <linux/clk.h> #include <linux/io.h> +#include <linux/limits.h> +#include <linux/math64.h> #include <linux/m...
6df3aac763fa995260ab0545c1e54f0c21b2feb8
Analyze and fix the following issue in the Linux kernel code: pwm: sifive: Fix rounding and idempotency issues in apply and get_state
Problem Details: This fix ensures consistent rounding and avoids mismatches between applied and reported PWM values that could trigger false idempotency failures in debug checks This change ensures: - real_period is now calculated using DIV_ROUND_UP_ULL() to avoid underestimation. - duty_cycle is rounded up to match t...
```diff diff --git a/drivers/pwm/pwm-sifive.c b/drivers/pwm/pwm-sifive.c index f3694801d3ee..4a07315b0744 100644 --- a/drivers/pwm/pwm-sifive.c +++ b/drivers/pwm/pwm-sifive.c @@ -118,7 +118,7 @@ static void pwm_sifive_update_clock(struct pwm_sifive_ddata *ddata, /* As scale <= 15 the shift operation cannot overflow...
7dbc4432ea6bf9d709391eb57f1e9fb44e99845a
Analyze and fix the following issue in the Linux kernel code: pwm: sifive: Fix PWM algorithm and clarify inverted compare behavior
Problem Details: The `frac` variable represents the pulse inactive time, and the result of this algorithm is the pulse active time. Therefore, we must reverse the result. Although the SiFive Reference Manual states "pwms >= pwmcmpX -> HIGH", the hardware behavior is inverted due to a fixed XNOR with 0. As a result, th...
```diff diff --git a/drivers/pwm/pwm-sifive.c b/drivers/pwm/pwm-sifive.c index d5b647e6be78..f3694801d3ee 100644 --- a/drivers/pwm/pwm-sifive.c +++ b/drivers/pwm/pwm-sifive.c @@ -4,11 +4,28 @@ * For SiFive's PWM IP block documentation please refer Chapter 14 of * Reference Manual : https://static.dev.sifive.com/FU5...
52d2d14d9e49b8c33ff718d2036084d0c92f23f1
Analyze and fix the following issue in the Linux kernel code: pwm: pxa: Add optional reset control
Problem Details: Support optional reset control for the PWM PXA driver. During probe, it acquires the reset controller using devm_reset_control_get_optional_exclusive_deasserted() to get and deassert the reset controller to enable the PWM channel. Signed-off-by: Guodong Xu <guodong@riscstar.com> Link: https://lore.ke...
```diff diff --git a/drivers/pwm/pwm-pxa.c b/drivers/pwm/pwm-pxa.c index 8a4a3d2df30d..0f5bdb0e395e 100644 --- a/drivers/pwm/pwm-pxa.c +++ b/drivers/pwm/pwm-pxa.c @@ -25,6 +25,7 @@ #include <linux/io.h> #include <linux/pwm.h> #include <linux/of.h> +#include <linux/reset.h> #include <asm/div64.h> @@ -161,6 +162,...
505b730ede7f5c4083ff212aa955155b5b92e574
Analyze and fix the following issue in the Linux kernel code: pwm: mediatek: Ensure to disable clocks in error path
Problem Details: After enabling the clocks each error path must disable the clocks again. One of them failed to do so. Unify the error paths to use goto to make it harder for future changes to add a similar bug. Fixes: 7ca59947b5fc ("pwm: mediatek: Prevent divide-by-zero in pwm_mediatek_config()") Signed-off-by: Uwe K...
```diff diff --git a/drivers/pwm/pwm-mediatek.c b/drivers/pwm/pwm-mediatek.c index 7eaab5831499..33d3554b9197 100644 --- a/drivers/pwm/pwm-mediatek.c +++ b/drivers/pwm/pwm-mediatek.c @@ -130,8 +130,10 @@ static int pwm_mediatek_config(struct pwm_chip *chip, struct pwm_device *pwm, return ret; clk_rate = clk_get_...
9ee124caae1b0defd0e02c65686f539845a3ac9b
Analyze and fix the following issue in the Linux kernel code: pwm: Fix invalid state detection
Problem Details: Commit 9dd42d019e63 ("pwm: Allow pwm state transitions from an invalid state") intended to allow some state transitions that were not allowed before. The idea is sane and back then I also got the code comment right, but the check for enabled is bogus. This resulted in state transitions for enabled stat...
```diff diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index 4d842c692194..edf776b8ad53 100644 --- a/drivers/pwm/core.c +++ b/drivers/pwm/core.c @@ -596,7 +596,7 @@ static bool pwm_state_valid(const struct pwm_state *state) * and supposed to be ignored. So also ignore any strange values and * consider the s...
09d231ab569ca97478445ccc1ad44ab026de39b1
Analyze and fix the following issue in the Linux kernel code: RDMA/bnxt_re: Fix size of uverbs_copy_to() in BNXT_RE_METHOD_GET_TOGGLE_MEM
Problem Details: Since both "length" and "offset" are of type u32, there is no functional issue here. Reviewed-by: Saravanan Vajravel <saravanan.vajravel@broadcom.com> Signed-off-by: Shravya KN <shravya.k-n@broadcom.com> Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Link: https://patch.msgid.link/2025...
```diff diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c index 063801384b2b..3a627acb82ce 100644 --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c @@ -4738,7 +4738,7 @@ static int UVERBS_HANDLER(BNXT_RE_METHOD_GET_TOGGLE_MEM)(st...
79d56805c5068f2bc81518043e043c3dedd1c82a
Analyze and fix the following issue in the Linux kernel code: RDMA/hns: Fix -Wframe-larger-than issue
Problem Details: Fix -Wframe-larger-than issue by allocating memory for qpc struct with kzalloc() instead of using stack memory. Fixes: 606bf89e98ef ("RDMA/hns: Refactor for hns_roce_v2_modify_qp function") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202506240032.CSgIyF...
```diff diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c index 2e9ef2fb8019..64bca08f3f1a 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c @@ -5349,11 +5349,10 @@ static int hns_roce_v2_modify_qp(struct ib_qp *ib...
5338abb299f0cd764edf78a7e71a0b746af35030
Analyze and fix the following issue in the Linux kernel code: RDMA/hns: Drop GFP_NOWARN
Problem Details: GFP_NOWARN silences all warnings on dma_alloc_coherent() failure, which might otherwise help with troubleshooting. Fixes: 9a4435375cd1 ("IB/hns: Add driver files for hns RoCE driver") Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> Link: https://patch.msgid.link/20250703113905.3597124-6-hua...
```diff diff --git a/drivers/infiniband/hw/hns/hns_roce_hem.c b/drivers/infiniband/hw/hns/hns_roce_hem.c index ca0798224e56..3d479c63b117 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hem.c +++ b/drivers/infiniband/hw/hns/hns_roce_hem.c @@ -249,15 +249,12 @@ int hns_roce_calc_hem_mhop(struct hns_roce_dev *hr_dev, } ...
278c18a4a78a9a6bf529ef45ccde512a5686ea9d
Analyze and fix the following issue in the Linux kernel code: RDMA/hns: Fix accessing uninitialized resources
Problem Details: hr_dev->pgdir_list and hr_dev->pgdir_mutex won't be initialized if CQ/QP record db are not enabled, but they are also needed when using SRQ with SRQ record db enabled. Simplified the logic by always initailizing the reosurces. Fixes: c9813b0b9992 ("RDMA/hns: Support SRQ record doorbell") Signed-off-by...
```diff diff --git a/drivers/infiniband/hw/hns/hns_roce_main.c b/drivers/infiniband/hw/hns/hns_roce_main.c index 427dd700cddc..d50f36f8a110 100644 --- a/drivers/infiniband/hw/hns/hns_roce_main.c +++ b/drivers/infiniband/hw/hns/hns_roce_main.c @@ -937,10 +937,7 @@ err_unmap_dmpt: static void hns_roce_teardown_hca(struc...
2c2ec0106c0f1f12d4eefd11de318ac47557a750
Analyze and fix the following issue in the Linux kernel code: RDMA/hns: Get message length of ack_req from FW
Problem Details: ACK_REQ_FREQ indicates the number of packets (after MTU fragmentation) HW sends before setting an ACK request. When MTU is greater than or equal to 1024, the current ACK_REQ_FREQ value causes HW to request an ACK for every MTU fragment. The processing of a large number of ACKs severely impacts HW perfo...
```diff diff --git a/drivers/infiniband/hw/hns/hns_roce_device.h b/drivers/infiniband/hw/hns/hns_roce_device.h index 40dcf77e2d92..25f77b1fa773 100644 --- a/drivers/infiniband/hw/hns/hns_roce_device.h +++ b/drivers/infiniband/hw/hns/hns_roce_device.h @@ -846,6 +846,7 @@ struct hns_roce_caps { u16 default_ceq_arm_st;...
005b6187705bc9723518ce19c5cb911fc1f7ef07
Analyze and fix the following issue in the Linux kernel code: refscale: Check that nreaders and loops multiplication doesn't overflow
Problem Details: The nreaders and loops variables are exposed as module parameters, which, in certain combinations, can lead to multiplication overflow. Besides, loops parameter is defined as long, while through the code is used as int, which can cause truncation on 64-bit kernels and possible zeroes where they should...
```diff diff --git a/kernel/rcu/refscale.c b/kernel/rcu/refscale.c index f11a7c2af778..ab7fcdc94cc0 100644 --- a/kernel/rcu/refscale.c +++ b/kernel/rcu/refscale.c @@ -85,7 +85,7 @@ torture_param(int, holdoff, IS_BUILTIN(CONFIG_RCU_REF_SCALE_TEST) ? 10 : 0, // Number of typesafe_lookup structures, that is, the degree o...
a33ad03aaed2c39d29a27a64ee55ff919810de59
Analyze and fix the following issue in the Linux kernel code: rcu/nocb: Dump gp state even if rdp gp itself is not offloaded
Problem Details: When a stall is detected, the state of each NOCB CPU is dumped along with the state of each NOCB group. The latter part however is incidentally ignored if the NOCB group leader happens not to be offloaded itself. Fix this to make sure related precious informations aren't lost over a stall report. Rep...
```diff diff --git a/kernel/rcu/tree_nocb.h b/kernel/rcu/tree_nocb.h index b473ff056f49..cb29b6bb0ed4 100644 --- a/kernel/rcu/tree_nocb.h +++ b/kernel/rcu/tree_nocb.h @@ -1564,6 +1564,9 @@ static void show_rcu_nocb_state(struct rcu_data *rdp) if (rdp->nocb_gp_rdp == rdp) show_rcu_nocb_gp_state(rdp); + if (!rcu_s...
181698af38d3f93381229ad89c09b5bd0496661a
Analyze and fix the following issue in the Linux kernel code: crypto: ccp - Fix crash when rebind ccp device for ccp.ko
Problem Details: When CONFIG_CRYPTO_DEV_CCP_DEBUGFS is enabled, rebinding the ccp device causes the following crash: $ echo '0000:0a:00.2' > /sys/bus/pci/drivers/ccp/unbind $ echo '0000:0a:00.2' > /sys/bus/pci/drivers/ccp/bind [ 204.976930] BUG: kernel NULL pointer dereference, address: 0000000000000098 [ 204.97802...
```diff diff --git a/drivers/crypto/ccp/ccp-debugfs.c b/drivers/crypto/ccp/ccp-debugfs.c index a1055554b47a..dc26bc22c91d 100644 --- a/drivers/crypto/ccp/ccp-debugfs.c +++ b/drivers/crypto/ccp/ccp-debugfs.c @@ -319,5 +319,8 @@ void ccp5_debugfs_setup(struct ccp_device *ccp) void ccp5_debugfs_destroy(void) { + mutex...
735b72568c73875269a6b73ab9543a70f6ac8a9f
Analyze and fix the following issue in the Linux kernel code: crypto: jitter - fix intermediary handling
Problem Details: The intermediary value was included in the wrong hash state. While there, adapt to user-space by setting the timestamp to 0 if stuck and inserting the values nevertheless. Acked-by: Stephan Mueller <smueller@chronox.de> Signed-off-by: Markus Theil <theil.markus@gmail.com> Signed-off-by: Herbert Xu <he...
```diff diff --git a/crypto/jitterentropy-kcapi.c b/crypto/jitterentropy-kcapi.c index c24d4ff2b4a8..1266eb790708 100644 --- a/crypto/jitterentropy-kcapi.c +++ b/crypto/jitterentropy-kcapi.c @@ -144,7 +144,7 @@ int jent_hash_time(void *hash_state, __u64 time, u8 *addtl, * Inject the data from the previous loop into ...
cb7fa6b6fc71e0c801e271aa498e2f19e6df2931
Analyze and fix the following issue in the Linux kernel code: crypto: inside-secure - Fix `dma_unmap_sg()` nents value
Problem Details: The `dma_unmap_sg()` functions should be called with the same nents as the `dma_map_sg()`, not the value the map function returned. Fixes: c957f8b3e2e5 ("crypto: inside-secure - avoid unmapping DMA memory that was not mapped") Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com> Reviewed-by: Antoi...
```diff diff --git a/drivers/crypto/inside-secure/safexcel_hash.c b/drivers/crypto/inside-secure/safexcel_hash.c index d2b632193beb..5baf4bd2fcee 100644 --- a/drivers/crypto/inside-secure/safexcel_hash.c +++ b/drivers/crypto/inside-secure/safexcel_hash.c @@ -249,7 +249,9 @@ static int safexcel_handle_req_result(struct ...
b4abeccb8d39db7d9b51cb0098d6458760b30a75
Analyze and fix the following issue in the Linux kernel code: crypto: ccp - Fix locking on alloc failure handling
Problem Details: The __snp_alloc_firmware_pages() helper allocates pages in the firmware state (alloc + rmpupdate). In case of failed rmpupdate, it tries reclaiming pages with already changed state. This requires calling the PSP firmware and since there is sev_cmd_mutex to guard such calls, the helper takes a "locked" ...
```diff diff --git a/drivers/crypto/ccp/sev-dev.c b/drivers/crypto/ccp/sev-dev.c index 17edc6bf5622..e058ba027792 100644 --- a/drivers/crypto/ccp/sev-dev.c +++ b/drivers/crypto/ccp/sev-dev.c @@ -434,7 +434,7 @@ cleanup: return rc; } -static struct page *__snp_alloc_firmware_pages(gfp_t gfp_mask, int order) +static...
fcb96956c921f1aae7e7b477f2435c56f77a31b4
Analyze and fix the following issue in the Linux kernel code: hfsplus: remove mutex_lock check in hfsplus_free_extents
Problem Details: Syzbot reported an issue in hfsplus filesystem: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 4400 at fs/hfsplus/extents.c:346 hfsplus_free_extents+0x700/0xad0 Call Trace: <TASK> hfsplus_file_truncate+0x768/0xbb0 fs/hfsplus/extents.c:606 hfsplus_write_begin+0xc2/0xd0 fs/hfsplus/inode.c:56...
```diff diff --git a/fs/hfsplus/extents.c b/fs/hfsplus/extents.c index a6d61685ae79..b1699b3c246a 100644 --- a/fs/hfsplus/extents.c +++ b/fs/hfsplus/extents.c @@ -342,9 +342,6 @@ static int hfsplus_free_extents(struct super_block *sb, int i; int err = 0; - /* Mapping the allocation file may lock the extent tree *...
4c831f30475a222046ded25560c3810117a6cff6
Analyze and fix the following issue in the Linux kernel code: hfs: make splice write available again
Problem Details: Since 5.10, splice() or sendfile() return EINVAL. This was caused by commit 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops"). This patch initializes the splice_write field in file_operations, like most file systems do, to restore the functionality. Fixes: 36e2c7421f02 ("fs: don...
```diff diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c index a81ce7a740b9..451115360f73 100644 --- a/fs/hfs/inode.c +++ b/fs/hfs/inode.c @@ -692,6 +692,7 @@ static const struct file_operations hfs_file_operations = { .write_iter = generic_file_write_iter, .mmap = generic_file_mmap, .splice_read = filemap_splice_re...
2eafb669da0bf71fac0838bff13594970674e2b4
Analyze and fix the following issue in the Linux kernel code: hfsplus: make splice write available again
Problem Details: Since 5.10, splice() or sendfile() return EINVAL. This was caused by commit 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops"). This patch initializes the splice_write field in file_operations, like most file systems do, to restore the functionality. Fixes: 36e2c7421f02 ("fs: don...
```diff diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c index f331e9574217..c85b5802ec0f 100644 --- a/fs/hfsplus/inode.c +++ b/fs/hfsplus/inode.c @@ -368,6 +368,7 @@ static const struct file_operations hfsplus_file_operations = { .write_iter = generic_file_write_iter, .mmap = generic_file_mmap, .splice_read...
d3ed6d6981f4756f145766753c872482bc3b28d3
Analyze and fix the following issue in the Linux kernel code: hfs: fix not erasing deleted b-tree node issue
Problem Details: The generic/001 test of xfstests suite fails and corrupts the HFS volume: sudo ./check generic/001 FSTYP -- hfs PLATFORM -- Linux/x86_64 hfsplus-testing-0001 6.15.0-rc2+ #3 SMP PREEMPT_DYNAMIC Fri Apr 25 17:13:00 PDT 2> MKFS_OPTIONS -- /dev/loop51 MOUNT_OPTIONS -- /dev/loop51 /mnt/scratc...
```diff diff --git a/fs/hfs/bnode.c b/fs/hfs/bnode.c index cb823a8a6ba9..50ed4c855364 100644 --- a/fs/hfs/bnode.c +++ b/fs/hfs/bnode.c @@ -482,6 +482,7 @@ void hfs_bnode_put(struct hfs_bnode *node) if (test_bit(HFS_BNODE_DELETED, &node->flags)) { hfs_bnode_unhash(node); spin_unlock(&tree->hash_lock); + hfs...
31df8330ee3f161e589896aeca0cbf5a5edcd5db
Analyze and fix the following issue in the Linux kernel code: docs/zh_CN: update git command examples in how-to.rst
Problem Details: This patch leverages `checkout -b` to shorten branch & checkout and fix the missing checkout. Signed-off-by: Dongliang Mu <dzm91@hust.edu.cn> Acked-by: Yanteng Si <si.yanteng@linux.dev> Signed-off-by: Alex Shi <alexs@kernel.org>
```diff diff --git a/Documentation/translations/zh_CN/how-to.rst b/Documentation/translations/zh_CN/how-to.rst index fa1dc46c2b4a..ddd99c0f9b4d 100644 --- a/Documentation/translations/zh_CN/how-to.rst +++ b/Documentation/translations/zh_CN/how-to.rst @@ -185,8 +185,7 @@ Git 和邮箱配置 请执行以下命令,新建开发分支:: git checkout docs...
c8995932db2bad6fa093ac64dbaf7a3e8870eafa
Analyze and fix the following issue in the Linux kernel code: m68k: mac: Improve clocksource driver commentary
Problem Details: qemu-system-m68k -M q800 has an old bug that causes the kernel to occasionally complain about a soft lockup: watchdog: BUG: soft lockup - CPU#0 stuck for 5107s! There isn't any actual lockup. The via1 clocksource produced a large jump in jiffies, causing the watchdog to detect a stale timestamp. ...
```diff diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c index 01e6b0e37f8d..9cb813eda4fd 100644 --- a/arch/m68k/mac/via.c +++ b/arch/m68k/mac/via.c @@ -621,6 +621,22 @@ static u64 mac_read_clk(struct clocksource *cs) * These problems are avoided by ignoring the low byte. Clock accuracy * is 256 times worse...
83f672a7f69ec38b1bbb27221e342937f68c11c7
Analyze and fix the following issue in the Linux kernel code: m68k: Don't unregister boot console needlessly
Problem Details: When MACH_IS_MVME147, the boot console calls mvme147_scc_write() to generate console output. That will continue to work even after debug_cons_nputs() becomes unavailable so there's no need to unregister the boot console. Take the opportunity to remove a repeated MACH_IS_* test. Use the actual .write m...
```diff diff --git a/arch/m68k/Kconfig.debug b/arch/m68k/Kconfig.debug index 30638a6e8edc..d036f903864c 100644 --- a/arch/m68k/Kconfig.debug +++ b/arch/m68k/Kconfig.debug @@ -10,7 +10,7 @@ config BOOTPARAM_STRING config EARLY_PRINTK bool "Early printk" - depends on !(SUN3 || M68000 || COLDFIRE) + depends on MMU_MO...
e911044c28ed200c3dcf59bf532e092e770488d0
Analyze and fix the following issue in the Linux kernel code: m68k: Remove unused "cursor home" code from debug console
Problem Details: The cursor home operation is unused and seems undesirable for logging. Remove it. The console_not_cr label actually means "not line feed and not carriage return either" so take the opportunity to replace it with something less confusing. Rectify some inconsistent whitespace while we're here. Signed-of...
```diff diff --git a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S index 49e079b0d0b5..6465333d5f7c 100644 --- a/arch/m68k/kernel/head.S +++ b/arch/m68k/kernel/head.S @@ -3555,28 +3555,21 @@ func_start console_putc,%a0/%a1/%d0-%d7 jra L(console_exit) L(console_not_lf): - cmpib #13,%d7 - jne L(console_not_cr) +...
0da6458417d74449e5daf845cdd4eb4d6ec6ec87
Analyze and fix the following issue in the Linux kernel code: m68k: Avoid pointless recursion in debug console rendering
Problem Details: The recursive call to console_putc to effect a carriage return is needlessly slow and complicated. Instead, just clear the column counter directly. Setup %a0 earlier to avoid a repeated comparison. Signed-off-by: Finn Thain <fthain@linux-m68k.org> Tested-by: Stan Johnson <userm57@yahoo.com> Reviewed-b...
```diff diff --git a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S index 9bd8adaa756d..49e079b0d0b5 100644 --- a/arch/m68k/kernel/head.S +++ b/arch/m68k/kernel/head.S @@ -3533,19 +3533,16 @@ func_start console_putc,%a0/%a1/%d0-%d7 tstl %pc@(L(console_font)) jeq L(console_exit) + lea %pc@(L(console_globals)),%...
210a1ce8ed4391b64a888b3fb4b5611a13f5ccc7
Analyze and fix the following issue in the Linux kernel code: m68k: Fix lost column on framebuffer debug console
Problem Details: Move the cursor position rightward after rendering the character, not before. This avoids complications that arise when the recursive console_putc call has to wrap the line and/or scroll the display. This also fixes the linewrap bug that crops off the rightmost column. When the cursor is at the bottom...
```diff diff --git a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S index 852255cf60de..9bd8adaa756d 100644 --- a/arch/m68k/kernel/head.S +++ b/arch/m68k/kernel/head.S @@ -3400,6 +3400,7 @@ L(console_clear_loop): movel %d4,%d1 /* screen height in pixels */ divul %a0@(FONT_DESC_HEIGHT),%d1 /* d1 = max num ro...
47ae96104b16fa467f52feac8f2227915b5f0d04
Analyze and fix the following issue in the Linux kernel code: dt-bindings: iio: adc: nxp,lpc3220-adc: allow clocks property
Problem Details: Allow clocks property to fix below CHECK_DTB warning: arch/arm/boot/dts/nxp/lpc/lpc3250-ea3250.dtb: adc@40048000 (nxp,lpc3220-adc): 'clocks' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Frank Li <Frank.Li@nxp.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patc...
```diff diff --git a/Documentation/devicetree/bindings/iio/adc/nxp,lpc3220-adc.yaml b/Documentation/devicetree/bindings/iio/adc/nxp,lpc3220-adc.yaml index 2c5032be83bd..fd815ab30df1 100644 --- a/Documentation/devicetree/bindings/iio/adc/nxp,lpc3220-adc.yaml +++ b/Documentation/devicetree/bindings/iio/adc/nxp,lpc3220-ad...
d0a48dc4df5c986bf8c3caf4d8fc15c480273052
Analyze and fix the following issue in the Linux kernel code: selftests/futex: Convert 32-bit timespec to 64-bit version for 32-bit compatibility mode
Problem Details: sys_futex_wait() expects a struct __kernel_timespec pointer for the timeout, but the provided struct timespec pointer is of type struct old_timespec32 when compiled for 32-bit architectures, unless they use 64-bit timespecs already. Make it work for all variants by converting the provided timespec val...
```diff diff --git a/tools/testing/selftests/futex/include/futex2test.h b/tools/testing/selftests/futex/include/futex2test.h index ea79662405bc..1f625b39948a 100644 --- a/tools/testing/selftests/futex/include/futex2test.h +++ b/tools/testing/selftests/futex/include/futex2test.h @@ -4,6 +4,7 @@ * * Copyright 2021 Co...
4a40129087a4c32135bb1177a57bbbe6ee646f1a
Analyze and fix the following issue in the Linux kernel code: selftests/nolibc: correctly report errors from printf() and friends
Problem Details: When an error is encountered by printf() it needs to be reported. errno() is already set by the callback. sprintf() is different, but that keeps working and is already tested. Also add a new test. Fixes: 7e4346f4a3a6 ("tools/nolibc/stdio: add a minimal [vf]printf() implementation") Signed-off-by: Th...
```diff diff --git a/tools/include/nolibc/stdio.h b/tools/include/nolibc/stdio.h index c470d334ef3f..7630234408c5 100644 --- a/tools/include/nolibc/stdio.h +++ b/tools/include/nolibc/stdio.h @@ -358,11 +358,11 @@ int __nolibc_printf(__nolibc_printf_cb cb, intptr_t state, size_t n, const char n -= w; while (wi...
a094f846276068d21878b47cf552cf18ee3720fb
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/tas2781: Add bus name in device name check
Problem Details: Device name start from bus name, as we use strstarts() to do compare, need add it for TXNW2781 device. Fixes: b2904df0a347 ("ALSA: hda/tas2781: Add compatible for hardware id TIAS2781 and TXNW2781") Signed-off-by: Baojun Xu <baojun.xu@ti.com> Link: https://patch.msgid.link/20250705025333.24346-1-baoju...
```diff diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c index b9cdbca951e4..530c2266ab3b 100644 --- a/sound/pci/hda/tas2781_hda_i2c.c +++ b/sound/pci/hda/tas2781_hda_i2c.c @@ -588,7 +588,7 @@ static int tas2781_hda_i2c_probe(struct i2c_client *clt) hda_priv->save_calibration = tas2781_...
46b0a67e8f22d2dbc679b37b26c5ff0f50424847
Analyze and fix the following issue in the Linux kernel code: selftests/futex: Add futex_numa to .gitignore
Problem Details: futex_numa was never added to the .gitignore file. Add it. Fixes: 9140f57c1c13 ("futex,selftests: Add another FUTEX2_NUMA selftest") Signed-off-by: Terry Tritton <terry.tritton@linaro.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: André Almeida <andrealmeid@igalia.com> Link: htt...
```diff diff --git a/tools/testing/selftests/futex/functional/.gitignore b/tools/testing/selftests/futex/functional/.gitignore index 7b24ae89594a..776ad658f75e 100644 --- a/tools/testing/selftests/futex/functional/.gitignore +++ b/tools/testing/selftests/futex/functional/.gitignore @@ -11,3 +11,4 @@ futex_wait_timeout ...
998b41cb20b02c4e28ac558e4e7f8609d659ec05
Analyze and fix the following issue in the Linux kernel code: RDMA/hns: Fix HW configurations not cleared in error flow
Problem Details: hns_roce_clear_extdb_list_info() will eventually do some HW configurations through FW, and they need to be cleared by calling hns_roce_function_clear() when the initialization fails. Fixes: 7e78dd816e45 ("RDMA/hns: Clear extended doorbell info before using") Signed-off-by: wenglianfa <wenglianfa@huawe...
```diff diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c index 602c5a4c682a..4f2dbc3ffb31 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c @@ -3001,7 +3001,7 @@ static int hns_roce_v2_init(struct hns_roce_dev *hr...
c6957b95ecc5b63c5a4bb4ecc28af326cf8f6dc8
Analyze and fix the following issue in the Linux kernel code: RDMA/hns: Fix double destruction of rsv_qp
Problem Details: rsv_qp may be double destroyed in error flow, first in free_mr_init(), and then in hns_roce_exit(). Fix it by moving the free_mr_init() call into hns_roce_v2_init(). list_del corruption, ffff589732eb9b50->next is LIST_POISON1 (dead000000000100) WARNING: CPU: 8 PID: 1047115 at lib/list_debug.c:53 __lis...
```diff diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c index 3e1189f456b9..602c5a4c682a 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c @@ -2986,14 +2986,22 @@ static int hns_roce_v2_init(struct hns_roce_dev *...
0980de01da08338d4a7ceaf5e7ab25a56142c75a
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: 8852b: Fix rtw8852b_pwr_{on,off}_func() for USB
Problem Details: There are a few differences in the power on/off functions between PCIE and USB. The changes in the power off function in particular are needed for the RTL8832BU to be able to power on again after it's powered off. While the RTL8832BU appears to work without the changes in the power on function, it's p...
```diff diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852b.c b/drivers/net/wireless/realtek/rtw89/rtw8852b.c index b0b73a4a70a0..85b6849db798 100644 --- a/drivers/net/wireless/realtek/rtw89/rtw8852b.c +++ b/drivers/net/wireless/realtek/rtw89/rtw8852b.c @@ -299,7 +299,8 @@ static int rtw8852b_pwr_on_func(struct rt...
40818680d8350dc35b1d1ac31c75038d13461126
Analyze and fix the following issue in the Linux kernel code: drm/bridge: adv7511: Fix DRM_BRIDGE_OP_HDMI_{AUDIO|CEC_ADAPTER} setup
Problem Details: When driver is built with either CONFIG_DRM_I2C_ADV7511_AUDIO or CONFIG_DRM_I2C_ADV7511_CEC disabled, drm_bridge_connector_init() is expected to fail with -EINVAL. That is because all required audio (or CEC) related callbacks in adv7511_bridge_funcs ended up being NULL. Set DRM_BRIDGE_OP_HDMI_AUDIO a...
```diff diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c index 9df18a8f2e37..f59d19b4b81a 100644 --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c @@ -1262,9 +1262,7 @@ static int adv7511_probe(struct i2c_client ...
b78287c54bd87924ee328d51336b44a74304d7cc
Analyze and fix the following issue in the Linux kernel code: drm/bridge: Fix kdoc comment for DRM_BRIDGE_OP_HDMI_CEC_ADAPTER
Problem Details: Correct the kernel-doc comment for DRM_BRIDGE_OP_HDMI_CEC_ADAPTER member of enum drm_bridge_ops. This seems to be just a copy-paste artifact from DRM_BRIDGE_OP_HDMI_CEC_NOTIFIER above. Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov...
```diff diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h index 7f66f9018c10..d2454ba83db3 100644 --- a/include/drm/drm_bridge.h +++ b/include/drm/drm_bridge.h @@ -1051,7 +1051,7 @@ enum drm_bridge_ops { */ DRM_BRIDGE_OP_HDMI_CEC_NOTIFIER = BIT(7), /** - * @DRM_BRIDGE_OP_HDMI_CEC_ADAPTER: The bri...
8290d37ad2b087bbcfe65fa5bcaf260e184b250a
Analyze and fix the following issue in the Linux kernel code: drm/msm: Small function param doc fix
Problem Details: Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202507032334.9SCwc952-lkp@intel.com/ Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
```diff diff --git a/drivers/gpu/drm/msm/msm_gem_vma.c b/drivers/gpu/drm/msm/msm_gem_vma.c index 1ad67dfa94e3..3cd8562a5109 100644 --- a/drivers/gpu/drm/msm/msm_gem_vma.c +++ b/drivers/gpu/drm/msm/msm_gem_vma.c @@ -171,7 +171,7 @@ msm_gem_vm_free(struct drm_gpuvm *gpuvm) /** * msm_gem_vm_unusable() - Mark a VM as ...
63a83463d278ea9f9eff7f58708322856e106d87
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix bch2_btree_transactions_read() synchronization
Problem Details: Since we're accessing btree_trans objects owned by another thread, we need to guard against using pointers to freed key cache entries: we need our own srcu read lock, and we should skip a btree_trans if it didn't hold the srcu lock (and thus it might have pointers to freed key cache entries). 00693 Me...
```diff diff --git a/fs/bcachefs/debug.c b/fs/bcachefs/debug.c index 79d64052215c..07c2a0f73cc2 100644 --- a/fs/bcachefs/debug.c +++ b/fs/bcachefs/debug.c @@ -584,6 +584,8 @@ static ssize_t bch2_btree_transactions_read(struct file *file, char __user *buf, i->ubuf = buf; i->size = size; i->ret = 0; + + int srcu_id...
14dd95647ea533c7d7c528b9bb7e163e433b47b9
Analyze and fix the following issue in the Linux kernel code: bcachefs: btree read retry fixes
Problem Details: Fix btree node read retries after validate errors: __btree_err() is the wrong place to flag a topology error: that is done by btree_lost_data(). Additionally, some calls to bch2_bkey_pick_read_device() were not updated in the 6.16 rework for improved log messages; we were failing to signal that we st...
```diff diff --git a/fs/bcachefs/btree_io.c b/fs/bcachefs/btree_io.c index e874a4357f64..a4cc72986e36 100644 --- a/fs/bcachefs/btree_io.c +++ b/fs/bcachefs/btree_io.c @@ -568,9 +568,9 @@ static int __btree_err(int ret, bch2_mark_btree_validate_failure(failed, ca->dev_idx); struct extent_ptr_decoded pick; - hav...
19920ab98e17af4e733ec4c69881d8ce433d3f1d
Analyze and fix the following issue in the Linux kernel code: drm/display: hdmi-cec-helper: Fix adapter unregistration
Problem Details: Attempting to reload a kernel module of an HDMI driver making use of the new CEC helpers revealed a resource deallocation issue, i.e. the entries in /dev/cec* keep growing. Moreover, after a couple of tries the kernel crashes and the whole system freezes: [ 47.515950] Unable to handle kernel paging...
```diff diff --git a/drivers/gpu/drm/display/drm_hdmi_cec_helper.c b/drivers/gpu/drm/display/drm_hdmi_cec_helper.c index b4273c3522fa..3651ad0f76e0 100644 --- a/drivers/gpu/drm/display/drm_hdmi_cec_helper.c +++ b/drivers/gpu/drm/display/drm_hdmi_cec_helper.c @@ -69,7 +69,7 @@ static void drm_connector_hdmi_cec_adapter_...
c17fb542dbd1db745c9feac15617056506dd7195
Analyze and fix the following issue in the Linux kernel code: md/md-bitmap: fix GPF in bitmap_get_stats()
Problem Details: The commit message of commit 6ec1f0239485 ("md/md-bitmap: fix stats collection for external bitmaps") states: Remove the external bitmap check as the statistics should be available regardless of bitmap storage location. Return -EINVAL only for invalid bitmap with no storage (neither in ...
```diff diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c index bd694910b01b..7f524a26cebc 100644 --- a/drivers/md/md-bitmap.c +++ b/drivers/md/md-bitmap.c @@ -2366,8 +2366,7 @@ static int bitmap_get_stats(void *data, struct md_bitmap_stats *stats) if (!bitmap) return -ENOENT; - if (!bitmap->mddev->bi...
5fa31c49928139fa948f078b094d80f12ed83f5f
Analyze and fix the following issue in the Linux kernel code: md/raid1,raid10: strip REQ_NOWAIT from member bios
Problem Details: RAID layers don't implement proper non-blocking semantics for REQ_NOWAIT, making the flag potentially misleading when propagated to member disks. This patch clear REQ_NOWAIT from cloned bios in raid1/raid10. Retain original bio's REQ_NOWAIT flag for upper layer error handling. Maybe we can implement ...
```diff diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index fd4ce2a4136f..64b8176907a9 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -1399,7 +1399,7 @@ static void raid1_read_request(struct mddev *mddev, struct bio *bio, } read_bio = bio_alloc_clone(mirror->rdev->bdev, bio, gfp, &mddev-...
43806c3d5b9bb7d74ba4e33a6a8a41ac988bde24
Analyze and fix the following issue in the Linux kernel code: raid10: cleanup memleak at raid10_make_request
Problem Details: If raid10_read_request or raid10_write_request registers a new request and the REQ_NOWAIT flag is set, the code does not free the malloc from the mempool. unreferenced object 0xffff8884802c3200 (size 192): comm "fio", pid 9197, jiffies 4298078271 hex dump (first 32 bytes): 00 00 00 00 00 00...
```diff diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index b74780af4c22..917055dc01ed 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -1182,8 +1182,11 @@ static void raid10_read_request(struct mddev *mddev, struct bio *bio, } } - if (!regular_request_wait(mddev, conf, bio, r10_bio->sector...
d67ed2ccd2d1dcfda9292c0ea8697a9d0f2f0d98
Analyze and fix the following issue in the Linux kernel code: md/raid1: Fix stack memory use after return in raid1_reshape
Problem Details: In the raid1_reshape function, newpool is allocated on the stack and assigned to conf->r1bio_pool. This results in conf->r1bio_pool.wait.head pointing to a stack address. Accessing this address later can lead to a kernel panic. Example access path: raid1_reshape() { // newpool is on the stack mempo...
```diff diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 19c5a0ce5a40..fd4ce2a4136f 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -3428,6 +3428,7 @@ static int raid1_reshape(struct mddev *mddev) /* ok, everything is stopped */ oldpool = conf->r1bio_pool; conf->r1bio_pool = newpool; + init_...
49a27c6c392dec46c826ee586f7ec8973acaeed7
Analyze and fix the following issue in the Linux kernel code: arm64: dts: exynos7870-j6lte: reduce memory ranges to base amount
Problem Details: The device is available in multiple variants with differing RAM capacities. The memory range defined in the 0x80000000 bank exceeds the address range of the memory controller, which eventually leads to ARM SError crashes. Reduce the bank size to a value which is available to all devices. The bootloade...
```diff diff --git a/arch/arm64/boot/dts/exynos/exynos7870-j6lte.dts b/arch/arm64/boot/dts/exynos/exynos7870-j6lte.dts index 61eec1aff32e..b8ce433b93b1 100644 --- a/arch/arm64/boot/dts/exynos/exynos7870-j6lte.dts +++ b/arch/arm64/boot/dts/exynos/exynos7870-j6lte.dts @@ -89,7 +89,7 @@ memory@40000000 { device_type ...
2bdfa35a7bb6e3a319e7a290baa44720bc96e5e4
Analyze and fix the following issue in the Linux kernel code: arm64: dts: exynos7870-on7xelte: reduce memory ranges to base amount
Problem Details: The device is available in multiple variants with differing RAM capacities. The memory range defined in the 0x80000000 bank exceeds the address range of the memory controller, which eventually leads to ARM SError crashes. Reduce the bank size to a value which is available to all devices. The bootloade...
```diff diff --git a/arch/arm64/boot/dts/exynos/exynos7870-on7xelte.dts b/arch/arm64/boot/dts/exynos/exynos7870-on7xelte.dts index eb97dcc41542..b1d9eff5a827 100644 --- a/arch/arm64/boot/dts/exynos/exynos7870-on7xelte.dts +++ b/arch/arm64/boot/dts/exynos/exynos7870-on7xelte.dts @@ -78,7 +78,7 @@ memory@40000000 { ...
e9355e894aebcbeacffd284644749190cc5f33a4
Analyze and fix the following issue in the Linux kernel code: arm64: dts: exynos7870: add quirk to disable USB2 LPM in gadget mode
Problem Details: In gadget mode, USB connections are sluggish. The device won't send packets to the host unless the host sends packets to the device. For instance, SSH-ing through the USB network would apparently not work unless you're flood-pinging the device's IP. Add the property snps,usb2-gadget-lpm-disable to the...
```diff diff --git a/arch/arm64/boot/dts/exynos/exynos7870.dtsi b/arch/arm64/boot/dts/exynos/exynos7870.dtsi index 5cba8c9bb403..d5d347623b90 100644 --- a/arch/arm64/boot/dts/exynos/exynos7870.dtsi +++ b/arch/arm64/boot/dts/exynos/exynos7870.dtsi @@ -327,6 +327,7 @@ phys = <&usbdrd_phy 0>; usb-role-switch; ...
683d532dfc9657ab8aae25204f378352ed144646
Analyze and fix the following issue in the Linux kernel code: pinctrl: samsung: Fix gs101 irq chip
Problem Details: When adding the dedicated gs101_wkup_irq_chip struct to support the eint wakeup mask the .eint_con, eint_mask and .eint_pend fields were missed. The result is that irqs on gs101 for the buttons etc are broken. Reported-by: André Draszik <andre.draszik@linaro.org> Fixes: 2642f55d44ce ("pinctrl: samsung...
```diff diff --git a/drivers/pinctrl/samsung/pinctrl-exynos.c b/drivers/pinctrl/samsung/pinctrl-exynos.c index 5554768d465f..81fe0b08a9af 100644 --- a/drivers/pinctrl/samsung/pinctrl-exynos.c +++ b/drivers/pinctrl/samsung/pinctrl-exynos.c @@ -665,6 +665,9 @@ static const struct exynos_irq_chip gs101_wkup_irq_chip __ini...
caf5ad18a2b49e3b20b1dc65e928851d409bcd1c
Analyze and fix the following issue in the Linux kernel code: soc: qcom: ubwc: Fix SM6125's ubwc_swizzle value
Problem Details: The value of 7 (a.k.a. GENMASK(2, 0), a.k.a. disabling levels 1-3 of swizzling) is what we want on this platform (and others with a UBWC 1.0 encoder). Fix it to make mesa happy (the hardware doesn't care about the 2 higher bits, as they weren't consumed on this platform). Reviewed-by: Dmitry Baryshko...
```diff diff --git a/drivers/soc/qcom/ubwc_config.c b/drivers/soc/qcom/ubwc_config.c index 18a853a3f76c..3eb2f2118e5d 100644 --- a/drivers/soc/qcom/ubwc_config.c +++ b/drivers/soc/qcom/ubwc_config.c @@ -103,7 +103,7 @@ static const struct qcom_ubwc_cfg_data sm6115_data = { static const struct qcom_ubwc_cfg_data sm6125...
0a1ff88ec5b60b41ba830c5bf08b6cd8f45ab411
Analyze and fix the following issue in the Linux kernel code: drm/msm: use trylock for debugfs
Problem Details: This resolves a potential deadlock vs msm_gem_vm_close(). Otherwise for _NO_SHARE buffers msm_gem_describe() could be trying to acquire the shared vm resv, while already holding priv->obj_lock. But _vm_close() might drop the last reference to a GEM obj while already holding the vm resv, and msm_gem_f...
```diff diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c index e3ccda777ef3..3e87d27dfcb6 100644 --- a/drivers/gpu/drm/msm/msm_gem.c +++ b/drivers/gpu/drm/msm/msm_gem.c @@ -938,7 +938,8 @@ void msm_gem_describe(struct drm_gem_object *obj, struct seq_file *m, uint64_t off = drm_vma_node_start...
9edc52967cc7fcd430749cdd8866aa68f25422bf
Analyze and fix the following issue in the Linux kernel code: drm/msm: Add VM logging for VM_BIND updates
Problem Details: When userspace opts in to VM_BIND, the submit no longer holds references keeping the VMA alive. This makes it difficult to distinguish between UMD/KMD/app bugs. So add a debug option for logging the most recent VM updates and capturing these in GPU devcoredumps. The submitqueue id is also captured, ...
```diff diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c index ff25e3dada04..53cbfa5a507b 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c @@ -833,6 +833,7 @@ void adreno_gpu_state_destroy(struct msm_gpu_state *state) for ...
fe4952b5f27cca5d143d3de249562d4cc984c1d6
Analyze and fix the following issue in the Linux kernel code: drm/msm: Convert vm locking
Problem Details: Convert to using the gpuvm's r_obj for serializing access to the VM. This way we can use the drm_exec helper for dealing with deadlock detection and backoff. This will let us deal with upcoming locking order conflicts with the VM_BIND implmentation (ie. in some scenarious we need to acquire the obj lo...
```diff diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c index 664fb801c221..82293806219a 100644 --- a/drivers/gpu/drm/msm/msm_gem.c +++ b/drivers/gpu/drm/msm/msm_gem.c @@ -48,6 +48,7 @@ static void put_iova_spaces(struct drm_gem_object *obj, struct drm_gpuvm *vm, bo static void detach_vm(str...
cdd73b1666079a73d061396f361df55d59fe96e6
Analyze and fix the following issue in the Linux kernel code: uapi: fix broken link in linux/capability.h
Problem Details: The link to the libcap library is outdated. Instead, use a link to the libcap2 library. As well, give the complete reference of the POSIX compliance. Signed-off-by: Ariel Otilibili <ariel.otilibili-anieli@eurecom.fr> Acked-by: Andrew G. Morgan <morgan@kernel.org> Reviewed-by: Paul Moore <paul@paul-mo...
```diff diff --git a/include/uapi/linux/capability.h b/include/uapi/linux/capability.h index 2e21b5594f81..ea5a0899ecf0 100644 --- a/include/uapi/linux/capability.h +++ b/include/uapi/linux/capability.h @@ -6,9 +6,10 @@ * Alexander Kjeldaas <astor@guardian.no> * with help from Aleph1, Roland Buresund and Andrew Mai...
c72d628469b8f46251b3afc361269cb15de0c988
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix btree for nonexistent tree depth
Problem Details: The fix for when we should increase tree depth in journal replay was entirely bogus. We should only increase the tree depth in journal replay when recovery from btree node scan, and then only for keys found by btree node scan. This needs additional work - we should be shooting down existing interior ...
```diff diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c index d0b7e3a36a54..c94debb12d2f 100644 --- a/fs/bcachefs/recovery.c +++ b/fs/bcachefs/recovery.c @@ -273,24 +273,35 @@ static int bch2_journal_replay_key(struct btree_trans *trans, goto out; struct btree_path *path = btree_iter_path(trans, &it...
ddb9680a7226d6081b42869d2875715a17ecb51d
Analyze and fix the following issue in the Linux kernel code: bcachefs: Fix bch2_io_failures_to_text()
Problem Details: This wasn't updated when we added tracking for btree validate errors. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/extents.c b/fs/bcachefs/extents.c index 036e4ad95987..83cbd77dcb9c 100644 --- a/fs/bcachefs/extents.c +++ b/fs/bcachefs/extents.c @@ -50,19 +50,17 @@ void bch2_io_failures_to_text(struct printbuf *out, struct bch_io_failures *failed) { static const char * const error_types[...
63d6e9311999a3dd125ad3e0560a769e047fd7b1
Analyze and fix the following issue in the Linux kernel code: bcachefs: bch2_fpunch_snapshot()
Problem Details: Add a new version of fpunch for operating on a snapshot ID, not a subvolume - and use it for "extent past end of inode" repair. Previously, repair would try to delete everything at once, but deleting too many extents at once can overflow the btree_trans bump allocator, as well as causing other problem...
```diff diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c index dbf161e4311a..856eb2b41896 100644 --- a/fs/bcachefs/fsck.c +++ b/fs/bcachefs/fsck.c @@ -12,6 +12,7 @@ #include "fs.h" #include "fsck.h" #include "inode.h" +#include "io_misc.h" #include "keylist.h" #include "namei.h" #include "recovery_passes.h" @...
9d712c50c30fface9b2a64251d9a7ac5fa7d3c4a
Analyze and fix the following issue in the Linux kernel code: drm/gpuvm: Fix doc comments
Problem Details: Correctly summerize drm_gpuvm_sm_map/unmap, and fix the parameter order and names. Just something I noticed in passing. v2: Don't rename the arg names in prototypes to match function declarations [Danilo] Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com> Acked-by: Danilo Krummrich <dakr@ke...
```diff diff --git a/drivers/gpu/drm/drm_gpuvm.c b/drivers/gpu/drm/drm_gpuvm.c index e89b932e987c..b49da9b46b65 100644 --- a/drivers/gpu/drm/drm_gpuvm.c +++ b/drivers/gpu/drm/drm_gpuvm.c @@ -2300,13 +2300,13 @@ __drm_gpuvm_sm_unmap(struct drm_gpuvm *gpuvm, } /** - * drm_gpuvm_sm_map() - creates the &drm_gpuva_op sp...
1c8c354098ea9d4376a58c96ae6b65288a6f15d8
Analyze and fix the following issue in the Linux kernel code: drm/msm: Add error handling for krealloc in metadata setup
Problem Details: Function msm_ioctl_gem_info_set_metadata() now checks for krealloc failure and returns -ENOMEM, avoiding potential NULL pointer dereference. Explicitly avoids __GFP_NOFAIL due to deadlock risks and allocation constraints. Signed-off-by: Yuan Chen <chenyuan@kylinos.cn> Patchwork: https://patchwork.free...
```diff diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index d007687c2446..f0d016ce8e11 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -555,6 +555,7 @@ static int msm_ioctl_gem_info_set_metadata(struct drm_gem_object *obj, u32 metadata_size) { s...
349d6418201272a32ef75142d95d31069a27a5ba
Analyze and fix the following issue in the Linux kernel code: dt-bindings: opp: adreno: Update regex of OPP entry
Problem Details: In some cases, an OPP may have multiple variants to describe the differences in the resources between SKUs. As an example, we may want to vote different peak bandwidths in different SKUs for the same frequency and the OPP node names can have an additional integer suffix to denote this difference like b...
```diff diff --git a/Documentation/devicetree/bindings/opp/opp-v2-qcom-adreno.yaml b/Documentation/devicetree/bindings/opp/opp-v2-qcom-adreno.yaml index a27ba7b663d4..0bd7d6b69755 100644 --- a/Documentation/devicetree/bindings/opp/opp-v2-qcom-adreno.yaml +++ b/Documentation/devicetree/bindings/opp/opp-v2-qcom-adreno.ya...
b41c1d8d07906786c60893980d52688f31d114a6
Analyze and fix the following issue in the Linux kernel code: fscrypt: Don't use problematic non-inline crypto engines
Problem Details: Make fscrypt no longer use Crypto API drivers for non-inline crypto engines, even when the Crypto API prioritizes them over CPU-based code (which unfortunately it often does). These drivers tend to be really problematic, especially for fscrypt's workload. This commit has no effect on inline crypto en...
```diff diff --git a/Documentation/filesystems/fscrypt.rst b/Documentation/filesystems/fscrypt.rst index f63791641c1d..696a5844bfa3 100644 --- a/Documentation/filesystems/fscrypt.rst +++ b/Documentation/filesystems/fscrypt.rst @@ -147,9 +147,8 @@ However, these ioctls have some limitations: were wiped. To partially...
c872d7c837382517c51a76dfdcf550332cfab231
Analyze and fix the following issue in the Linux kernel code: perf/arm-ni: Set initial IRQ affinity
Problem Details: While we do request our IRQs with the right flags to stop their affinity changing unexpectedly, we forgot to actually set it to start with. Oops. Cc: stable@vger.kernel.org Fixes: 4d5a7680f2b4 ("perf: Add driver for Arm NI-700 interconnect PMU") Signed-off-by: Robin Murphy <robin.murphy@arm.com> Teste...
```diff diff --git a/drivers/perf/arm-ni.c b/drivers/perf/arm-ni.c index de7b6cce4d68..9396d243415f 100644 --- a/drivers/perf/arm-ni.c +++ b/drivers/perf/arm-ni.c @@ -544,6 +544,8 @@ static int arm_ni_init_cd(struct arm_ni *ni, struct arm_ni_node *node, u64 res_s return err; cd->cpu = cpumask_local_spread(0, dev...
9dd1757493416310a5e71146a08bc228869f8dae
Analyze and fix the following issue in the Linux kernel code: arm64/mm: Drop wrong writes into TCR2_EL1
Problem Details: Register X0 contains PIE_E1_ASM and should not be written into REG_TCR2_EL1 which could have an adverse impact otherwise. This has remained undetected till now probably because current value for PIE_E1_ASM (0xcc880e0ac0800000) clears TCR2_EL1 which again gets set subsequently with 'tcr2' after testing ...
```diff diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S index 80d470aa469d..54dccfd6aa11 100644 --- a/arch/arm64/mm/proc.S +++ b/arch/arm64/mm/proc.S @@ -518,7 +518,6 @@ alternative_else_nop_endif msr REG_PIR_EL1, x0 orr tcr2, tcr2, TCR2_EL1_PIE - msr REG_TCR2_EL1, x0 .Lskip_indirection: ```
22f3a4f6085951eff28bd1e44d3f388c1d9a5f44
Analyze and fix the following issue in the Linux kernel code: arm64: poe: Handle spurious Overlay faults
Problem Details: We do not currently issue an ISB after updating POR_EL0 when context-switching it, for instance. The rationale is that if the old value of POR_EL0 is more restrictive and causes a fault during uaccess, the access will be retried [1]. In other words, we are trading an ISB on every context-switching for ...
```diff diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index 5954cec19660..08b7042a2e2d 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -673,6 +673,11 @@ static void permission_overlay_switch(struct task_struct *next) current->thread.por_el0 = read_sysreg_s(SYS_PO...
a75ad2fc76a2ab70817c7eed3163b66ea84ca6ac
Analyze and fix the following issue in the Linux kernel code: arm64: Filter out SME hwcaps when FEAT_SME isn't implemented
Problem Details: We have a number of hwcaps for various SME subfeatures enumerated via ID_AA64SMFR0_EL1. Currently we advertise these without cross checking against the main SME feature, advertised in ID_AA64PFR1_EL1.SME which means that if the two are out of sync userspace can see a confusing situation where SME subfe...
```diff diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index b34044e20128..e151585c6cca 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -3135,6 +3135,13 @@ static bool has_sve_feature(const struct arm64_cpu_capabilities *cap, int scope) } #endif +#if...
d38376b3ee48d073c64e75e150510d7e6b4b04f7
Analyze and fix the following issue in the Linux kernel code: drm/imagination: Fix kernel crash when hard resetting the GPU
Problem Details: The GPU hard reset sequence calls pm_runtime_force_suspend() and pm_runtime_force_resume(), which according to their documentation should only be used during system-wide PM transitions to sleep states. The main issue though is that depending on some internal runtime PM state as seen by pm_runtime_forc...
```diff diff --git a/drivers/gpu/drm/imagination/pvr_power.c b/drivers/gpu/drm/imagination/pvr_power.c index 41f5d89e78b8..3e349d039fc0 100644 --- a/drivers/gpu/drm/imagination/pvr_power.c +++ b/drivers/gpu/drm/imagination/pvr_power.c @@ -386,13 +386,13 @@ pvr_power_reset(struct pvr_device *pvr_dev, bool hard_reset) ...
2fa9c93035e17380cafa897ee1a4d503881a3770
Analyze and fix the following issue in the Linux kernel code: ublk: speed up ublk server exit handling
Problem Details: Recently, we've observed a few cases where a ublk server is able to complete restart more quickly than the driver can process the exit of the previous ublk server. The new ublk server comes up, attempts recovery of the preexisting ublk devices, and observes them still in state UBLK_S_DEV_LIVE. While th...
```diff diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c index e52c2d1cb838..870d57a853a4 100644 --- a/drivers/block/ublk_drv.c +++ b/drivers/block/ublk_drv.c @@ -235,6 +235,8 @@ struct ublk_device { struct completion completion; unsigned int nr_queues_ready; unsigned int nr_privileged_daemon; +...
0d1c86b840966a278d9b25a9d7c18881980f306e
Analyze and fix the following issue in the Linux kernel code: arm64/gcs: Don't try to access GCS registers if arm64.nogcs is enabled
Problem Details: During EL2 setup if GCS is advertised in the ID registers we will reset the GCS control registers GCSCR_EL1 and GCSCRE0_EL1 to known values in order to ensure it is disabled. This is done without taking into account overrides supplied on the command line, meaning that if the user has configured arm64.n...
```diff diff --git a/arch/arm64/include/asm/el2_setup.h b/arch/arm64/include/asm/el2_setup.h index ba5df0df02a4..9f38340d24c2 100644 --- a/arch/arm64/include/asm/el2_setup.h +++ b/arch/arm64/include/asm/el2_setup.h @@ -287,17 +287,6 @@ .Lskip_fgt2_\@: .endm -.macro __init_el2_gcs - mrs_s x1, SYS_ID_AA64PFR1_EL1 - u...
b33f8cfb2b4d91c4bb7c16b354138cc205befed2
Analyze and fix the following issue in the Linux kernel code: arm64: dts: amlogic: Add Ugoos AM3
Problem Details: The Ugoos AM3 is a small set-top box based on the Amlogic S912 SoC, with a board design that is very close to the Q20x development boards. The MMC max-frequency properties are copied from the downstream device tree. https://ugoos.com/ugoos-am3-16g The following functionality has been tested and is ...
```diff diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile index 15e7901c1268..619dce79b020 100644 --- a/arch/arm64/boot/dts/amlogic/Makefile +++ b/arch/arm64/boot/dts/amlogic/Makefile @@ -80,6 +80,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q200.dtb dtb-$(CONFIG_ARCH_MESON) += mes...
9fe58ecd1ed8162a96447fe6fbcbfb2f74be0b54
Analyze and fix the following issue in the Linux kernel code: mux: mmio: Fix missing CONFIG_REGMAP_MMIO
Problem Details: MMIO mux uses now regmap_init_mmio(), so one way or another CONFIG_REGMAP_MMIO should be enabled, because there are no stubs for !REGMAP_MMIO case: ERROR: modpost: "__regmap_init_mmio_clk" [drivers/mux/mux-mmio.ko] undefined! Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kerne...
```diff diff --git a/drivers/mux/Kconfig b/drivers/mux/Kconfig index 80f015cf6e54..c68132e38138 100644 --- a/drivers/mux/Kconfig +++ b/drivers/mux/Kconfig @@ -48,6 +48,7 @@ config MUX_GPIO config MUX_MMIO tristate "MMIO/Regmap register bitfield-controlled Multiplexer" depends on OF + select REGMAP_MMIO help ...
719b378d371899c8bbaf0ce5f42bf7db4be819f9
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: add debugfs support for VM pagetable per client
Problem Details: Add a debugfs file under the client directory which shares the root page table base address of the VM. This address could be used to dump the pagetable for debug memory issues. Signed-off-by: Sunil Khatri <sunil.khatri@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Link: https://lor...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c index dac4b926e7be..e49890a23ef6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c @@ -2131,6 +2131,55 @@ int amdgpu_debugfs_init(struct amdgpu_device *...
ef8923e6c051a98164c2889db943df9695a39888
Analyze and fix the following issue in the Linux kernel code: arm64: efi: Fix KASAN false positive for EFI runtime stack
Problem Details: KASAN reports invalid accesses during arch_stack_walk() for EFI runtime services due to vmalloc tagging[1]. The EFI runtime stack must be allocated with KASAN tags reset to avoid false positives. This patch uses arch_alloc_vmap_stack() instead of __vmalloc_node() for EFI stack allocation, which intern...
```diff diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c index 3857fd7ee8d4..62230d6dd919 100644 --- a/arch/arm64/kernel/efi.c +++ b/arch/arm64/kernel/efi.c @@ -15,6 +15,7 @@ #include <asm/efi.h> #include <asm/stacktrace.h> +#include <asm/vmap_stack.h> static bool region_is_misaligned(const efi_mem...