id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
2ea6190f42d0416a4310e60a7fcb0b49fcbbd4fb
Analyze and fix the following issue in the Linux kernel code: mptcp: schedule rtx timer only after pushing data
Problem Details: The MPTCP protocol usually schedule the retransmission timer only when there is some chances for such retransmissions to happen. With a notable exception: __mptcp_push_pending() currently schedule such timer unconditionally, potentially leading to unnecessary rtx timer expiration. The issue is presen...
```diff diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index e212c1374bd0..d8a7f7029164 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -1623,7 +1623,7 @@ void __mptcp_push_pending(struct sock *sk, unsigned int flags) struct mptcp_sendmsg_info info = { .flags = flags, }; - bool do_che...
29f4801e9c8dfd12bdcb33b61a6ac479c7162bd7
Analyze and fix the following issue in the Linux kernel code: selftests: mptcp: pm: ensure unknown flags are ignored
Problem Details: This validates the previous commit: the userspace can set unknown flags -- the 7th bit is currently unused -- without errors, but only the supported ones are printed in the endpoints dumps. The 'Fixes' tag here below is the same as the one from the previous commit: this patch here is not fixing anythi...
```diff diff --git a/tools/testing/selftests/net/mptcp/pm_netlink.sh b/tools/testing/selftests/net/mptcp/pm_netlink.sh index ec6a87588191..123d9d7a0278 100755 --- a/tools/testing/selftests/net/mptcp/pm_netlink.sh +++ b/tools/testing/selftests/net/mptcp/pm_netlink.sh @@ -192,6 +192,10 @@ check "show_endpoints" \ flush_...
0ace3297a7301911e52d8195cb1006414897c859
Analyze and fix the following issue in the Linux kernel code: mptcp: pm: ignore unknown endpoint flags
Problem Details: Before this patch, the kernel was saving any flags set by the userspace, even unknown ones. This doesn't cause critical issues because the kernel is only looking at specific ones. But on the other hand, endpoints dumps could tell the userspace some recent flags seem to be supported on older kernel vers...
```diff diff --git a/include/uapi/linux/mptcp.h b/include/uapi/linux/mptcp.h index 04eea6d1d0a9..72a5d030154e 100644 --- a/include/uapi/linux/mptcp.h +++ b/include/uapi/linux/mptcp.h @@ -40,6 +40,7 @@ #define MPTCP_PM_ADDR_FLAG_FULLMESH _BITUL(3) #define MPTCP_PM_ADDR_FLAG_IMPLICIT _BITUL(4) #define MPTCP_PM_ADDR_...
db6b35cffe59c619ea3772b21d7c7c8a7b885dc1
Analyze and fix the following issue in the Linux kernel code: tools: ynl: fix build on systems with old kernel headers
Problem Details: The wireguard YNL conversion was missing the customary .deps entry. NIPA doesn't catch this but my CentOS 9 system complains: wireguard-user.c:72:10: error: ‘WGALLOWEDIP_A_FLAGS’ undeclared here wireguard-user.c:58:67: error: parameter 1 (‘value’) has incomplete type 58 | const char *wireguard_wgal...
```diff diff --git a/tools/net/ynl/Makefile.deps b/tools/net/ynl/Makefile.deps index 865fd2e8519e..08205f9fc525 100644 --- a/tools/net/ynl/Makefile.deps +++ b/tools/net/ynl/Makefile.deps @@ -13,6 +13,7 @@ UAPI_PATH:=../../../../include/uapi/ # need the explicit -D matching what's in /usr, to avoid multiple definitions...
298e753880b6ea99ac30df34959a7a03b0878eed
Analyze and fix the following issue in the Linux kernel code: ALSA: firewire-motu: add bounds check in put_user loop for DSP events
Problem Details: In the DSP event handling code, a put_user() loop copies event data. When the user buffer size is not aligned to 4 bytes, it could overwrite beyond the buffer boundary. Fix by adding a bounds check before put_user(). Suggested-by: Takashi Iwai <tiwai@suse.de> Fixes: 634ec0b2906e ("ALSA: firewire-motu...
```diff diff --git a/sound/firewire/motu/motu-hwdep.c b/sound/firewire/motu/motu-hwdep.c index 6675b23aad69..89dc436a0652 100644 --- a/sound/firewire/motu/motu-hwdep.c +++ b/sound/firewire/motu/motu-hwdep.c @@ -75,7 +75,7 @@ static long hwdep_read(struct snd_hwdep *hwdep, char __user *buf, long count, while (consume...
ea513dd3c066074b12e788114b45e0f2bda382cc
Analyze and fix the following issue in the Linux kernel code: gpio: shared: make locking more fine-grained
Problem Details: The global gpio_shared_lock has caused some issues when recursively removing GPIO shared proxies. The thing is: we don't really need it. Once created from an init-call, the shared GPIO data structures are never removed, there's no need to protect the linked lists of entries and references. All we need ...
```diff diff --git a/drivers/gpio/gpiolib-shared.c b/drivers/gpio/gpiolib-shared.c index 2d3b0c3460e5..ba4b718d40a0 100644 --- a/drivers/gpio/gpiolib-shared.c +++ b/drivers/gpio/gpiolib-shared.c @@ -36,6 +36,8 @@ struct gpio_shared_ref { enum gpiod_flags flags; char *con_id; int dev_id; + /* Protects the auxiliar...
d382c765d083ad871b4a053059351edd348a2442
Analyze and fix the following issue in the Linux kernel code: gpio: shared: fix auxiliary device cleanup order
Problem Details: Dropping the last reference to the internal struct device should be the last thing we do so delete the device first and then uninit it which also involves the final put_device(). Fixes: a060b8c511ab ("gpiolib: implement low-level, shared GPIO support") Link: https://lore.kernel.org/r/20251206-gpio-sha...
```diff diff --git a/drivers/gpio/gpiolib-shared.c b/drivers/gpio/gpiolib-shared.c index 4084a28a953a..2d3b0c3460e5 100644 --- a/drivers/gpio/gpiolib-shared.c +++ b/drivers/gpio/gpiolib-shared.c @@ -415,8 +415,8 @@ static void gpio_shared_remove_adev(struct auxiliary_device *adev) { lockdep_assert_held(&gpio_shared_...
c904a0d8525d5f03529ae3176e99bd32466ece7b
Analyze and fix the following issue in the Linux kernel code: gpio: shared: check if a reference is populated before cleaning its resources
Problem Details: It's possible that not all proxy entries will be set up when the device gets removed so check if they are before trying to dereference members which are still NULL. This can happen if some consumers never requested their shared GPIOs. Fixes: a060b8c511ab ("gpiolib: implement low-level, shared GPIO sup...
```diff diff --git a/drivers/gpio/gpiolib-shared.c b/drivers/gpio/gpiolib-shared.c index 17da15c1075f..4084a28a953a 100644 --- a/drivers/gpio/gpiolib-shared.c +++ b/drivers/gpio/gpiolib-shared.c @@ -491,10 +491,13 @@ void gpio_device_teardown_shared(struct gpio_device *gdev) continue; list_for_each_entry(ref, ...
e2c4175b8d3b3ea65fc3801c190bd93fe8b7a7a9
Analyze and fix the following issue in the Linux kernel code: gpio: shared: fix NULL-pointer dereference in teardown path
Problem Details: We need to actually store the address of the GPIO lookup table in the reference struct before we try to free it or - worse - dereference its members. Fixes: a060b8c511ab ("gpiolib: implement low-level, shared GPIO support") Link: https://lore.kernel.org/r/20251206-gpio-shared-teardown-fixes-v1-1-35ac4...
```diff diff --git a/drivers/gpio/gpiolib-shared.c b/drivers/gpio/gpiolib-shared.c index 5d15675d61ea..17da15c1075f 100644 --- a/drivers/gpio/gpiolib-shared.c +++ b/drivers/gpio/gpiolib-shared.c @@ -399,7 +399,8 @@ int gpio_shared_add_proxy_lookup(struct device *consumer, unsigned long lflags) lookup->table[0] = GP...
9e7a40a2841483d7bf51b8d9a5e1f0633a5c7a26
Analyze and fix the following issue in the Linux kernel code: gpio: shared: ignore disabled nodes when traversing the device-tree
Problem Details: Don't consider disabled devices when traversing the device-tree looking for shared GPIOs. Even if they do share a phandle to a pin, they can never be instantiated and request it. Fixes: a060b8c511ab ("gpiolib: implement low-level, shared GPIO support") Link: https://lore.kernel.org/r/20251203092309.34...
```diff diff --git a/drivers/gpio/gpiolib-shared.c b/drivers/gpio/gpiolib-shared.c index 8bdd107b1ad1..5d15675d61ea 100644 --- a/drivers/gpio/gpiolib-shared.c +++ b/drivers/gpio/gpiolib-shared.c @@ -77,6 +77,10 @@ gpio_shared_find_entry(struct fwnode_handle *controller_node, /* Handle all special nodes that we should ...
313ef70a9f0f637a09d9ef45222f5bdcf30a354b
Analyze and fix the following issue in the Linux kernel code: btrfs: fix a potential path leak in print_data_reloc_error()
Problem Details: Inside print_data_reloc_error(), if extent_from_logical() failed we return immediately. However there are the following cases where extent_from_logical() can return error but still holds a path: - btrfs_search_slot() returned 0 - No backref item found in extent tree - No flags_ret provided This i...
```diff diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 0cbac085cdaf..6633b3dc9314 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -255,6 +255,7 @@ static void print_data_reloc_error(const struct btrfs_inode *inode, u64 file_off if (ret < 0) { btrfs_err_rl(fs_info, "failed to lookup extent item for ...
b0ff70e9d4fe46cece25eb97b9b9b0166624af95
Analyze and fix the following issue in the Linux kernel code: ASoC: cs35l41: Always return 0 when a subsystem ID is found
Problem Details: When trying to get the system name in the _HID path, after successfully retrieving the subsystem ID the return value isn't set to 0 but instead still kept at -ENODATA, leading to a false negative: [ 12.382507] cs35l41 spi-VLV1776:00: Subsystem ID: VLV1776 [ 12.382521] cs35l41 spi-VLV1776:00: probe...
```diff diff --git a/sound/soc/codecs/cs35l41.c b/sound/soc/codecs/cs35l41.c index 3a8a8dd065b7..ee56dfceedeb 100644 --- a/sound/soc/codecs/cs35l41.c +++ b/sound/soc/codecs/cs35l41.c @@ -1188,13 +1188,14 @@ static int cs35l41_get_system_name(struct cs35l41_private *cs35l41) } } -err: if (sub) { cs35l41->dsp...
428e1b114c1ae94c44f0ae3a15dafcfae4d8a0b4
Analyze and fix the following issue in the Linux kernel code: Revert "btrfs: add ASSERTs on prealloc in qgroup functions"
Problem Details: This reverts commit 252877a8701530fde861a4f27710c1e718e97caa. Commit 252877a87015 ("btrfs: add ASSERTs on prealloc in qgroup functions") tries to remove the kfree() on preallocated qgroup during several call sites, but this cannot work as intended: - btrfs_quota_enable() - btrfs_create_qgroup() If ...
```diff diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c index 9e2b53e90dcb..d9d8d9968a58 100644 --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c @@ -1243,14 +1243,7 @@ out: btrfs_end_transaction(trans); else if (trans) ret = btrfs_end_transaction(trans); - - /* - * At this point we either failed at allocatin...
946574434aa9cfe175c3e8234734a3822410ff53
Analyze and fix the following issue in the Linux kernel code: scsi: ufs: qcom: Fix confusing cleanup.h syntax
Problem Details: Initializing automatic __free variables to NULL without need (e.g. branches with different allocations), followed by actual allocation is in contrary to explicit coding rules guiding cleanup.h: "Given that the "__free(...) = NULL" pattern for variables defined at the top of the function poses this pot...
```diff diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c index 8d119b3223cb..8ebee0cc5313 100644 --- a/drivers/ufs/host/ufs-qcom.c +++ b/drivers/ufs/host/ufs-qcom.c @@ -1769,10 +1769,9 @@ static void ufs_qcom_dump_testbus(struct ufs_hba *hba) { struct ufs_qcom_host *host = ufshcd_get_variant(hb...
d2875b812b141d0c449541976d92c8d89b94ec72
Analyze and fix the following issue in the Linux kernel code: scsi: ufs: core: Fix a deadlock in the frequency scaling code
Problem Details: Commit 08b12cda6c44 ("scsi: ufs: core: Switch to scsi_get_internal_cmd()") accidentally introduced a deadlock in the frequency scaling code. ufshcd_clock_scaling_unprepare() may submit a device management command while SCSI command processing is blocked. The deadlock was introduced by using the SCSI co...
```diff diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 1837ae204d5e..80c0b49f30b0 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -1455,15 +1455,14 @@ out: static void ufshcd_clock_scaling_unprepare(struct ufs_hba *hba, int err) { up_write(&hba->clk_scaling_lock);...
14be351e5cd07349377010e457a58fac99201832
Analyze and fix the following issue in the Linux kernel code: scsi: ufs: core: Fix an error handler crash
Problem Details: The UFS error handler may be activated before SCSI scanning has started and hence before hba->ufs_device_wlun has been set. Check the hba->ufs_device_wlun pointer before using it. Cc: Peter Wang <peter.wang@mediatek.com> Cc: Nitin Rawat <nitin.rawat@oss.qualcomm.com> Fixes: e23ef4f22db3 ("scsi: ufs: c...
```diff diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index 1b3fe1d8655e..1837ae204d5e 100644 --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -6699,19 +6699,22 @@ static void ufshcd_err_handler(struct work_struct *work) hba->saved_uic_err, hba->force_reset, ufshcd_is_link...
8cef9b451dc6fdf86b92c7a35d55a47465d500db
Analyze and fix the following issue in the Linux kernel code: spi: microchip-core: Fix an error handling path in mchp_corespi_probe()
Problem Details: mchp_corespi_init() calls mchp_corespi_enable_ints(), so mchp_corespi_disable_ints() should be called if an error occurs after calling mchp_corespi_init(), as already done in the remove function. Fixes: 059f545832be ("spi: add support for microchip "soft" spi controller") Signed-off-by: Christophe JAI...
```diff diff --git a/drivers/spi/spi-microchip-core-spi.c b/drivers/spi/spi-microchip-core-spi.c index 98bf0e6cd00e..89e40fc45d73 100644 --- a/drivers/spi/spi-microchip-core-spi.c +++ b/drivers/spi/spi-microchip-core-spi.c @@ -387,6 +387,7 @@ static int mchp_corespi_probe(struct platform_device *pdev) ret = devm_sp...
99f0c3a654c4a762aca4fadc8d9f8636b36d570a
Analyze and fix the following issue in the Linux kernel code: regulator: spacemit: Align input supply name with the DT binding
Problem Details: The Device Tree binding schema for the SpacemiT P1 PMIC defines the main input supply property as "vin-supply", but the driver defines the supply name for BUCK and ALDO regulators as "vcc". This causes the regulator core to lookup for a non-existent "vcc-supply". Rename the supply from "vcc" to "vin",...
```diff diff --git a/drivers/regulator/spacemit-p1.c b/drivers/regulator/spacemit-p1.c index d437e6738ea1..2bf9137e12b1 100644 --- a/drivers/regulator/spacemit-p1.c +++ b/drivers/regulator/spacemit-p1.c @@ -87,10 +87,10 @@ static const struct linear_range p1_ldo_ranges[] = { } #define P1_BUCK_DESC(_n) \ - P1_REG_D...
2a5b286bee941c4b8ed359de82398a1a3a19b7db
Analyze and fix the following issue in the Linux kernel code: arch/x86: replace "__auto_type" with "auto"
Problem Details: Replace instances of "__auto_type" with "auto" in: arch/x86/include/asm/bug.h arch/x86/include/asm/string_64.h arch/x86/include/asm/uaccess_64.h Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
```diff diff --git a/arch/x86/include/asm/bug.h b/arch/x86/include/asm/bug.h index ee23b98353d7..d561a8443c13 100644 --- a/arch/x86/include/asm/bug.h +++ b/arch/x86/include/asm/bug.h @@ -129,7 +129,7 @@ do { \ #define __WARN_FLAGS(cond_str, flags) \ do { \ - __auto_type __flags = BUGFLAG_WARNING|...
2e1da460916626fedbbc8518b9c4e1b064f201ed
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Improve HDMI info retrieval
Problem Details: [WHY & HOW] Make a dedicated function to read HDMI-related monitor info, including monitor's SCDC support. Fixes: 3471b9a31ce3 ("drm/amd/display: Rework HDMI data channel reads") Suggested-by: Fangzhi Zuo <jerry.zuo@amd.com> Reviewed-by: Jerry Zuo <jerry.zuo@amd.com> Signed-off-by: Ivan Lipski <ivan.l...
```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 ef97cede9926..bd0403005f37 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h @@ -1063,6 +1063,9 @@ int amdgpu_dm_update_pl...
9aeed9041929812a10a6d693af050846942a1d16
Analyze and fix the following issue in the Linux kernel code: alpha: don't reference obsolete termio struct for TC* constants
Problem Details: Similar in nature to ab107276607af90b13a5994997e19b7b9731e251. glibc-2.42 drops the legacy termio struct, but the ioctls.h header still defines some TC* constants in terms of termio (via sizeof). Hardcode the values instead. This fixes building Python for example, which falls over like: ./Modules/te...
```diff diff --git a/arch/alpha/include/uapi/asm/ioctls.h b/arch/alpha/include/uapi/asm/ioctls.h index 971311605288..a09d04b49cc6 100644 --- a/arch/alpha/include/uapi/asm/ioctls.h +++ b/arch/alpha/include/uapi/asm/ioctls.h @@ -23,10 +23,10 @@ #define TCSETSW _IOW('t', 21, struct termios) #define TCSETSF _IOW('t', 2...
16bd954c93360145bc77cc601e350913fc28182d
Analyze and fix the following issue in the Linux kernel code: rtc: spacemit: MFD_SPACEMIT_P1 as dependencies
Problem Details: RTC_DRV_SPACEMIT_P1 is a subdevice of P1 and should depend on MFD_SPACEMIT_P1 rather than selecting it directly. Using 'select' does not always respect the parent's dependencies, so 'depends on' is the safer and more correct choice. Additionally, the default value depends on MFD_SPACEMIT_P1 rather tha...
```diff diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 9906cddd5a8b..50dc779f7f98 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -409,8 +409,8 @@ config RTC_DRV_MAX77686 config RTC_DRV_SPACEMIT_P1 tristate "SpacemiT P1 RTC" depends on ARCH_SPACEMIT || COMPILE_TEST - select MFD_SPACEMIT...
159a740c768e4e8fe3c63d20055bf54de29c0c02
Analyze and fix the following issue in the Linux kernel code: rtc: atcrtc100: Fix signedness bug in probe()
Problem Details: The "atcrtc_dev->alarm_irq" variable is an unsigned int but it needs to be signed for the error handling to work. Use the "ret" variable instead. Fixes: 7adca706fe16 ("rtc: atcrtc100: Add ATCRTC100 RTC driver") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/aRx...
```diff diff --git a/drivers/rtc/rtc-atcrtc100.c b/drivers/rtc/rtc-atcrtc100.c index 51933ae1a2fa..9808fc2c5a49 100644 --- a/drivers/rtc/rtc-atcrtc100.c +++ b/drivers/rtc/rtc-atcrtc100.c @@ -296,10 +296,12 @@ static int atcrtc_probe(struct platform_device *pdev) "Failed to initialize RTC: unsupported hardware...
f07640f9fb8df2158199da1da1f8282948385a84
Analyze and fix the following issue in the Linux kernel code: rtc: max31335: Fix ignored return value in set_alarm
Problem Details: Return the result from regmap_update_bits() instead of ignoring it and always returning 0. Fixes: dedaf03b99d6 ("rtc: max31335: add driver support") Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://patch.msgid.link/20251128-max31335-handler-error-v1-1-6b6f7f78dbda@analog.com Signed-off-by: Al...
```diff diff --git a/drivers/rtc/rtc-max31335.c b/drivers/rtc/rtc-max31335.c index dfb5bad3a369..23b7bf16b4cd 100644 --- a/drivers/rtc/rtc-max31335.c +++ b/drivers/rtc/rtc-max31335.c @@ -391,10 +391,8 @@ static int max31335_set_alarm(struct device *dev, struct rtc_wkalrm *alrm) if (ret) return ret; - ret = regma...
a585c7ef9cabda58088916baedc6573e9a5cd2a7
Analyze and fix the following issue in the Linux kernel code: drm/tilcdc: Fix removal actions in case of failed probe
Problem Details: The drm_kms_helper_poll_fini() and drm_atomic_helper_shutdown() helpers should only be called when the device has been successfully registered. Currently, these functions are called unconditionally in tilcdc_fini(), which causes warnings during probe deferral scenarios. [ 7.972317] WARNING: CPU: 0 ...
```diff diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c index b5f60b2b2d0e..41802c9bd147 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c @@ -586,7 +586,7 @@ out: drm_modeset_unlock(&crtc->mutex); } -static void tilcdc_crtc_destro...
d1220e47e4bd2be8b84bc158f4dea44f2f88b226
Analyze and fix the following issue in the Linux kernel code: rtc: gamecube: Check the return value of ioremap()
Problem Details: The function ioremap() in gamecube_rtc_read_offset_from_sram() can fail and return NULL, which is dereferenced without checking, leading to a NULL pointer dereference. Add a check for the return value of ioremap() and return -ENOMEM on failure. Fixes: 86559400b3ef ("rtc: gamecube: Add a RTC driver fo...
```diff diff --git a/drivers/rtc/rtc-gamecube.c b/drivers/rtc/rtc-gamecube.c index c828bc8e05b9..045d5d45ab4b 100644 --- a/drivers/rtc/rtc-gamecube.c +++ b/drivers/rtc/rtc-gamecube.c @@ -242,6 +242,10 @@ static int gamecube_rtc_read_offset_from_sram(struct priv *d) } hw_srnprot = ioremap(res.start, resource_size(...
22a6db42253744f0f54ab632da0140b690feb44d
Analyze and fix the following issue in the Linux kernel code: Documentation: ABI: testing: Fix "upto" typo in rtc-cdev
Problem Details: The word "upto" is a common typo for "up to". Correct this. Signed-off-by: Akiyoshi Kurita <weibu@redadmin.org> Link: https://patch.msgid.link/20251112113759.2953758-1-weibu@redadmin.org Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
```diff diff --git a/Documentation/ABI/testing/rtc-cdev b/Documentation/ABI/testing/rtc-cdev index 25910c3c3d7e..cec099a27c6d 100644 --- a/Documentation/ABI/testing/rtc-cdev +++ b/Documentation/ABI/testing/rtc-cdev @@ -14,7 +14,7 @@ Description: for RTCs that support alarms * RTC_ALM_READ, RTC_ALM_SET: Read o...
5630f7557de61264ccb4f031d4734a1a97eaed16
Analyze and fix the following issue in the Linux kernel code: btrfs: do not skip logging new dentries when logging a new name
Problem Details: When we are logging a directory and the log context indicates that we are logging a new name for some other file (that is or was inside that directory), we skip logging the inodes for new dentries in the directory. This is ok most of the time, but if after the rename or link operation that triggered t...
```diff diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 64c1155160a2..31edc93a383e 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -5865,14 +5865,6 @@ static int log_new_dir_dentries(struct btrfs_trans_handle *trans, struct btrfs_inode *curr_inode = start_inode; int ret = 0; - /* - * I...
266273eaf4d99475f1ae57f687b3e42bc71ec6f0
Analyze and fix the following issue in the Linux kernel code: btrfs: don't log conflicting inode if it's a dir moved in the current transaction
Problem Details: We can't log a conflicting inode if it's a directory and it was moved from one parent directory to another parent directory in the current transaction, as this can result an attempt to have a directory with two hard links during log replay, one for the old parent directory and another for the new paren...
```diff diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index fff37c8d96a4..64c1155160a2 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -6051,6 +6051,33 @@ static int conflicting_inode_is_dir(struct btrfs_root *root, u64 ino, return ret; } +static bool can_log_conflicting_inode(const struct b...
564d59410c39d1adb3e245f58663bad86636adaf
Analyze and fix the following issue in the Linux kernel code: btrfs: tests: fix double btrfs_path free in remove_extent_ref()
Problem Details: We converted this code to use auto free cleanup.h magic but one remaining free was accidentally left behind which leads to a double free bug. Fixes: a320476ca8a3 ("btrfs: tests: do trivial BTRFS_PATH_AUTO_FREE conversions") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: David Ste...
```diff diff --git a/fs/btrfs/tests/qgroup-tests.c b/fs/btrfs/tests/qgroup-tests.c index 05cfda8af422..e9124605974b 100644 --- a/fs/btrfs/tests/qgroup-tests.c +++ b/fs/btrfs/tests/qgroup-tests.c @@ -187,7 +187,6 @@ static int remove_extent_ref(struct btrfs_root *root, u64 bytenr, ret = btrfs_search_slot(&trans, root,...
eb296c09805ee37dd4ea520a7fb3ec157c31090f
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: don't attach the tlb fence for SI
Problem Details: SI hardware doesn't support pasids, user mode queues, or KIQ/MES so there is no need for this. Doing so results in a segfault as these callbacks are non-existent for SI. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4744 Fixes: f3854e04b708 ("drm/amdgpu: attach tlb fence to the PTs update")...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index a67285118c37..c362d4dfb5bb 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -1069,7 +1069,9 @@ amdgpu_vm_tlb_flush(struct amdgpu_vm_update_params *params, } ...
bf2084a7b1d75d093b6a79df4c10142d49fbaa0e
Analyze and fix the following issue in the Linux kernel code: drm/amdkfd: Use huge page size to check split svm range alignment
Problem Details: When split svm ranges that have been mapped using huge page should use huge page size(2MB) to check split range alignment, not prange->granularity that means migration granularity. Fixes: 7ef6b2d4b7e5 ("drm/amdkfd: remap unaligned svm ranges that have split") Signed-off-by: Xiaogang Chen <xiaogang.che...
```diff diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c index 97c2270f278f..79ea138897fc 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c @@ -1144,30 +1144,48 @@ static int svm_range_split_tail(struct svm_range *prange, uint64_t new_l...
491adc6a0f9903c32b05f284df1148de39e8e644
Analyze and fix the following issue in the Linux kernel code: drm/ttm: Avoid NULL pointer deref for evicted BOs
Problem Details: It is possible for a BO to exist that is not currently associated with a resource, e.g. because it has been evicted. When devcoredump tries to read the contents of all BOs for dumping, we need to expect this as well -- in this case, ENODATA is recorded instead of the buffer contents. Fixes: 7d08df5d0...
```diff diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c index b47020fca199..e6abc7b40b18 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_vm.c +++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c @@ -434,6 +434,11 @@ int ttm_bo_access(struct ttm_buffer_object *bo, unsigned long offset, if (ret) return ret; ...
bc0515ece3d50ea61f76795bcdb42b09640c11e1
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: fix error handling in amdgpu_copy_buffer
Problem Details: drm_sched_job_add_resv_dependencies can fail in amdgpu_ttm_prepare_job. In this case we need to use amdgpu_job_free to release memory. --- v4: moved job pointer clearing to a different patchset --- Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Reviewed-by: Christian K...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 26f0dac049a5..dcf53a78a28a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -2393,7 +2393,7 @@ int amdgpu_copy_buffer(struct amdgpu_device *adev, uint64_t src...
a5192fbb2ee4225122efdfcaea53d50e9f477055
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: fix mes code error for muti-xcc
Problem Details: Fix some code error for muti-xcc on mes v12_1. Signed-off-by: Likun Gao <Likun.Gao@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v12_1.c b/drivers/gpu/drm/amd/amdgpu/mes_v12_1.c index 06c5b923957b..02200747446f 100644 --- a/drivers/gpu/drm/amd/amdgpu/mes_v12_1.c +++ b/drivers/gpu/drm/amd/amdgpu/mes_v12_1.c @@ -37,6 +37,7 @@ MODULE_FIRMWARE("amdgpu/gc_12_1_0_mes1.bin"); MODULE_FIRMWARE("amdgpu/...
8b971ce0cbc71a10f1d19d2bb6f3dc5c6f07d9d9
Analyze and fix the following issue in the Linux kernel code: drm/amd/ras: Reduce stack usage in ras_umc_handle_bad_pages()
Problem Details: ras_umc_handle_bad_pages() function used a large local array: struct eeprom_umc_record records[MAX_ECC_NUM_PER_RETIREMENT]; Move this array off the stack by allocating it with kcalloc() and freeing it before return. This reduces the stack frame size of ras_umc_handle_bad_pages() and avoids the fram...
```diff diff --git a/drivers/gpu/drm/amd/ras/rascore/ras_umc.c b/drivers/gpu/drm/amd/ras/rascore/ras_umc.c index 4dae64c424a2..a0fdc3fda761 100644 --- a/drivers/gpu/drm/amd/ras/rascore/ras_umc.c +++ b/drivers/gpu/drm/amd/ras/rascore/ras_umc.c @@ -497,27 +497,40 @@ exit: int ras_umc_handle_bad_pages(struct ras_core_c...
e3b8d8cc8c60db6c2be1251664da68b3e021a672
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix SHMEM alignment mode for GFX 12.1.0
Problem Details: Alignment mode in SHMEM config register is only a single bit value on GFX 12.1.0 instead of 2 bits in previous asics. Add a new enum and use the correct value of SHMEM alignment mode when programming the SHMEM config register. Signed-off-by: Mukul Joshi <mukul.joshi@amd.com> Reviewed-by: Hawking Zhang...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c index 3080aecc8341..023a8a1114a3 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c @@ -52,9 +52,10 @@ MODULE_FIRMWARE("amdgpu/gc_12_1_0_mec.bin"); MODULE_FIRMWARE("amdgpu...
7a5fb05b5b18e531989aa55b10dfa4be0633207e
Analyze and fix the following issue in the Linux kernel code: amdkfd: Bump ABI to indicate presence of Trap handler support for expert scheduling
Problem Details: commit 0f0c8a6983db ("drm/amdkfd: Trap handler support for expert scheduling mode") introduced support for a trap handler when expert scheduling mode. However userspace needs to know whether or not a trap handler support is present. Bump the KFD IOCTL API so that userspace can key off this to decide. ...
```diff diff --git a/include/uapi/linux/kfd_ioctl.h b/include/uapi/linux/kfd_ioctl.h index 84aa24c02715..4d0c1a53f9d5 100644 --- a/include/uapi/linux/kfd_ioctl.h +++ b/include/uapi/linux/kfd_ioctl.h @@ -45,9 +45,10 @@ * - 1.17 - Add SDMA queue creation with target SDMA engine ID * - 1.18 - Rename pad in set_memory_...
67b032daa288b70df2e6cb2c3a9cefcae0c6fa5f
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Promote DC to 3.2.362
Problem Details: This version brings along the following updates: - Defer transitions from minimal state to final state - Remove periodic detection callbacks from dcn35+ - Fixes for S0i3 exit - Refactor dml_core_mode_support to reduce stack frame - Add additional info from DML for DMU Signed-off-by: Taimur Hassa...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 5ab4c407350d..9182a4f7dd37 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -63,7 +63,7 @@ struct dcn_dsc_reg_state; struct dcn_optc_reg_state; struct dcn_dccg_reg_state; ...
fdcc620b02e2e4af77d5c81f546dddea4eb7971f
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fixes for S0i3 exit
Problem Details: [why & how] Add debug flag "ignore_pg" to dcn32 PG functions. Update default z10 support status. Temp disable RFB features for ASIC. Remove legacy code path. Reviewed-by: Charlene Liu <charlene.liu@amd.com> Signed-off-by: Ovidiu Bunea <ovidiu.bunea@amd.com> Signed-off-by: Chenyu Chen <chen-yu.chen@amd...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dio/dcn35/dcn35_dio_link_encoder.c b/drivers/gpu/drm/amd/display/dc/dio/dcn35/dcn35_dio_link_encoder.c index 319eb1061ba8..20bf04dac609 100644 --- a/drivers/gpu/drm/amd/display/dc/dio/dcn35/dcn35_dio_link_encoder.c +++ b/drivers/gpu/drm/amd/display/dc/dio/dcn35/dcn35_...
820b3d376e8a102c6aeab737ec6edebbbb710e04
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: don't attach the tlb fence for SI
Problem Details: SI hardware doesn't support pasids, user mode queues, or KIQ/MES so there is no need for this. Doing so results in a segfault as these callbacks are non-existent for SI. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4744 Fixes: f3854e04b708 ("drm/amdgpu: attach tlb fence to the PTs update")...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 6a2ea200d90c..0eccb31793ca 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -1069,7 +1069,9 @@ amdgpu_vm_tlb_flush(struct amdgpu_vm_update_params *params, } ...
97b2e10e9467a4086e72cf9146d4699fc9baf1c0
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/sdma_v7_1: Add missing inst_mask entry in sdma_v7_1_inst_gfx_resume()
Problem Details: The comment for sdma_v7_1_inst_gfx_resume() did not include the inst_mask parameter, even though the function takes it as an argument. Update the comment to document inst_mask as the mask of SDMA engine instances to be enabled. Fixes the below with gcc W=1: drivers/gpu/drm/amd/amdgpu/sdma_v7_1.c:644 ...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v7_1.c b/drivers/gpu/drm/amd/amdgpu/sdma_v7_1.c index 37f5095c1511..753512276e37 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v7_1.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v7_1.c @@ -607,7 +607,7 @@ static int sdma_v7_1_gfx_resume_instance(struct amdgpu_device *adev, ...
e3491fa3f3c94d47e7b82604ca7b9925987f1683
Analyze and fix the following issue in the Linux kernel code: amdkfd: process debug trap ioctl only on a primary context
Problem Details: Set_debug_trap ioctl should work on a specific kfd_process even when multiple contexts feature is implemented. For consistency, this commit allow set_debug_trap ioctl only work on the primary kfd process of a user space program Signed-off-by: Zhu Lingshan <lingshan.zhu@amd.com> Reviewed-by: Felix Kue...
```diff diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c index 14bee49f0bf9..092a2b8aaea1 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c @@ -2931,6 +2931,12 @@ static int kfd_ioctl_set_debug_trap(struct file *filep, st...
e5a30c303b07a4d6083e0f7f051b53add6d93c5d
Analyze and fix the following issue in the Linux kernel code: workqueue: Process rescuer work items one-by-one using a cursor
Problem Details: Previously, the rescuer scanned for all matching work items at once and processed them within a single rescuer thread, which could cause one blocking work item to stall all others. Make the rescuer process work items one-by-one instead of slurping all matches in a single pass. Break the rescuer loop ...
```diff diff --git a/kernel/workqueue.c b/kernel/workqueue.c index f8371aa54dca..7f9225936cd9 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -117,6 +117,8 @@ enum wq_internal_consts { MAYDAY_INTERVAL = HZ / 10, /* and then every 100ms */ CREATE_COOLDOWN = HZ, /* time to breath after fail */ + RESC...
448ee45353ef9fb1a34f5f26eb3f48923c6f0898
Analyze and fix the following issue in the Linux kernel code: drm/amdkfd: Use huge page size to check split svm range alignment
Problem Details: When split svm ranges that have been mapped using huge page should use huge page size(2MB) to check split range alignment, not prange->granularity that means migration granularity. Fixes: 7ef6b2d4b7e5 ("drm/amdkfd: remap unaligned svm ranges that have split") Signed-off-by: Xiaogang Chen <xiaogang.che...
```diff diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c index 657f04385052..215740bc2b86 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c @@ -1144,30 +1144,48 @@ static int svm_range_split_tail(struct svm_range *prange, uint64_t new_l...
9c34a4c19efa8686737c03f1718618da58cae546
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Fix golden register init for GFX 12.1.0
Problem Details: TCP_UTCL0 registers are not per XCD so don't init them on a per XCD basis. Fixes: ad5f1ee0a9b0 ("drm/amdgpu: Add initial support for gfx v12_1") Signed-off-by: Mukul Joshi <mukul.joshi@amd.com> Reviewed-by: Alex Sierra <alex.sierra@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c index b2702287536f..a16cd26e9a1b 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c @@ -2509,22 +2509,18 @@ static void gfx_v12_1_xcc_disable_gpa_mode(struct amdgpu_device *...
f8692d2f9ae0a48bf378cc33717772c5f940ce0d
Analyze and fix the following issue in the Linux kernel code: drm/amd: include rrmt mode for mes_v12_1
Problem Details: Implement rrmt for misc read/write regs ops in mes_v12. This covers LOCAL/REMOTE XCD and LOCAL/REMOTE AID. v2: fix comments (Alex) Signed-off-by: Alex Sierra <alex.sierra@amd.com> Reviewed-by: Mukul Joshi <mukul.joshi@amd.com> Reviewed-by: Michael Chen <michael.chen@amd.com> Signed-off-by: Alex Deuch...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v12_1.c b/drivers/gpu/drm/amd/amdgpu/mes_v12_1.c index ee5a2317e414..e0a037a780a0 100644 --- a/drivers/gpu/drm/amd/amdgpu/mes_v12_1.c +++ b/drivers/gpu/drm/amd/amdgpu/mes_v12_1.c @@ -44,6 +44,14 @@ static int mes_v12_1_kiq_hw_fini(struct amdgpu_device *adev, uint32_t ...
6ee43047e8ada63c4dfee01e2ea7e7eadfcda2ab
Analyze and fix the following issue in the Linux kernel code: cpuset: Remove unnecessary checks in rebuild_sched_domains_locked
Problem Details: Commit 406100f3da08 ("cpuset: fix race between hotplug work and later CPU offline") added a check for empty effective_cpus in partitions for cgroup v2. However, this check did not account for remote partitions, which were introduced later. After commit 2125c0034c5d ("cgroup/cpuset: Make cpuset hotplug...
```diff diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index 6e6eb09b8db6..fea577b4016a 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -1103,53 +1103,33 @@ void dl_rebuild_rd_accounting(void) */ void rebuild_sched_domains_locked(void) { - struct cgroup_subsys_state *pos_css; str...
25f687de6735beb5627e3f4d1445e3c4ce4b67e1
Analyze and fix the following issue in the Linux kernel code: drm/amd/include : Update MES v12 API header
Problem Details: 1. Add RRMT option support which will be used for remote die register access 2. Update set_hw_resource1 for cooperative mode support 3. Add full_sh_mem_config_data for xnack support v2: squash in compilation fix Signed-off-by: Shaoyun Liu <shaoyun.liu@amd.com> Acked-by: Alex Deucher <alexander.deu...
```diff diff --git a/drivers/gpu/drm/amd/include/mes_v12_api_def.h b/drivers/gpu/drm/amd/include/mes_v12_api_def.h index 2f12cba4eb66..256eb7f702f6 100644 --- a/drivers/gpu/drm/amd/include/mes_v12_api_def.h +++ b/drivers/gpu/drm/amd/include/mes_v12_api_def.h @@ -310,7 +310,8 @@ union MESAPI_SET_HW_RESOURCES_1 { unio...
b4f1e6a2718caef34bf990c705ff2bb64b730b77
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: correct kernel-doc in dml21_wrapper.h
Problem Details: Fix all kernel-doc warnings in dml21_wrapper.h: - add missing @dml_ctx entries (2 places) - fix function prototype typo for dml21_create() - change a blank kernel-doc line to " *" Fixes these warnings: Warning: drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper.h:30 function parameter 'dml_ctx...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper.h b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper.h index 15f92029d2e5..b508bbcc0e16 100644 --- a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper.h +++ b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper.h @@ -1...
f433db9c4b36c0963616def8dcc4696d1aafb95e
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Promote DC to 3.2.361
Problem Details: This version brings along the following updates: - Fix wrong x_pos and y_pos for cursor offload. - Fix Smart Power OLED not working after S4. - Fix double cursor when switching between hw and sw cursor. - Add configurable SPL namespace prefix. - Add register definitions in dcn_hubbub_registers. ...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 27b202f66541..f189e7382160 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -63,7 +63,7 @@ struct dcn_dsc_reg_state; struct dcn_optc_reg_state; struct dcn_dccg_reg_state; ...
c02288724b98cbc018231200891d66578f83f848
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix wrong x_pos and y_pos for cursor offload
Problem Details: [Why] The hubp401_cursor_set_position function programs a different value than it stores for use with cursor offload. This can cause a desync when switching between cursor programming paths. [How] We do the translation to destination space currently twice: once in the HWSS layer, and then again in th...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c b/drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c index f01eae50d02f..c205500290ec 100644 --- a/drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c +++ b/drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c @@ -733,10 +733,8...
4ab27b01df629545de5a5f9889867b0f19438cd8
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Remove unused encoder types
Problem Details: [Why&How] We only support ENCODER_ID_INTERNAL_UNIPHY encoders now, so NUTMEG & TRAVIS can be removed from translate_encoder_to_transmitter. Also refactor to use local variables of transmitter to exit early. V2: Fix construct_phy check for TRANSMITTER_UKNOWN Signed-off-by: Ivan Lipski <ivan.lipski@a...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/link/link_factory.c b/drivers/gpu/drm/amd/display/dc/link/link_factory.c index e9af184dbe5d..e9f966b5be65 100644 --- a/drivers/gpu/drm/amd/display/dc/link/link_factory.c +++ b/drivers/gpu/drm/amd/display/dc/link/link_factory.c @@ -354,24 +354,6 @@ static enum transmit...
1c85f12658fb42136197ab0b580c4f4d4b707875
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Update Generate PTE/PDE SDMA packet for SDMA 7.1
Problem Details: Update the Generate PTE/PDE packet fields for SDMA 7.1. v2: squash in mtype fix (Mukul) Signed-off-by: Mukul Joshi <mukul.joshi@amd.com> Reviewed-by: Alex Sierra <alex.sierra@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v7_1.c b/drivers/gpu/drm/amd/amdgpu/sdma_v7_1.c index 2cdb6def010e..89ce07ae18b4 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v7_1.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v7_1.c @@ -1155,7 +1155,16 @@ static void sdma_v7_1_vm_set_pte_pde(struct amdgpu_ib *ib, ...
46e0c86caa172b6dc711ed595a3b4655666698d7
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Promote DC to 3.2.360
Problem Details: This version brings along the following updates: - Add additional checks for PSP footer size - Correct DSC padding accounting - Check ATOM_DEVICE_CRT2_SUPPORT in dc_load_detection - Drop FPU flags from dml21_wrapper.c - Permit DC_FP_START/END only in non-FP compilation units - Add cursor offload abort ...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 57df6dc81041..508ddef86a31 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -63,7 +63,7 @@ struct dcn_dsc_reg_state; struct dcn_optc_reg_state; struct dcn_dccg_reg_state; ...
6d76189a84484060a93e961c6eed5593144c253d
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix sending redundant enable command to dmub
Problem Details: [WHY & HOW] Fix sending repeating PR enable/disable command to dmub which causing performance problem Reviewed-by: Robin Chen <robin.chen@amd.com> Signed-off-by: Jack Chang <jack.chang@amd.com> Signed-off-by: Leon Huang <Leon.Huang1@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: ...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c index 07f4f15851fc..99741c1334ca 100644 --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c +++ b/drivers/gpu/drm/amd/display/dc/l...
ca4310e86b527c61f15a9e7b8b1dc062daba8463
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Parse debug flag to PR FW
Problem Details: [HOW & WHY] Parse debug flag to PR FW. Reviewed-by: Robin Chen <robin.chen@amd.com> Signed-off-by: Jack Chang <jack.chang@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c index 80ee6efe91e2..07f4f15851fc 100644 --- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c +++ b/drivers/gpu/drm/amd/display/dc/l...
2634ef1b8c00207dde5101e926241957aa5652b8
Analyze and fix the following issue in the Linux kernel code: drm/amdkfd: Fix PTE clearing during SVM unmap on GFX 12.1
Problem Details: During migration from VRAM to RAM, when PTE is cleared, reset the PTE to always ensure that PTE.P=1 is set on GFX 12.1. If PTE.P is not set, it can lead to TF faults. Signed-off-by: Mukul Joshi <mukul.joshi@amd.com> Reviewed-by: Alex Sierra <alex.sierra@amd.com> Signed-off-by: Alex Deucher <alexander....
```diff diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c index 97c2270f278f..24a698702da7 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c @@ -1313,7 +1313,7 @@ svm_range_unmap_from_gpu(struct amdgpu_device *adev, struct amdgpu_vm *vm, ...
d09c6b98f8080c3ae55d75023ed80fdbaf3519d4
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: fix spelling in gmc9/10 code
Problem Details: onyl -> only Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c index ce6e04242c52..47558e572553 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c @@ -117,7 +117,7 @@ static int gmc_v10_0_process_interrupt(struct amdgpu_device *adev, ...
bd68a1404b6fa2e7e9957b38ba22616faba43e75
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/ras: Move ras data alloc before bad page check
Problem Details: In the rare event if eeprom has only invalid address entries, allocation is skipped, this causes following NULL pointer issue [ 547.103445] BUG: kernel NULL pointer dereference, address: 0000000000000010 [ 547.118897] #PF: supervisor read access in kernel mode [ 547.130292] #PF: error_code(0x0000) -...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index d79b41ce2124..3d51a3c8852a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c @@ -3076,6 +3076,11 @@ static int __amdgpu_ras_restore_bad_pages(struct amdgpu_device...
d8c2c6c33d494a7868584b0e741628af662bf621
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Map/Unmap MMIO_REMAP as BAR register window; add TTM sg helpers; wire dma-buf
Problem Details: MMIO_REMAP (HDP flush page) exposes a hardware MMIO register window via a PCI BAR; there are no struct pages backing it (not normal RAM). But when one device shares memory with another through dma-buf, the receiver still expects a delivery route—a list of DMA-able chunks—called an sg_table. For the BA...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c index e22cfa7c6d32..5f7d19f4c221 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c @@ -37,6 +37,7 @@ #include "amdgpu_dma_buf.h" #include "amdgpu_xgmi...
f752e79d38857011f1293fcb6c810409c3b669ee
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: fix the calculation of RAS bad page number
Problem Details: __amdgpu_ras_restore_bad_pages is responsible for the maintenance of bad page number, drop the unnecessary bad page number update in the error handling path of add_bad_pages. Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <ale...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index 2a6cf7963dde..d79b41ce2124 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c @@ -3249,8 +3249,6 @@ int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev, ...
f6b1c1f5fd7237f77fc3880603ea54dcf0371a20
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: GPU vm support 5-level page table
Problem Details: If GPU supports 5-level page table, but CPU disable 5-level page table by using boot option no5lvl or CPU feature not available, the virtual address will be 48bit, not needed to enable 5-level page table on GPU vm. If adev->vm_manager.num_level, number of pde levels, set to 4, then gfxhub and mmhub re...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 3b002e37b55b..6a2ea200d90c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -2360,9 +2360,26 @@ void amdgpu_vm_adjust_size(struct amdgpu_device *adev, uint32_t mi...
539d821df2938368c8b175cadd6f463de61d4be3
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: fix NULL pointer issue for supports_baco
Problem Details: Return 0 if the realted ASIC do not have supports_baco function to fix the NULL pointer issue. Signed-off-by: Likun Gao <Likun.Gao@amd.com> Reviewed-by: Le Ma <le.ma@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 9f9774f58ce1..221671dca2a8 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -1545,7 +1545,8 @@ int emu_soc_asic_init(struct amdgpu_device *adev); #define amdgpu_asic_get_pci...
9877a865d62c9c3e0f4cc369dc9ca9f7f24f5ee9
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: fix NULL pointer issue buffer funcs
Problem Details: If SDMA block not enabled, buffer_funcs will not initialize, fix the null pointer issue if buffer_funcs not initialized. Signed-off-by: Likun Gao <Likun.Gao@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 903c4706040d..c8d1e5565c31 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -3311,7 +3311,8 @@ static int amdgpu_device_ip_init(struct amdgpu_devi...
3309b63a2281efb72df7621d60cc1246b6286ad3
Analyze and fix the following issue in the Linux kernel code: cgroup: rstat: use LOCK CMPXCHG in css_rstat_updated
Problem Details: On x86-64, this_cpu_cmpxchg() uses CMPXCHG without LOCK prefix which means it is only safe for the local CPU and not for multiple CPUs. Recently the commit 36df6e3dbd7e ("cgroup: make css_rstat_updated nmi safe") make css_rstat_updated lockless and uses lockless list to allow reentrancy. Since css_rsta...
```diff diff --git a/kernel/cgroup/rstat.c b/kernel/cgroup/rstat.c index a198e40c799b..150e5871e66f 100644 --- a/kernel/cgroup/rstat.c +++ b/kernel/cgroup/rstat.c @@ -71,7 +71,6 @@ __bpf_kfunc void css_rstat_updated(struct cgroup_subsys_state *css, int cpu) { struct llist_head *lhead; struct css_rstat_cpu *rstatc;...
517a44d18537ef8ab888f71197c80116c14cee0a
Analyze and fix the following issue in the Linux kernel code: sched_ext: Fix the memleak for sch->helper objects
Problem Details: This commit use kthread_destroy_worker() to release sch->helper objects to fix the following kmemleak: unreferenced object 0xffff888121ec7b00 (size 128): comm "scx_simple", pid 1197, jiffies 4295884415 hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 ad 4e ad de .............N.....
```diff diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index 05f5a49e9649..073b669869cb 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -3575,7 +3575,7 @@ static void scx_sched_free_rcu_work(struct work_struct *work) int node; irq_work_sync(&sch->error_irq_work); - kthread_stop(sch->helper->task...
cd77d5a4aaf8c5c1d819f47cf814bf7d4920b0a2
Analyze and fix the following issue in the Linux kernel code: accel/amdxdna: Fix tail-pointer polling in mailbox_get_msg()
Problem Details: In mailbox_get_msg(), mailbox_reg_read_non_zero() is called to poll for a non-zero tail pointer. This assumed that a zero value indicates an error. However, certain corner cases legitimately produce a zero tail pointer. To handle these cases, remove mailbox_reg_read_non_zero(). The zero tail pointer wi...
```diff diff --git a/drivers/accel/amdxdna/amdxdna_mailbox.c b/drivers/accel/amdxdna/amdxdna_mailbox.c index 858df97cd3fb..a60a85ce564c 100644 --- a/drivers/accel/amdxdna/amdxdna_mailbox.c +++ b/drivers/accel/amdxdna/amdxdna_mailbox.c @@ -112,22 +112,6 @@ static u32 mailbox_reg_read(struct mailbox_channel *mb_chann, u3...
ebae102897e760e9e6bc625f701dd666b2163bd1
Analyze and fix the following issue in the Linux kernel code: nfsd: Mark variable __maybe_unused to avoid W=1 build break
Problem Details: Clang is not happy about set but (in some cases) unused variable: fs/nfsd/export.c:1027:17: error: variable 'inode' set but not used [-Werror,-Wunused-but-set-variable] since it's used as a parameter to dprintk() which might be configured a no-op. To avoid uglifying code with the specific ifdeffery j...
```diff diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index 9d55512d0cc9..2a1499f2ad19 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c @@ -1024,7 +1024,7 @@ exp_rootfh(struct net *net, struct auth_domain *clp, char *name, { struct svc_export *exp; struct path path; - struct inode *inode; + struct inode ...
d1bea0ce35b6095544ee82bb54156fc62c067e58
Analyze and fix the following issue in the Linux kernel code: svcrdma: bound check rq_pages index in inline path
Problem Details: svc_rdma_copy_inline_range indexed rqstp->rq_pages[rc_curpage] without verifying rc_curpage stays within the allocated page array. Add guards before the first use and after advancing to a new page. Fixes: d7cc73972661 ("svcrdma: support multiple Read chunks per RPC") Cc: stable@vger.kernel.org Signed-...
```diff diff --git a/net/sunrpc/xprtrdma/svc_rdma_rw.c b/net/sunrpc/xprtrdma/svc_rdma_rw.c index e813e5463352..310de7a80be5 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_rw.c +++ b/net/sunrpc/xprtrdma/svc_rdma_rw.c @@ -841,6 +841,9 @@ static int svc_rdma_copy_inline_range(struct svc_rqst *rqstp, for (page_no = 0; page_no...
94972027ab55b200e031059fd6c7a649f8248020
Analyze and fix the following issue in the Linux kernel code: svcrdma: return 0 on success from svc_rdma_copy_inline_range
Problem Details: The function comment specifies 0 on success and -EINVAL on invalid parameters. Make the tail return 0 after a successful copy loop. Fixes: d7cc73972661 ("svcrdma: support multiple Read chunks per RPC") Cc: stable@vger.kernel.org Signed-off-by: Joshua Rogers <linux@joshua.hu> Signed-off-by: Chuck Lever...
```diff diff --git a/net/sunrpc/xprtrdma/svc_rdma_rw.c b/net/sunrpc/xprtrdma/svc_rdma_rw.c index 945fbb374331..e813e5463352 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_rw.c +++ b/net/sunrpc/xprtrdma/svc_rdma_rw.c @@ -860,7 +860,7 @@ static int svc_rdma_copy_inline_range(struct svc_rqst *rqstp, offset += page_len; } ...
a8ee9099f30654917aa68f55d707b5627e1dbf77
Analyze and fix the following issue in the Linux kernel code: svcrdma: use rc_pageoff for memcpy byte offset
Problem Details: svc_rdma_copy_inline_range added rc_curpage (page index) to the page base instead of the byte offset rc_pageoff. Use rc_pageoff so copies land within the current page. Found by ZeroPath (https://zeropath.com) Fixes: 8e122582680c ("svcrdma: Move svc_rdma_read_info::ri_pageno to struct svc_rdma_recv_ct...
```diff diff --git a/net/sunrpc/xprtrdma/svc_rdma_rw.c b/net/sunrpc/xprtrdma/svc_rdma_rw.c index 661b3fe2779f..945fbb374331 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_rw.c +++ b/net/sunrpc/xprtrdma/svc_rdma_rw.c @@ -848,7 +848,7 @@ static int svc_rdma_copy_inline_range(struct svc_rqst *rqstp, head->rc_page_count++; ...
d4b69a6186b215d2dc1ebcab965ed88e8d41768d
Analyze and fix the following issue in the Linux kernel code: SUNRPC: svcauth_gss: avoid NULL deref on zero length gss_token in gss_read_proxy_verf
Problem Details: A zero length gss_token results in pages == 0 and in_token->pages[0] is NULL. The code unconditionally evaluates page_address(in_token->pages[0]) for the initial memcpy, which can dereference NULL even when the copy length is 0. Guard the first memcpy so it only runs when length > 0. Fixes: 5866efa8cb...
```diff diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c index a8ec30759a18..e2f0df8cdaa6 100644 --- a/net/sunrpc/auth_gss/svcauth_gss.c +++ b/net/sunrpc/auth_gss/svcauth_gss.c @@ -1083,7 +1083,8 @@ static int gss_read_proxy_verf(struct svc_rqst *rqstp, } length = min_t(unsigned ...
646013f513f38a3e75a60fde31ae0e6154ce19a7
Analyze and fix the following issue in the Linux kernel code: dma-buf: enable DMABUF_DEBUG by default on DEBUG kernels
Problem Details: The overhead of enforcing the DMA-buf rules for importers is now so low that it safe to enable it by default on DEBUG kernels. This will hopefully result in fixing more issues in importers. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.co...
```diff diff --git a/drivers/dma-buf/Kconfig b/drivers/dma-buf/Kconfig index b46eb8a552d7..fdd823e446cc 100644 --- a/drivers/dma-buf/Kconfig +++ b/drivers/dma-buf/Kconfig @@ -55,7 +55,7 @@ config DMABUF_MOVE_NOTIFY config DMABUF_DEBUG bool "DMA-BUF debug checks" depends on DMA_SHARED_BUFFER - default y if DMA_API_...
51db5336e16de25074ef63d29b8a762a25d193d3
Analyze and fix the following issue in the Linux kernel code: dma-buf: improve sg_table debugging hack v4
Problem Details: This debugging hack is important to enforce the rule that importers should *never* touch the underlying struct page of the exporter. Instead of just mangling the page link create a copy of the sg_table but only copy over the DMA addresses and not the pages. This will cause a NULL pointer de-reference...
```diff diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index 2305bb2cc1f1..533ea17b7175 100644 --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c @@ -35,6 +35,12 @@ #include "dma-buf-sysfs-stats.h" +/* Wrapper to hide the sg_table page link from the importer */ +struct dma_buf_sg_t...
29763138830916f46daaa50e83e7f4f907a3236b
Analyze and fix the following issue in the Linux kernel code: KVM: nVMX: Immediately refresh APICv controls as needed on nested VM-Exit
Problem Details: If an APICv status updated was pended while L2 was active, immediately refresh vmcs01's controls instead of pending KVM_REQ_APICV_UPDATE as kvm_vcpu_update_apicv() only calls into vendor code if a change is necessary. E.g. if APICv is inhibited, and then activated while L2 is running: kvm_vcpu_upda...
```diff diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c index bcea087b642f..1725c6a94f99 100644 --- a/arch/x86/kvm/vmx/nested.c +++ b/arch/x86/kvm/vmx/nested.c @@ -19,6 +19,7 @@ #include "trace.h" #include "vmx.h" #include "smm.h" +#include "x86_ops.h" static bool __read_mostly enable_shadow_vm...
b2849bec936be642b5420801f902337f2507648e
Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Update SVI during runtime APICv activation
Problem Details: The APICv (apic->apicv_active) can be activated or deactivated at runtime, for instance, because of APICv inhibit reasons. Intel VMX employs different mechanisms to virtualize LAPIC based on whether APICv is active. When APICv is activated at runtime, GUEST_INTR_STATUS is used to configure and report ...
```diff diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index 91b6f2f3edc2..c3b9eb72b6f3 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -6886,15 +6886,6 @@ void vmx_hwapic_isr_update(struct kvm_vcpu *vcpu, int max_isr) * VM-Exit, otherwise L1 with run with a stale SVI. */ if (i...
70075e3d0ca0b72cc983d03f7cd9796e43492980
Analyze and fix the following issue in the Linux kernel code: s390/bug: Add missing alignment
Problem Details: All objects are supposed to have a minimal alignment of two, since a couple of instructions only work with even addresses. Add the missing align statement for the file string. Fixes: 6584ff203aec ("bugs/s390: Use 'cond_str' in __EMIT_BUG()") Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
```diff diff --git a/arch/s390/include/asm/bug.h b/arch/s390/include/asm/bug.h index 063ada55fbd1..ee9221bb5d18 100644 --- a/arch/s390/include/asm/bug.h +++ b/arch/s390/include/asm/bug.h @@ -11,6 +11,7 @@ #else #define __BUGVERBOSE_LOCATION(file, line) \ .pushsection .rodata.str, "aMS", @progbits, 1; \ + .align...
1a82d430c5f05d4bf15b86a9f0349e4a24ec485c
Analyze and fix the following issue in the Linux kernel code: s390/bug: Add missing CONFIG_BUG ifdef again
Problem Details: Fallback to generic BUG implementation in case CONFIG_BUG is disabled. This restores the old behaviour before 'cond_str' support was added. It probably doesn't matter, since nobody should disable CONFIG_BUG, but at least this is consistent to before. Fixes: 6584ff203aec ("bugs/s390: Use 'cond_str' in...
```diff diff --git a/arch/s390/include/asm/bug.h b/arch/s390/include/asm/bug.h index acb4b13d98c5..063ada55fbd1 100644 --- a/arch/s390/include/asm/bug.h +++ b/arch/s390/include/asm/bug.h @@ -4,6 +4,8 @@ #include <linux/stringify.h> +#ifdef CONFIG_BUG + #ifndef CONFIG_DEBUG_BUGVERBOSE #define _BUGVERBOSE_LOCATION...
9a97857db0c5655b8932f86b5d18bb959079b0ee
Analyze and fix the following issue in the Linux kernel code: ALSA: uapi: Fix typo in asound.h comment
Problem Details: Fix 'level-shit' to 'level-shift' in struct snd_cea_861_aud_if comment. Fixes: 7ba1c40b536e ("ALSA: Add definitions for CEA-861 Audio InfoFrames") Signed-off-by: Andres J Rosa <andyrosa@gmail.com> Link: https://patch.msgid.link/20251203162509.1822-1-andyrosa@gmail.com Signed-off-by: Takashi Iwai <tiwa...
```diff diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h index 5a049eeaecce..d3ce75ba938a 100644 --- a/include/uapi/sound/asound.h +++ b/include/uapi/sound/asound.h @@ -60,7 +60,7 @@ struct snd_cea_861_aud_if { unsigned char db2_sf_ss; /* sample frequency and size */ unsigned char db3; /* not ...
b64a14334ef3ebbcf70d11bc67d0934bdc0e390d
Analyze and fix the following issue in the Linux kernel code: drm/xe/throttle: Skip reason prefix while emitting array
Problem Details: The newly introduced "reasons" attribute already signifies possible reasons for throttling and makes the prefix in individual attribute names redundant while emitting them as an array. Skip the prefix. Fixes: 83ccde67a3f7 ("drm/xe/gt_throttle: Avoid TOCTOU when monitoring reasons") Signed-off-by: Raag...
```diff diff --git a/drivers/gpu/drm/xe/xe_gt_throttle.c b/drivers/gpu/drm/xe/xe_gt_throttle.c index 096a6187ff12..570358310e97 100644 --- a/drivers/gpu/drm/xe/xe_gt_throttle.c +++ b/drivers/gpu/drm/xe/xe_gt_throttle.c @@ -137,7 +137,7 @@ static ssize_t reasons_show(struct kobject *kobj, struct throttle_attribute *o...
2f393c228cc519ddf19b8c6c05bf15723241aa96
Analyze and fix the following issue in the Linux kernel code: KVM: s390: Fix gmap_helper_zap_one_page() again
Problem Details: A few checks were missing in gmap_helper_zap_one_page(), which can lead to memory corruption in the guest under specific circumstances. Add the missing checks. Fixes: 5deafa27d9ae ("KVM: s390: Fix to clear PTE when discarding a swapped page") Cc: stable@vger.kernel.org Reported-by: Marc Hartmayer <mh...
```diff diff --git a/arch/s390/mm/gmap_helpers.c b/arch/s390/mm/gmap_helpers.c index 549f14ad08af..d41b19925a5a 100644 --- a/arch/s390/mm/gmap_helpers.c +++ b/arch/s390/mm/gmap_helpers.c @@ -47,6 +47,7 @@ static void ptep_zap_softleaf_entry(struct mm_struct *mm, softleaf_t entry) void gmap_helper_zap_one_page(struct m...
70478348fc6d52d5bb7568a035d3cbe5bcc6af4c
Analyze and fix the following issue in the Linux kernel code: Documentation/gpu/drm-mm: Add THP paragraph to GEM mapping section
Problem Details: Add a paragraph to the GEM Objects Creation section about the drm_gem_huge_mnt_create() helper and to the GEM objects mapping section explaining how transparent huge pages are handled by GEM. v4: - fix wording after huge_pages handler removal v6: - fix wording after map_pages handler removal v11: - ...
```diff diff --git a/Documentation/gpu/drm-mm.rst b/Documentation/gpu/drm-mm.rst index d55751cad67c..f22433470c76 100644 --- a/Documentation/gpu/drm-mm.rst +++ b/Documentation/gpu/drm-mm.rst @@ -155,7 +155,12 @@ drm_gem_object_init() will create an shmfs file of the requested size and store it into the struct :c:type:...
c12e9fcb5a5a9713e242e8c9c6adecdea5067241
Analyze and fix the following issue in the Linux kernel code: drm/panfrost: Introduce huge tmpfs mountpoint option
Problem Details: Introduce the 'panfrost.transparent_hugepage' boolean module parameter (false by default). When the parameter is set to true, a new tmpfs mountpoint is created and mounted using the 'huge=within_size' option. It's then used at GEM object creation instead of the default 'shm_mnt' mountpoint in order to ...
```diff diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c index c61b97af120c..dedc13e56631 100644 --- a/drivers/gpu/drm/panfrost/panfrost_device.c +++ b/drivers/gpu/drm/panfrost/panfrost_device.c @@ -12,6 +12,7 @@ #include "panfrost_device.h" #include "panfrost_devfr...
c569b369cc2114526bec2ba0a41a49cfc27609b4
Analyze and fix the following issue in the Linux kernel code: drm/panthor: Introduce huge tmpfs mountpoint option
Problem Details: Introduce the 'panthor.transparent_hugepage' boolean module parameter (false by default). When the parameter is set to true, a new tmpfs mountpoint is created and mounted using the 'huge=within_size' option. It's then used at GEM object creation instead of the default 'shm_mnt' mountpoint in order to e...
```diff diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c index e133b1e0ad6d..2979ee0e52c2 100644 --- a/drivers/gpu/drm/panthor/panthor_device.c +++ b/drivers/gpu/drm/panthor/panthor_device.c @@ -18,6 +18,7 @@ #include "panthor_devfreq.h" #include "panthor_device.h" #in...
f19f99bbaf9f91d0b0a95d760f4d6755758b913d
Analyze and fix the following issue in the Linux kernel code: drm/v3d: Use huge tmpfs mountpoint helpers
Problem Details: Make use of the new drm_gem_huge_mnt_create() and drm_gem_get_huge_mnt() helpers to avoid code duplication. Now that it's just a few lines long, the single function in v3d_gemfs.c is moved into v3d_gem.c. v3: - use huge tmpfs mountpoint in drm_device - move v3d_gemfs.c into v3d_gem.c v4: - clean up m...
```diff diff --git a/drivers/gpu/drm/v3d/Makefile b/drivers/gpu/drm/v3d/Makefile index fcf710926057..b7d673f1153b 100644 --- a/drivers/gpu/drm/v3d/Makefile +++ b/drivers/gpu/drm/v3d/Makefile @@ -13,8 +13,7 @@ v3d-y := \ v3d_trace_points.o \ v3d_sched.o \ v3d_sysfs.o \ - v3d_submit.o \ - v3d_gemfs.o + v3d_submit.o...
a8a9a590221c1959716277d4b13fe658816afc0e
Analyze and fix the following issue in the Linux kernel code: drm/i915: Use huge tmpfs mountpoint helpers
Problem Details: Make use of the new drm_gem_huge_mnt_create() and drm_gem_get_huge_mnt() helpers to avoid code duplication. Now that it's just a few lines long, the single function in i915_gemfs.c is moved into i915_gem_shmem.c. v3: - use huge tmpfs mountpoint in drm_device - move i915_gemfs.c into i915_gem_shmem.c ...
```diff diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile index 84ec79b64960..b5a8c0a6b747 100644 --- a/drivers/gpu/drm/i915/Makefile +++ b/drivers/gpu/drm/i915/Makefile @@ -169,8 +169,7 @@ gem-y += \ gem/i915_gem_ttm_move.o \ gem/i915_gem_ttm_pm.o \ gem/i915_gem_userptr.o \ - gem/i915_ge...
6e0b1b82017b9ba16b87685e1e4902cd9dc762d2
Analyze and fix the following issue in the Linux kernel code: drm/gem: Add huge tmpfs mountpoint helpers
Problem Details: Add the drm_gem_huge_mnt_create() and drm_gem_get_huge_mnt() helpers to avoid code duplication in the i915, V3D, Panfrost and Panthor drivers. The former creates and mounts a dedicated huge tmpfs mountpoint, for the lifetime of a DRM device, used at GEM object initialization. The latter retrieves the d...
```diff diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index 933fc89dd648..32dddb23e211 100644 --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm/drm_gem.c @@ -29,6 +29,9 @@ #include <linux/export.h> #include <linux/file.h> #include <linux/fs.h> +#ifdef CONFIG_TRANSPARENT_HUGEPAGE +#include <l...
31b931bebd11a0f00967114f62c8c38952f483e5
Analyze and fix the following issue in the Linux kernel code: dma-mapping: Fix DMA_BIT_MASK() macro being broken
Problem Details: After commit a50f7456f853 ("dma-mapping: Allow use of DMA_BIT_MASK(64) in global scope"), the DMA_BIT_MASK() macro is broken when passed non trivial statements for the value of 'n'. This is caused by the new version missing parenthesis around 'n' when evaluating 'n'. One example of this breakage is th...
```diff diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 2ceda49c609f..aa36a0d1d9df 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -90,7 +90,7 @@ */ #define DMA_MAPPING_ERROR (~(dma_addr_t)0) -#define DMA_BIT_MASK(n) GENMASK_ULL(n - 1, 0) +#define DMA_BIT...
463d439becb81383f3a5a5d840800131f265a09c
Analyze and fix the following issue in the Linux kernel code: dma/pool: eliminate alloc_pages warning in atomic_pool_expand
Problem Details: atomic_pool_expand iteratively tries the allocation while decrementing the page order. There is no need to issue a warning if an attempted allocation fails. Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com> Reviewed-by: Robin Murphy <robin.murphy@arm.com> Fixes: d7e673ec2c8e ("dma-pool: Only all...
```diff diff --git a/kernel/dma/pool.c b/kernel/dma/pool.c index ee45dee33d49..26392badc36b 100644 --- a/kernel/dma/pool.c +++ b/kernel/dma/pool.c @@ -93,7 +93,7 @@ static int atomic_pool_expand(struct gen_pool *pool, size_t pool_size, page = dma_alloc_from_contiguous(NULL, 1 << order, order, false); if...
18476087f1a18dc279d200d934ad94fba1fb51d5
Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix format string truncation warning
Problem Details: GCC notices that the 16-byte uabi_name field could theoretically be too small for the formatted string if the instance number exceeds 100. So grow the field to 20 bytes. drivers/gpu/drm/i915/intel_memory_region.c: In function ‘intel_memory_region_create’: drivers/gpu/drm/i915/intel_memory_region.c:27...
```diff diff --git a/drivers/gpu/drm/i915/intel_memory_region.h b/drivers/gpu/drm/i915/intel_memory_region.h index b3b75be9ced5..e9a4e6090fe0 100644 --- a/drivers/gpu/drm/i915/intel_memory_region.h +++ b/drivers/gpu/drm/i915/intel_memory_region.h @@ -72,7 +72,7 @@ struct intel_memory_region { u16 instance; enum int...
2d967310c49ed93ac11cef408a55ddf15c3dd52e
Analyze and fix the following issue in the Linux kernel code: gpiolib: acpi: Add quirk for Dell Precision 7780
Problem Details: Dell Precision 7780 often wakes up on its own from suspend. Sometimes wake up happens immediately (i. e. within 7 seconds), sometimes it happens after, say, 30 minutes. Fixes: 1796f808e4bb ("HID: i2c-hid: acpi: Stop setting wakeup_capable") Link: https://lore.kernel.org/linux-i2c/197ae95ffd8.dc819e604...
```diff diff --git a/drivers/gpio/gpiolib-acpi-quirks.c b/drivers/gpio/gpiolib-acpi-quirks.c index 7b95d1b03361..a0116f004975 100644 --- a/drivers/gpio/gpiolib-acpi-quirks.c +++ b/drivers/gpio/gpiolib-acpi-quirks.c @@ -370,6 +370,28 @@ static const struct dmi_system_id gpiolib_acpi_quirks[] __initconst = { .ignore_...
25faa5364638b86ec0d0edb4486daa9d40a0be8f
Analyze and fix the following issue in the Linux kernel code: i2c: spacemit: fix detect issue
Problem Details: This commit addresses two issues causing i2c detect to fail. The identified issues are: 1. Incorrect error handling for BED (Bus Error No ACK/NAK): Before this commit, Both ALD (Arbitration Loss Detected) and BED returned -EAGAIN. 2. Missing interrupt status clear after initialization in xfer()...
```diff diff --git a/drivers/i2c/busses/i2c-k1.c b/drivers/i2c/busses/i2c-k1.c index 6b918770e612..d42c03ef5db5 100644 --- a/drivers/i2c/busses/i2c-k1.c +++ b/drivers/i2c/busses/i2c-k1.c @@ -158,11 +158,16 @@ static int spacemit_i2c_handle_err(struct spacemit_i2c_dev *i2c) { dev_dbg(i2c->dev, "i2c error status: 0x%0...
a6ee6aac66fb394b7f6e6187c73bdcd873f2d139
Analyze and fix the following issue in the Linux kernel code: i2c: amd-mp2: fix reference leak in MP2 PCI device
Problem Details: In i2c_amd_probe(), amd_mp2_find_device() utilizes driver_find_next_device() which internally calls driver_find_device() to locate the matching device. driver_find_device() increments the reference count of the found device by calling get_device(), but amd_mp2_find_device() fails to call put_device() t...
```diff diff --git a/drivers/i2c/busses/i2c-amd-mp2-pci.c b/drivers/i2c/busses/i2c-amd-mp2-pci.c index ef7370d3dbea..60edbabc2986 100644 --- a/drivers/i2c/busses/i2c-amd-mp2-pci.c +++ b/drivers/i2c/busses/i2c-amd-mp2-pci.c @@ -458,13 +458,16 @@ struct amd_mp2_dev *amd_mp2_find_device(void) { struct device *dev; st...
08bfcf4ff9d39228150a757803fc02dffce84ab0
Analyze and fix the following issue in the Linux kernel code: docs: hwmon: fix link to g762 devicetree binding
Problem Details: The devicetree binding for g762 was converted to YAML to match vendor prefix conventions. Update the reference accordingly. Signed-off-by: Kathara Sasikumar <katharasasikumar007@gmail.com> Link: https://lore.kernel.org/r/20251205215835.783273-1-katharasasikumar007@gmail.com Fixes: 3d8e25372417 ("dt-bi...
```diff diff --git a/Documentation/hwmon/g762.rst b/Documentation/hwmon/g762.rst index 0371b3365c48..f224552a2d3c 100644 --- a/Documentation/hwmon/g762.rst +++ b/Documentation/hwmon/g762.rst @@ -17,7 +17,7 @@ done via a userland daemon like fancontrol. Note that those entries do not provide ways to setup the specific ...
4910da6b36b122db50a27fabf6ab7f8611b60bf8
Analyze and fix the following issue in the Linux kernel code: hwmon: (emc2305) fix device node refcount leak in error path
Problem Details: The for_each_child_of_node() macro automatically manages device node reference counts during normal iteration. However, when breaking out of the loop early with return, the current iteration's node is not automatically released, leading to a reference count leak. Fix this by adding of_node_put(child) ...
```diff diff --git a/drivers/hwmon/emc2305.c b/drivers/hwmon/emc2305.c index b0f2318c97e3..ceae96c07ac4 100644 --- a/drivers/hwmon/emc2305.c +++ b/drivers/hwmon/emc2305.c @@ -683,8 +683,10 @@ static int emc2305_probe(struct i2c_client *client) i = 0; for_each_child_of_node(dev->of_node, child) { ret = emc2...
541dfb49dcb80c2509e030842de77adfb77820f5
Analyze and fix the following issue in the Linux kernel code: hwmon: (emc2305) fix double put in emc2305_probe_childs_from_dt
Problem Details: ./drivers/hwmon/emc2305.c:597:4-15: ERROR: probable double put Device node iterators put the previous value of the index variable, so an explicit put causes a double put. Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn> Link: https://lore.kernel.org/r/tencent_CD373F952BE48697C949E39CB5EB77841D06@qq.com...
```diff diff --git a/drivers/hwmon/emc2305.c b/drivers/hwmon/emc2305.c index 60809289f816..b0f2318c97e3 100644 --- a/drivers/hwmon/emc2305.c +++ b/drivers/hwmon/emc2305.c @@ -593,10 +593,8 @@ static int emc2305_probe_childs_from_dt(struct device *dev) for_each_child_of_node(dev->of_node, child) { if (of_property_p...
fae00a7186cecf90a57757a63b97a0cbcf384fe9
Analyze and fix the following issue in the Linux kernel code: hwmon: (dell-smm) Fix off-by-one error in dell_smm_is_visible()
Problem Details: The documentation states that on machines supporting only global fan mode control, the pwmX_enable attributes should only be created for the first fan channel (pwm1_enable, aka channel 0). Fix the off-by-one error caused by the fact that fan channels have a zero-based index. Cc: stable@vger.kernel.or...
```diff diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c index 683baf361c4c..a34753fc2973 100644 --- a/drivers/hwmon/dell-smm-hwmon.c +++ b/drivers/hwmon/dell-smm-hwmon.c @@ -861,9 +861,9 @@ static umode_t dell_smm_is_visible(const void *drvdata, enum hwmon_sensor_types if (auto_fan) { ...
670d7ef945d3a84683594429aea6ab2cdfa5ceb4
Analyze and fix the following issue in the Linux kernel code: hwmon: (w83791d) Convert macros to functions to avoid TOCTOU
Problem Details: The macro FAN_FROM_REG evaluates its arguments multiple times. When used in lockless contexts involving shared driver data, this leads to Time-of-Check to Time-of-Use (TOCTOU) race conditions, potentially causing divide-by-zero errors. Convert the macro to a static function. This guarantees that argum...
```diff diff --git a/drivers/hwmon/w83791d.c b/drivers/hwmon/w83791d.c index ace854b370a0..996e36951f9d 100644 --- a/drivers/hwmon/w83791d.c +++ b/drivers/hwmon/w83791d.c @@ -218,9 +218,14 @@ static u8 fan_to_reg(long rpm, int div) return clamp_val((1350000 + rpm * div / 2) / (rpm * div), 1, 254); } -#define FAN_F...
0f35040de59371ad542b915d7b91176c9910dadc
Analyze and fix the following issue in the Linux kernel code: mm/slab: introduce kvfree_rcu_barrier_on_cache() for cache destruction
Problem Details: Currently, kvfree_rcu_barrier() flushes RCU sheaves across all slab caches when a cache is destroyed. This is unnecessary; only the RCU sheaves belonging to the cache being destroyed need to be flushed. As suggested by Vlastimil Babka, introduce a weaker form of kvfree_rcu_barrier() that operates on a...
```diff diff --git a/include/linux/slab.h b/include/linux/slab.h index cf443f064a66..2482992248dc 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -1150,10 +1150,17 @@ static inline void kvfree_rcu_barrier(void) rcu_barrier(); } +static inline void kvfree_rcu_barrier_on_cache(struct kmem_cache *s) +...