id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
866bafae59ecffcf1840d846cd79740be29f21d6
Analyze and fix the following issue in the Linux kernel code: btrfs: zoned: skip reporting zone for new block group
Problem Details: There is a potential deadlock if we do report zones in an IO context, detailed in below lockdep report. When one process do a report zones and another process freezes the block device, the report zones side cannot allocate a tag because the freeze is already started. This can thus result in new block g...
```diff diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c index 7c502192cd6b..4a3e02b49f29 100644 --- a/fs/btrfs/zoned.c +++ b/fs/btrfs/zoned.c @@ -1277,7 +1277,7 @@ struct zone_info { static int btrfs_load_zone_info(struct btrfs_fs_info *fs_info, int zone_idx, struct zone_info *info, unsigned long *active, - ...
50fecb8cf069f0814642ce0bde965bdc1f35a79e
Analyze and fix the following issue in the Linux kernel code: btrfs: fix invalid inode pointer after failure to create reloc inode
Problem Details: If we have a failure at create_reloc_inode(), under the 'out' label we assign an error pointer to the 'inode' variable and then return a weird pointer because we return the expression "&inode->vfs_inode": static noinline_for_stack struct inode *create_reloc_inode( ...
```diff diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index f948f4f6431c..e17bcb034595 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -3803,7 +3803,7 @@ out: if (ret) { if (inode) iput(&inode->vfs_inode); - inode = ERR_PTR(ret); + return ERR_PTR(ret); } return &inode->vfs_...
b0c26f47992672661340dd6ea931240213016609
Analyze and fix the following issue in the Linux kernel code: btrfs: zoned: return EIO on RAID1 block group write pointer mismatch
Problem Details: There was a bug report about a NULL pointer dereference in __btrfs_add_free_space_zoned() that ultimately happens because a conversion from the default metadata profile DUP to a RAID1 profile on two disks. The stack trace has the following signature: BTRFS error (device sdc): zoned: write pointer o...
```diff diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c index fb8b8b29c169..7c502192cd6b 100644 --- a/fs/btrfs/zoned.c +++ b/fs/btrfs/zoned.c @@ -1659,7 +1659,6 @@ int btrfs_load_block_group_zone_info(struct btrfs_block_group *cache, bool new) * stripe. */ cache->alloc_offset = cache->zone_capacity; - ret ...
7d82240c457fc15abdf7dedf15104cea774b005b
Analyze and fix the following issue in the Linux kernel code: btrfs: fix the ASSERT() inside GET_SUBPAGE_BITMAP()
Problem Details: After enabling large data folios for tests, I hit the ASSERT() inside GET_SUBPAGE_BITMAP() where blocks_per_folio matches BITS_PER_LONG. The ASSERT() itself is only based on the original subpage fs block size, where we have at most 16 blocks per page, thus "ASSERT(blocks_per_folio < BITS_PER_LONG)". ...
```diff diff --git a/fs/btrfs/subpage.c b/fs/btrfs/subpage.c index bd252c78a261..c0a0b8b063d0 100644 --- a/fs/btrfs/subpage.c +++ b/fs/btrfs/subpage.c @@ -666,7 +666,7 @@ IMPLEMENT_BTRFS_PAGE_OPS(checked, folio_set_checked, folio_clear_checked, btrfs_blocks_per_folio(fs_info, folio); \ const struct btrfs_subpage...
bc2dbc4983afedd198490cca043798f57c93e9bf
Analyze and fix the following issue in the Linux kernel code: btrfs: avoid page_lockend underflow in btrfs_punch_hole_lock_range()
Problem Details: [BUG] When running btrfs/004 with 4K fs block size and 64K page size, sometimes fsstress workload can take 100% CPU for a while, but not long enough to trigger a 120s hang warning. [CAUSE] When such 100% CPU usage happens, btrfs_punch_hole_lock_range() is always in the call trace. One example when th...
```diff diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 262a707d8990..71b8a825c447 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -2104,15 +2104,20 @@ static void btrfs_punch_hole_lock_range(struct inode *inode, * will always return true. * So here we need to do extra page alignment for * filemap_r...
cf6ae7ed091059a8d1a70cf184f18ebfd18ab4af
Analyze and fix the following issue in the Linux kernel code: btrfs: subpage: access correct object when reading bitmap start in subpage_calc_start_bit()
Problem Details: Inside the macro, subpage_calc_start_bit(), we need to calculate the offset to the beginning of the folio. But we're using offset_in_page(), on systems with 4K page size and 4K fs block size, this means we will always return offset 0 for a large folio, causing all kinds of errors. Fix it by using off...
```diff diff --git a/fs/btrfs/subpage.c b/fs/btrfs/subpage.c index 11dbd7be6a3b..bd252c78a261 100644 --- a/fs/btrfs/subpage.c +++ b/fs/btrfs/subpage.c @@ -204,7 +204,7 @@ static void btrfs_subpage_assert(const struct btrfs_fs_info *fs_info, btrfs_blocks_per_folio(fs_info, folio); \ \ btrfs_subpage_as...
061f087f5d0bcae9f43ae0101121fcaa999d2809
Analyze and fix the following issue in the Linux kernel code: pwm: Add support for RZ/G2L GPT
Problem Details: RZ/G2L General PWM Timer (GPT) composed of 8 channels with 32-bit timer (GPT32E). It supports the following functions * 32 bits x 8 channels * Up-counting or down-counting (saw waves) or up/down-counting (triangle waves) for each counter. * Clock sources independently selectable for each channel ...
```diff diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig index ead63f9d0c73..a888ac0b15fe 100644 --- a/drivers/pwm/Kconfig +++ b/drivers/pwm/Kconfig @@ -552,6 +552,17 @@ config PWM_ROCKCHIP Generic PWM framework driver for the PWM controller found on Rockchip SoCs. +config PWM_RZG2L_GPT + tristate "Rene...
e463b05d10da12b13d03f41a407e2ad043af158f
Analyze and fix the following issue in the Linux kernel code: pwm: Better document return value of pwm_round_waveform_might_sleep()
Problem Details: Better explain how pwm_round_waveform_might_sleep() (and so the respective lowlevel driver callback) is supposed to round and the meaning of the return value. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://lore.kernel.org/r/db84abf1e82e4498fc0e7c318d2673771d0039fe.1744120...
```diff diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index 59cc8792e312..079964961bd8 100644 --- a/drivers/pwm/core.c +++ b/drivers/pwm/core.c @@ -229,8 +229,12 @@ static int __pwm_write_waveform(struct pwm_chip *chip, struct pwm_device *pwm, c * these two calls and the waveform determined by * pwm_round_wa...
bd897149e40cb5c95f3d8546108035d1ea167db5
Analyze and fix the following issue in the Linux kernel code: pwm: loongson: Fix an error code in probe()
Problem Details: There is a copy and paste bug so we accidentally returned PTR_ERR(ddata->clk) instead of "ret". Fixes: 2b62c89448dd ("pwm: Add Loongson PWM controller support") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Binbin Zhou <zhoubinbin@loongson.cn> Link: https://lore.kernel.org/r/696...
```diff diff --git a/drivers/pwm/pwm-loongson.c b/drivers/pwm/pwm-loongson.c index 6392c4e34136..1ba16168cbb4 100644 --- a/drivers/pwm/pwm-loongson.c +++ b/drivers/pwm/pwm-loongson.c @@ -211,7 +211,7 @@ static int pwm_loongson_probe(struct platform_device *pdev) if (ddata->clk) { ret = devm_clk_rate_exclusive_get(...
df180e65305f8c1e020d54bfc2132349fd693de1
Analyze and fix the following issue in the Linux kernel code: dmaengine: Revert "dmaengine: dmatest: Fix dmatest waiting less when interrupted"
Problem Details: Several issues with this change: * The analysis is flawed and it's unclear what problem is being fixed. There is no difference between wait_event_freezable_timeout() and wait_event_timeout() with respect to device interrupts. And of course "the interrupt notifying the finish of an operation happ...
```diff diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c index d891dfca358e..91b2fbc0b864 100644 --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c @@ -841,9 +841,9 @@ static int dmatest_func(void *data) } else { dma_async_issue_pending(chan); - wait_event_timeout(thread->done_wait, - d...
938aaed555f3add76531cd204e2d4128ecb84ace
Analyze and fix the following issue in the Linux kernel code: drm/panthor: Fix the panthor_gpu_coherency_init() error path
Problem Details: The panthor_gpu_coherency_init() call has been moved around, but the error path hasn't been adjusted accordingly. Make sure we undo what has been done before this call in case of failure. Fixes: 7d5a3b22f5b5 ("drm/panthor: Call panthor_gpu_coherency_init() after PM resume()") Reported-by: Dan Carpente...
```diff diff --git a/drivers/gpu/drm/panthor/panthor_device.c b/drivers/gpu/drm/panthor/panthor_device.c index c73c1608d6e6..1e8811c6716d 100644 --- a/drivers/gpu/drm/panthor/panthor_device.c +++ b/drivers/gpu/drm/panthor/panthor_device.c @@ -245,7 +245,7 @@ int panthor_device_init(struct panthor_device *ptdev) ret...
06886c96a1dacf54af9938931e3fc75b4f9fa624
Analyze and fix the following issue in the Linux kernel code: staging: gpib: include: fixes multiline comments style
Problem Details: Fixes the style of multiline comments to comply with the linux kernel coding style. Signed-off-by: Paul Retourné <paul.retourne@orange.fr> Link: https://lore.kernel.org/r/20250416210411.9300-2-paul.retourne@orange.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/staging/gpib/include/gpib_types.h b/drivers/staging/gpib/include/gpib_types.h index 62ce174add85..9e0dfdb9904d 100644 --- a/drivers/staging/gpib/include/gpib_types.h +++ b/drivers/staging/gpib/include/gpib_types.h @@ -8,11 +8,6 @@ #define _GPIB_TYPES_H #ifdef __KERNEL__ -/* gpib_interfa...
d2d31ea8cd80b9830cdab624e94f9d41178fc99d
Analyze and fix the following issue in the Linux kernel code: netfilter: conntrack: fix erronous removal of offload bit
Problem Details: The blamed commit exposes a possible issue with flow_offload_teardown(): We might remove the offload bit of a conntrack entry that has been offloaded again. 1. conntrack entry c1 is offloaded via flow f1 (f1->ct == c1). 2. f1 times out and is pushed back to slowpath, c1 offload bit is removed. Due...
```diff diff --git a/net/netfilter/nf_flow_table_core.c b/net/netfilter/nf_flow_table_core.c index 9d8361526f82..9441ac3d8c1a 100644 --- a/net/netfilter/nf_flow_table_core.c +++ b/net/netfilter/nf_flow_table_core.c @@ -383,8 +383,8 @@ static void flow_offload_del(struct nf_flowtable *flow_table, void flow_offload_tear...
b0b23267b6fc74c5a6ed355643b5c8da58d2866f
Analyze and fix the following issue in the Linux kernel code: staging: gpib: uapi: Fix CamelCase and IBA Dup
Problem Details: Resolved duplicate entry for IbaSPollBit vs IbaSpollBit. Correct CamelCase for IBA enums Adhere to Linux kernel coding style. Reported by checkpatch Signed-off-by: Michael Rubin <matchstick@neverthere.org> Link: https://lore.kernel.org/r/20250416203259.7862-2-matchstick@neverthere.org Signed-off-by:...
```diff diff --git a/drivers/staging/gpib/uapi/gpib_user.h b/drivers/staging/gpib/uapi/gpib_user.h index 83ddaaf81529..eaf7399a164a 100644 --- a/drivers/staging/gpib/uapi/gpib_user.h +++ b/drivers/staging/gpib/uapi/gpib_user.h @@ -285,7 +285,7 @@ enum ibask_option { IBA_RSV = 0x21, /* board only */ IBA_BNA = 0x200,...
47ce2af848b7301d8571f0e01a0d7c7162d51e4a
Analyze and fix the following issue in the Linux kernel code: landlock: Update log documentation
Problem Details: Fix and improve documentation related to landlock_restrict_self(2)'s flags. Update the LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF documentation according to the current semantic. Cc: Günther Noack <gnoack@google.com> Cc: Paul Moore <paul@paul-moore.com> Link: https://lore.kernel.org/r/20250416154716.17...
```diff diff --git a/include/uapi/linux/landlock.h b/include/uapi/linux/landlock.h index 8b2a1dc5c70b..f030adc462ee 100644 --- a/include/uapi/linux/landlock.h +++ b/include/uapi/linux/landlock.h @@ -74,37 +74,49 @@ struct landlock_ruleset_attr { * * **Flags** * + * By default, denied accesses originating from pro...
25b1fc1cdc8931cf26e8d169f65ad07dfd653ca2
Analyze and fix the following issue in the Linux kernel code: landlock: Fix documentation for landlock_restrict_self(2)
Problem Details: Fix, deduplicate, and improve rendering of landlock_restrict_self(2)'s flags documentation. The flags are now rendered like the syscall's parameters and description. Cc: Günther Noack <gnoack@google.com> Cc: Paul Moore <paul@paul-moore.com> Link: https://lore.kernel.org/r/20250416154716.1799902-2-mic...
```diff diff --git a/include/uapi/linux/landlock.h b/include/uapi/linux/landlock.h index 9a4b64be9869..8b2a1dc5c70b 100644 --- a/include/uapi/linux/landlock.h +++ b/include/uapi/linux/landlock.h @@ -69,31 +69,42 @@ struct landlock_ruleset_attr { #define LANDLOCK_CREATE_RULESET_ERRATA (1U << 1) /* clang-format on */...
50492f942c281af4a48f8028f8409d7b8f2655d9
Analyze and fix the following issue in the Linux kernel code: landlock: Fix documentation for landlock_create_ruleset(2)
Problem Details: Move and fix the flags documentation, and improve formatting. It makes more sense and it eases maintenance to document syscall flags in landlock.h, where they are defined. This is already the case for landlock_restrict_self(2)'s flags. The flags are now rendered like the syscall's parameters and des...
```diff diff --git a/include/uapi/linux/landlock.h b/include/uapi/linux/landlock.h index d9d0cb827117..9a4b64be9869 100644 --- a/include/uapi/linux/landlock.h +++ b/include/uapi/linux/landlock.h @@ -53,12 +53,16 @@ struct landlock_ruleset_attr { __u64 scoped; }; -/* - * sys_landlock_create_ruleset() flags: +/** + ...
e3fd0577768584ece824c8b661c40fb3d912812a
Analyze and fix the following issue in the Linux kernel code: xfrm: Fix UDP GRO handling for some corner cases
Problem Details: This fixes an issue that's caused if there is a mismatch between the data offset in the GRO header and the length fields in the regular sk_buff due to the pskb_pull()/skb_push() calls. That's because the UDP GRO layer stripped off the UDP header via skb_gro_pull() already while the UDP header was expl...
```diff diff --git a/net/ipv4/xfrm4_input.c b/net/ipv4/xfrm4_input.c index b5b06323cfd9..0d31a8c108d4 100644 --- a/net/ipv4/xfrm4_input.c +++ b/net/ipv4/xfrm4_input.c @@ -182,11 +182,15 @@ struct sk_buff *xfrm4_gro_udp_encap_rcv(struct sock *sk, struct list_head *head, int offset = skb_gro_offset(skb); const struct...
c2c707bd45426df6edc5cf9f5f9fd857bd9926a9
Analyze and fix the following issue in the Linux kernel code: apm-emulation: hide an unused variable
Problem Details: The driver_version variable is only used inside of an #ifdef block, which leads to a W=1 warning: drivers/char/apm-emulation.c:144:19: error: 'driver_version' defined but not used [-Werror=unused-const-variable=] Move this into the function using it. Fixes: 7726942fb15e ("[APM] Add shared version of...
```diff diff --git a/drivers/char/apm-emulation.c b/drivers/char/apm-emulation.c index e795390b070f..53ce352f7197 100644 --- a/drivers/char/apm-emulation.c +++ b/drivers/char/apm-emulation.c @@ -141,9 +141,6 @@ static struct apm_queue kapmd_queue; static DEFINE_MUTEX(state_lock); -static const char driver_version[...
7ae52a3d7f511c95dad414441db7cfdd6356d88a
Analyze and fix the following issue in the Linux kernel code: scripts: Add git-resolve tool for full SHA-1 resolution
Problem Details: Introduce git-resolve.sh, a tool that resolves short git commit IDs to their full SHA-1 hash. This is particularly useful for navigating references in commit messages and verifying Fixes tags. When faced with ambiguous commit IDs or imprecise references in messages, this tool can help by resolving com...
```diff diff --git a/scripts/git-resolve.sh b/scripts/git-resolve.sh new file mode 100755 index 000000000000..204a8c9bd4ea --- /dev/null +++ b/scripts/git-resolve.sh @@ -0,0 +1,199 @@ +#!/bin/bash + +usage() { + echo "Usage: $(basename "$0") [--selftest] [--force] <commit-id> [commit-subject]" + echo "Resolves a short ...
dd09eb0e2cc4ba91cd64dba2b733d3f8e1248fd8
Analyze and fix the following issue in the Linux kernel code: EISA: Increase length of device names
Problem Details: GCC 15's -Wunterminated-string-initialization warned about truncated name strings. Instead of marking them with the "nonstring" attribute[1], increase their length to correctly include enough space for the terminating NUL character, as they are used with %s format specifiers when showing resource alloc...
```diff diff --git a/drivers/eisa/Makefile b/drivers/eisa/Makefile index a1dd0eaec2d4..f0d6cf7d1f32 100644 --- a/drivers/eisa/Makefile +++ b/drivers/eisa/Makefile @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 # Makefile for the Linux device tree -obj-$(CONFIG_EISA) += eisa-bus.o +obj-$(CONFIG_EISA) ...
d6fe216caf15d196e1bf76591440f8f17d58e7ee
Analyze and fix the following issue in the Linux kernel code: drm/udl: Set error code in udl_init()
Problem Details: Return -ENOMEM if udl_alloc_urb_list() fails. Don't return success. Fixes: fb10144ba426 ("drm/udl: Support adapters without firmware descriptor") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Thomas Zimmermann <tzimmermann@...
```diff diff --git a/drivers/gpu/drm/udl/udl_main.c b/drivers/gpu/drm/udl/udl_main.c index 3dfeb88cf918..bc58991a6f14 100644 --- a/drivers/gpu/drm/udl/udl_main.c +++ b/drivers/gpu/drm/udl/udl_main.c @@ -361,6 +361,7 @@ int udl_init(struct udl_device *udl) if (!udl_alloc_urb_list(udl, WRITES_IN_FLIGHT, MAX_TRANSFER)...
777d0961ff95b26d5887fdae69900374364976f3
Analyze and fix the following issue in the Linux kernel code: fs: move the bdex_statx call to vfs_getattr_nosec
Problem Details: Currently bdex_statx is only called from the very high-level vfs_statx_path function, and thus bypassing it for in-kernel calls to vfs_getattr or vfs_getattr_nosec. This breaks querying the block ѕize of the underlying device in the loop driver and also is a pitfall for any other new kernel caller. M...
```diff diff --git a/block/bdev.c b/block/bdev.c index 4844d1e27b6f..6a34179192c9 100644 --- a/block/bdev.c +++ b/block/bdev.c @@ -1272,8 +1272,7 @@ void sync_bdevs(bool wait) /* * Handle STATX_{DIOALIGN, WRITE_ATOMIC} for block devices. */ -void bdev_statx(struct path *path, struct kstat *stat, - u32 request_mas...
a374f28700abd20e8a7d026f89aa26f759445918
Analyze and fix the following issue in the Linux kernel code: cpufreq: fix compile-test defaults
Problem Details: Commit 3f66425a4fc8 ("cpufreq: Enable COMPILE_TEST on Arm drivers") enabled compile testing of most Arm CPUFreq drivers but left the existing default values unchanged so that many drivers are enabled by default whenever COMPILE_TEST is selected. This specifically results in the S3C64XX CPUFreq driver ...
```diff diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm index d4d625ded285..0d46402e3094 100644 --- a/drivers/cpufreq/Kconfig.arm +++ b/drivers/cpufreq/Kconfig.arm @@ -76,7 +76,7 @@ config ARM_VEXPRESS_SPC_CPUFREQ config ARM_BRCMSTB_AVS_CPUFREQ tristate "Broadcom STB AVS CPUfreq driver" depe...
76c332d119f9048c6e16b52359f401510f18b2ff
Analyze and fix the following issue in the Linux kernel code: drm/mgag200: Fix value in <VBLKSTR> register
Problem Details: Fix an off-by-one error when setting the vblanking start in <VBLKSTR>. Commit d6460bd52c27 ("drm/mgag200: Add dedicated variables for blanking fields") switched the value from crtc_vdisplay to crtc_vblank_start, which DRM helpers copy from the former. The commit missed to subtract one though. Reported...
```diff diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c index fb71658c3117..6067d08aeee3 100644 --- a/drivers/gpu/drm/mgag200/mgag200_mode.c +++ b/drivers/gpu/drm/mgag200/mgag200_mode.c @@ -223,7 +223,7 @@ void mgag200_set_mode_regs(struct mga_device *mdev, const struct drm_...
0a65bc27bd645894175c059397b4916e31955fb2
Analyze and fix the following issue in the Linux kernel code: eventpoll: Set epoll timeout if it's in the future
Problem Details: Avoid an edge case where epoll_wait arms a timer and calls schedule() even if the timer will expire immediately. For example: if the user has specified an epoll busy poll usecs which is equal or larger than the epoll_wait/epoll_pwait2 timeout, it is unnecessary to call schedule_hrtimeout_range; the bu...
```diff diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 100376863a44..4bc264b854c4 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -1996,6 +1996,14 @@ static int ep_try_send_events(struct eventpoll *ep, return res; } +static int ep_schedule_timeout(ktime_t *to) +{ + if (to) + return ktime_after(*to, ktime_...
8260731ccad0451207b45844bb66eb161a209218
Analyze and fix the following issue in the Linux kernel code: drm/gem: Internally test import_attach for imported objects
Problem Details: Test struct drm_gem_object.import_attach to detect imported objects. During object clenanup, the dma_buf field might be NULL. Testing it in an object's free callback then incorrectly does a cleanup as for native objects. Happens for calls to drm_mode_destroy_dumb_ioctl() that clears the dma_buf field ...
```diff diff --git a/include/drm/drm_gem.h b/include/drm/drm_gem.h index 2bf893eabb4b..bcd54020d6ba 100644 --- a/include/drm/drm_gem.h +++ b/include/drm/drm_gem.h @@ -585,8 +585,7 @@ static inline bool drm_gem_object_is_shared_for_memory_stats(struct drm_gem_obje */ static inline bool drm_gem_is_imported(const struc...
fe412e3a6c97cfe49ecf4564a278122f7d78e3f0
Analyze and fix the following issue in the Linux kernel code: pinctrl: mediatek: common-v1: Fix EINT breakage on older controllers
Problem Details: When EINT support for multiple addresses was introduced, the driver library for the older generations (pinctrl-mtk-common) was not fixed together. This resulted in invalid pointer accesses. Fix up the filled in |struct mtk_eint| in pinctrl-mtk-common to match what is now expected by the mtk-eint libra...
```diff diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c index 91edb539925a..7585de11854b 100644 --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c @@ -1015,7 +1015,13 @@ static int mtk_eint_init(struct mtk_pi...
92b17a63903b99ddb6326efe10a79f374726d6df
Analyze and fix the following issue in the Linux kernel code: pinctr: nomadik: abx500: Restrict compile test
Problem Details: The ABX500 module depends hard on AB8500_CORE it cannot be compile-tested in isolation. Fixes: 720abc5c58d8 ("pinctrl: abx500: enable building modules with COMPILE_TEST=y") Reported-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Signed-off-by...
```diff diff --git a/drivers/pinctrl/nomadik/Kconfig b/drivers/pinctrl/nomadik/Kconfig index 2c1f8a4f5d24..1b4fe2a4c302 100644 --- a/drivers/pinctrl/nomadik/Kconfig +++ b/drivers/pinctrl/nomadik/Kconfig @@ -3,7 +3,7 @@ if (ARCH_U8500 || COMPILE_TEST) config PINCTRL_ABX500 bool "ST-Ericsson ABx500 family Mixed Sign...
97994333de2b8062d2df4e6ce0dc65c2dc0f40dc
Analyze and fix the following issue in the Linux kernel code: dmaengine: idxd: cdev: Fix uninitialized use of sva in idxd_cdev_open
Problem Details: Fix Smatch-detected issue: drivers/dma/idxd/cdev.c:321 idxd_cdev_open() error: uninitialized symbol 'sva'. 'sva' pointer may be used uninitialized in error handling paths. Specifically, if PASID support is enabled and iommu_sva_bind_device() returns an error, the code jumps to the cleanup label and at...
```diff diff --git a/drivers/dma/idxd/cdev.c b/drivers/dma/idxd/cdev.c index ff94ee892339..7bd031a60894 100644 --- a/drivers/dma/idxd/cdev.c +++ b/drivers/dma/idxd/cdev.c @@ -222,7 +222,7 @@ static int idxd_cdev_open(struct inode *inode, struct file *filp) struct idxd_wq *wq; struct device *dev, *fdev; int rc = 0...
c7b67ddc3c999aa2f8d77be7ef1913298fe78f0e
Analyze and fix the following issue in the Linux kernel code: xfs: document zoned rt specifics in admin-guide
Problem Details: Document the lifetime, nolifetime and max_open_zones mount options added for zoned rt file systems. Also add documentation describing the max_open_zones sysfs attribute exposed in /sys/fs/xfs/<dev>/zoned/ Fixes: 4e4d52075577 ("xfs: add the zoned space allocator") Signed-off-by: Hans Holmberg <hans.ho...
```diff diff --git a/Documentation/admin-guide/xfs.rst b/Documentation/admin-guide/xfs.rst index 7b0811d650f9..3e76276bd488 100644 --- a/Documentation/admin-guide/xfs.rst +++ b/Documentation/admin-guide/xfs.rst @@ -124,6 +124,14 @@ When mounting an XFS filesystem, the following options are accepted. controls the size...
20d3c19bd8f9b498173c198eadf54580c8caa336
Analyze and fix the following issue in the Linux kernel code: wifi: rtw88: do not ignore hardware read error during DPK
Problem Details: In 'rtw8822c_dpk_cal_coef1()', do not ignore error returned by 'check_hw_ready()' but issue a warning to denote possible DPK issue. Compile tested only. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 5227c2ee453d ("rtw88: 8822c: add SW DPK support") Suggested-by: Ping-Ke Shi...
```diff diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822c.c b/drivers/net/wireless/realtek/rtw88/rtw8822c.c index 369ca75061b2..017d959de3ce 100644 --- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c +++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c @@ -3951,7 +3951,8 @@ static void rtw8822c_dpk_cal_coef1(stru...
fc5f5a0ec463ae6a07850428bd3082947e01d276
Analyze and fix the following issue in the Linux kernel code: wifi: rtw88: sdio: call rtw_sdio_indicate_tx_status unconditionally
Problem Details: The rtw88-sdio do not work in AP mode due to the lack of TX status report for management frames. Make the invocation of rtw_sdio_indicate_tx_status unconditional and cover all packet queues Tested-on: rtl8723ds Fixes: 65371a3f14e7 ("wifi: rtw88: sdio: Add HCI implementation for SDIO based chipsets")...
```diff diff --git a/drivers/net/wireless/realtek/rtw88/sdio.c b/drivers/net/wireless/realtek/rtw88/sdio.c index b2680d5f0708..c57f683d9af8 100644 --- a/drivers/net/wireless/realtek/rtw88/sdio.c +++ b/drivers/net/wireless/realtek/rtw88/sdio.c @@ -1224,10 +1224,7 @@ static void rtw_sdio_process_tx_queue(struct rtw_dev *...
b2effcdc237979dcc533d446a792fc54fd0e1213
Analyze and fix the following issue in the Linux kernel code: wifi: rtw88: sdio: map mgmt frames to queue TX_DESC_QSEL_MGMT
Problem Details: The rtw88-sdio do not work in AP mode due to the lack of TX status report for management frames. Map the management frames to queue TX_DESC_QSEL_MGMT, which enables the chip to generate TX reports for these frames Tested-on: rtl8723ds Fixes: 65371a3f14e7 ("wifi: rtw88: sdio: Add HCI implementation f...
```diff diff --git a/drivers/net/wireless/realtek/rtw88/sdio.c b/drivers/net/wireless/realtek/rtw88/sdio.c index 682fdd84a09b..b2680d5f0708 100644 --- a/drivers/net/wireless/realtek/rtw88/sdio.c +++ b/drivers/net/wireless/realtek/rtw88/sdio.c @@ -718,10 +718,7 @@ static u8 rtw_sdio_get_tx_qsel(struct rtw_dev *rtwdev, s...
da4cb617bc7d827946cbb368034940b379a1de90
Analyze and fix the following issue in the Linux kernel code: powerpc/crc: Include uaccess.h and others
Problem Details: The powerpc crc code was relying on pagefault_disable from being pulled in by random header files. Fix this by explicitly including uaccess.h. Also add other missing header files to prevent similar problems in future. Reported-by: Eric Biggers <ebiggers@kernel.org> Reported-by: Stephen Rothwell <sfr...
```diff diff --git a/arch/powerpc/lib/crc-t10dif-glue.c b/arch/powerpc/lib/crc-t10dif-glue.c index f411b0120cc5..fa988e249f01 100644 --- a/arch/powerpc/lib/crc-t10dif-glue.c +++ b/arch/powerpc/lib/crc-t10dif-glue.c @@ -6,15 +6,15 @@ * [based on crc32c-vpmsum_glue.c] */ -#include <linux/crc-t10dif.h> +#include <as...
ddd0855fa3c3f1de020ab3aeddce15fe38e116f7
Analyze and fix the following issue in the Linux kernel code: crypto: deflate - Make the acomp walk atomic
Problem Details: Add an atomic flag to the acomp walk and use that in deflate. Due to the use of a per-cpu context, it is impossible to sleep during the walk in deflate. Reported-by: kernel test robot <oliver.sang@intel.com> Closes: https://lore.kernel.org/oe-lkp/202504151654.4c3b6393-lkp@intel.com Fixes: 08cabc7d3c86...
```diff diff --git a/crypto/acompress.c b/crypto/acompress.c index 606d09a7fbfd..b0f9192f6b2e 100644 --- a/crypto/acompress.c +++ b/crypto/acompress.c @@ -536,7 +536,7 @@ int acomp_walk_next_dst(struct acomp_walk *walk) EXPORT_SYMBOL_GPL(acomp_walk_next_dst); int acomp_walk_virt(struct acomp_walk *__restrict walk, ...
82a8a30c581bbbe653d33c6ce2ef67e3072c7f12
Analyze and fix the following issue in the Linux kernel code: ublk: improve detection and handling of ublk server exit
Problem Details: There are currently two ways in which ublk server exit is detected by ublk_drv: 1. uring_cmd cancellation. If there are any outstanding uring_cmds which have not been completed to the ublk server when it exits, io_uring calls the uring_cmd callback with a special cancellation flag as the issu...
```diff diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c index 1fe39cf85b2f..b0a7e5acb2eb 100644 --- a/drivers/block/ublk_drv.c +++ b/drivers/block/ublk_drv.c @@ -199,8 +199,6 @@ struct ublk_device { struct completion completion; unsigned int nr_queues_ready; unsigned int nr_privileged_daemon; -...
b69b8edfb27dfa563cd53f590ec42b481f9eb174
Analyze and fix the following issue in the Linux kernel code: ublk: properly serialize all FETCH_REQs
Problem Details: Most uring_cmds issued against ublk character devices are serialized because each command affects only one queue, and there is an early check which only allows a single task (the queue's ubq_daemon) to issue uring_cmds against that queue. However, this mechanism does not work for FETCH_REQs, since they...
```diff diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c index cdb1543fa4a9..bf47f9cb8329 100644 --- a/drivers/block/ublk_drv.c +++ b/drivers/block/ublk_drv.c @@ -1832,8 +1832,8 @@ static void ublk_nosrv_work(struct work_struct *work) /* device can only be started after all IOs are ready */ static v...
3bf540609cab0402a7c3e40c1425532f3376318a
Analyze and fix the following issue in the Linux kernel code: selftests: ublk: move creating UBLK_TMP into _prep_test()
Problem Details: test may exit early because of missing program or not having required feature before calling _prep_test(), then $UBLK_TMP isn't cleaned. Fix it by moving creating $UBLK_TMP into _prep_test(), any resources created since _prep_test() will be cleaned by _cleanup_test(). Signed-off-by: Ming Lei <ming.le...
```diff diff --git a/tools/testing/selftests/ublk/test_common.sh b/tools/testing/selftests/ublk/test_common.sh index e822b2a2729a..9fc111f64576 100755 --- a/tools/testing/selftests/ublk/test_common.sh +++ b/tools/testing/selftests/ublk/test_common.sh @@ -114,6 +114,7 @@ _prep_test() { local type=$1 shift 1 modpro...
9cad26d66b7a6306fa1e3cf64e30941afdadf6c8
Analyze and fix the following issue in the Linux kernel code: selftests: ublk: add io_uring uapi header
Problem Details: Add io_uring UAPI header so that ublk can work with latest uapi definition. Fix the following build failure: stripe.c: In function ‘stripe_to_uring_op’: stripe.c:120:29: error: ‘IORING_OP_READV_FIXED’ undeclared (first use in this function); did you mean ‘IORING_OP_READ_FIXED’? 120 | ...
```diff diff --git a/tools/testing/selftests/ublk/kublk.h b/tools/testing/selftests/ublk/kublk.h index 73294f6e3e49..eccf12360a14 100644 --- a/tools/testing/selftests/ublk/kublk.h +++ b/tools/testing/selftests/ublk/kublk.h @@ -20,6 +20,7 @@ #include <sys/wait.h> #include <sys/eventfd.h> #include <sys/uio.h> +#includ...
ec120093180b9d92b0c84cb89a205876f9a4cb40
Analyze and fix the following issue in the Linux kernel code: selftests: ublk: fix ublk_find_tgt()
Problem Details: Bounds check for iterator variable `i` is missed, so add it and fix ublk_find_tgt(). Cc: Johannes Thumshirn <Johannes.Thumshirn@wdc.com> Signed-off-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/20250412023035.2649275-2-ming.lei@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk...
```diff diff --git a/tools/testing/selftests/ublk/kublk.c b/tools/testing/selftests/ublk/kublk.c index 91c282bc7674..74cf70b2f28e 100644 --- a/tools/testing/selftests/ublk/kublk.c +++ b/tools/testing/selftests/ublk/kublk.c @@ -14,13 +14,12 @@ static const struct ublk_tgt_ops *tgt_ops_list[] = { static const struct u...
4798cfa2097f0833d54d8f5ce20ef14631917839
Analyze and fix the following issue in the Linux kernel code: net: don't try to ops lock uninitialized devs
Problem Details: We need to be careful when operating on dev while in rtnl_create_link(). Some devices (vxlan) initialize netdev_ops in ->newlink, so later on. Avoid using netdev_lock_ops(), the device isn't registered so we cannot legally call its ops or generate any notifications for it. netdev_ops_assert_locked_or_...
```diff diff --git a/net/core/dev.c b/net/core/dev.c index 5fcbc66d865e..1be7cb73a602 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1520,6 +1520,8 @@ EXPORT_SYMBOL(netdev_features_change); void netif_state_change(struct net_device *dev) { + netdev_ops_assert_locked_or_invisible(dev); + if (dev->flags & IFF...
00868d0348187fe1123324f77e069a916f932037
Analyze and fix the following issue in the Linux kernel code: net: phy: mediatek: init val in .phy_led_polarity_set for AN7581
Problem Details: Fix smatch warning for uninitialised val in .phy_led_polarity_set for AN7581 driver. Correctly init to 0 to set polarity high by default. Reported-by: Simon Horman <horms@kernel.org> Fixes: 6a325aed130b ("net: phy: mediatek: add Airoha PHY ID to SoC driver") Signed-off-by: Christian Marangi <ansuelsm...
```diff diff --git a/drivers/net/phy/mediatek/mtk-ge-soc.c b/drivers/net/phy/mediatek/mtk-ge-soc.c index fd0e447ffce7..cd09684780a4 100644 --- a/drivers/net/phy/mediatek/mtk-ge-soc.c +++ b/drivers/net/phy/mediatek/mtk-ge-soc.c @@ -1432,8 +1432,8 @@ static int an7581_phy_probe(struct phy_device *phydev) static int an75...
2a5970d5aaff8f3e33ce3bfaa403ae88c40de40d
Analyze and fix the following issue in the Linux kernel code: ptp: ocp: fix start time alignment in ptp_ocp_signal_set
Problem Details: In ptp_ocp_signal_set, the start time for periodic signals is not aligned to the next period boundary. The current code rounds up the start time and divides by the period but fails to multiply back by the period, causing misaligned signal starts. Fix this by multiplying the rounded-up value by the peri...
```diff diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c index 7945c6be1f7c..faf6e027f89a 100644 --- a/drivers/ptp/ptp_ocp.c +++ b/drivers/ptp/ptp_ocp.c @@ -2067,6 +2067,7 @@ ptp_ocp_signal_set(struct ptp_ocp *bp, int gen, struct ptp_ocp_signal *s) if (!s->start) { /* roundup() does not work on 32-bit sy...
514eff7b0aa1c5eb645ddbb8676ef3e2d88a8b99
Analyze and fix the following issue in the Linux kernel code: net: dsa: avoid refcount warnings when ds->ops->tag_8021q_vlan_del() fails
Problem Details: This is very similar to the problem and solution from commit 232deb3f9567 ("net: dsa: avoid refcount warnings when ->port_{fdb,mdb}_del returns error"), except for the dsa_port_do_tag_8021q_vlan_del() operation. Fixes: c64b9c05045a ("net: dsa: tag_8021q: add proper cross-chip notifier support") Signed...
```diff diff --git a/net/dsa/tag_8021q.c b/net/dsa/tag_8021q.c index 3ee53e28ec2e..53e03fd8071b 100644 --- a/net/dsa/tag_8021q.c +++ b/net/dsa/tag_8021q.c @@ -197,7 +197,7 @@ static int dsa_port_do_tag_8021q_vlan_del(struct dsa_port *dp, u16 vid) err = ds->ops->tag_8021q_vlan_del(ds, port, vid); if (err) { - ref...
8bf108d7161ffc6880ad13a0cc109de3cf631727
Analyze and fix the following issue in the Linux kernel code: net: dsa: free routing table on probe failure
Problem Details: If complete = true in dsa_tree_setup(), it means that we are the last switch of the tree which is successfully probing, and we should be setting up all switches from our probe path. After "complete" becomes true, dsa_tree_setup_cpu_ports() or any subsequent function may fail. If that happens, the enti...
```diff diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index e7e32956070a..436a7e1b412a 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c @@ -862,6 +862,16 @@ static void dsa_tree_teardown_lags(struct dsa_switch_tree *dst) kfree(dst->lags); } +static void dsa_tree_teardown_routing_table(struct dsa_switch_tree *dst) +{ + ...
7afb5fb42d4950f33af2732b8147c552659f79b7
Analyze and fix the following issue in the Linux kernel code: net: dsa: clean up FDB, MDB, VLAN entries on unbind
Problem Details: As explained in many places such as commit b117e1e8a86d ("net: dsa: delete dsa_legacy_fdb_add and dsa_legacy_fdb_del"), DSA is written given the assumption that higher layers have balanced additions/deletions. As such, it only makes sense to be extremely vocal when those assumptions are violated and th...
```diff diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index e827775baf2e..e7e32956070a 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c @@ -1478,12 +1478,44 @@ static int dsa_switch_parse(struct dsa_switch *ds, struct dsa_chip_data *cd) static void dsa_switch_release_ports(struct dsa_switch *ds) { + struct dsa_mac_addr ...
ea08dfc35f83cfc73493c52f63ae4f2e29edfe8d
Analyze and fix the following issue in the Linux kernel code: net: dsa: mv88e6xxx: fix -ENOENT when deleting VLANs and MST is unsupported
Problem Details: Russell King reports that on the ZII dev rev B, deleting a bridge VLAN from a user port fails with -ENOENT: https://lore.kernel.org/netdev/Z_lQXNP0s5-IiJzd@shell.armlinux.org.uk/ This comes from mv88e6xxx_port_vlan_leave() -> mv88e6xxx_mst_put(), which tries to find an MST entry in &chip->msts associa...
```diff diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 29a89ab4b789..08db846cda8d 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -1852,6 +1852,8 @@ static int mv88e6xxx_vtu_get(struct mv88e6xxx_chip *chip, u16 vid, if (!chip->info->ops->...
c84f6ce918a9e6f4996597cbc62536bbf2247c96
Analyze and fix the following issue in the Linux kernel code: net: dsa: mv88e6xxx: avoid unregistering devlink regions which were never registered
Problem Details: Russell King reports that a system with mv88e6xxx dereferences a NULL pointer when unbinding this driver: https://lore.kernel.org/netdev/Z_lRkMlTJ1KQ0kVX@shell.armlinux.org.uk/ The crash seems to be in devlink_region_destroy(), which is not NULL tolerant but is given a NULL devlink global region point...
```diff diff --git a/drivers/net/dsa/mv88e6xxx/devlink.c b/drivers/net/dsa/mv88e6xxx/devlink.c index 795c8df7b6a7..195460a0a0d4 100644 --- a/drivers/net/dsa/mv88e6xxx/devlink.c +++ b/drivers/net/dsa/mv88e6xxx/devlink.c @@ -736,7 +736,8 @@ void mv88e6xxx_teardown_devlink_regions_global(struct dsa_switch *ds) int i; ...
b2727326d0a53709380aa147018085d71a6d4843
Analyze and fix the following issue in the Linux kernel code: net: txgbe: fix memory leak in txgbe_probe() error path
Problem Details: When txgbe_sw_init() is called, memory is allocated for wx->rss_key in wx_init_rss_key(). However, in txgbe_probe() function, the subsequent error paths after txgbe_sw_init() don't free the rss_key. Fix that by freeing it in error path along with wx->mac_table. Also change the label to which execution...
```diff diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c index a2e245e3b016..38206a46693b 100644 --- a/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c +++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c @@ -611,7 +611,7 @@ static int txgbe_probe(struct pci...
eb25de13bd9cf025413a04f25e715d0e99847e30
Analyze and fix the following issue in the Linux kernel code: net: bridge: switchdev: do not notify new brentries as changed
Problem Details: When adding a bridge vlan that is pvid or untagged after the vlan has already been added to any other switchdev backed port, the vlan change will be propagated as changed, since the flags change. This causes the vlan to not be added to the hardware for DSA switches, since the DSA handler ignores any v...
```diff diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c index d9a69ec9affe..939a3aa78d5c 100644 --- a/net/bridge/br_vlan.c +++ b/net/bridge/br_vlan.c @@ -715,8 +715,8 @@ static int br_vlan_add_existing(struct net_bridge *br, u16 flags, bool *changed, struct netlink_ext_ack *extack) { - bool would_ch...
36355ddfe8955f226a88a543ed354b9f6b84cd70
Analyze and fix the following issue in the Linux kernel code: net: b53: enable BPDU reception for management port
Problem Details: For STP to work, receiving BPDUs is essential, but the appropriate bit was never set. Without GC_RX_BPDU_EN, the switch chip will filter all BPDUs, even if an appropriate PVID VLAN was setup. Fixes: ff39c2d68679 ("net: dsa: b53: Add bridge support") Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>...
```diff diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c index 61d164ffb3ae..e5ba71897906 100644 --- a/drivers/net/dsa/b53/b53_common.c +++ b/drivers/net/dsa/b53/b53_common.c @@ -737,6 +737,15 @@ static void b53_enable_mib(struct b53_device *dev) b53_write8(dev, B53_MGMT_PAGE, B53_GLOB...
e31f86ee4b9ccb844baf2131da8e5d4d6f23aa1d
Analyze and fix the following issue in the Linux kernel code: netlink: specs: rt-neigh: prefix struct nfmsg members with ndm
Problem Details: Attach ndm- to all members of struct nfmsg. We could possibly use name-prefix just for C, but I don't think we have any precedent for using name-prefix on structs, and other rtnetlink sub-specs give full names for fixed header struct members. Fixes: bc515ed06652 ("netlink: specs: Add a spec for neighb...
```diff diff --git a/Documentation/netlink/specs/rt_neigh.yaml b/Documentation/netlink/specs/rt_neigh.yaml index a1e137a16abd..a843caa72259 100644 --- a/Documentation/netlink/specs/rt_neigh.yaml +++ b/Documentation/netlink/specs/rt_neigh.yaml @@ -13,25 +13,25 @@ definitions: type: struct members: - - ...
beb3c5ad8829b52057f48a776a9d9558b98c157f
Analyze and fix the following issue in the Linux kernel code: netlink: specs: rt-link: adjust mctp attribute naming
Problem Details: MCTP attribute naming is inconsistent. In C we have: IFLA_MCTP_NET, IFLA_MCTP_PHYS_BINDING, ^^^^ but in YAML: - mctp-net - phys-binding ^ no "mctp" It's unclear whether the "mctp" part of the name is supposed to be a prefix or part of attribute name. Make it a pr...
```diff diff --git a/Documentation/netlink/specs/rt_link.yaml b/Documentation/netlink/specs/rt_link.yaml index 03323d7f58dc..6b9d5ee87d93 100644 --- a/Documentation/netlink/specs/rt_link.yaml +++ b/Documentation/netlink/specs/rt_link.yaml @@ -2185,9 +2185,10 @@ attribute-sets: type: u32 - name: mctp-at...
540201c0ef7e8e7b169f68a238ade931a81a31a6
Analyze and fix the following issue in the Linux kernel code: netlink: specs: rtnetlink: attribute naming corrections
Problem Details: Some attribute names diverge in very minor ways from the C names. These are most likely typos, and they prevent the C codegen from working. Fixes: bc515ed06652 ("netlink: specs: Add a spec for neighbor tables in rtnetlink") Fixes: b2f63d904e72 ("doc/netlink: Add spec for rt link messages") Reviewed-by...
```diff diff --git a/Documentation/netlink/specs/rt_link.yaml b/Documentation/netlink/specs/rt_link.yaml index 200e9a7e5b11..03323d7f58dc 100644 --- a/Documentation/netlink/specs/rt_link.yaml +++ b/Documentation/netlink/specs/rt_link.yaml @@ -1591,7 +1591,7 @@ attribute-sets: name: nf-call-iptables ty...
acf4da17deada7f8b120e051aa6c9cac40dbd83b
Analyze and fix the following issue in the Linux kernel code: netlink: specs: rt-link: add an attr layer around alt-ifname
Problem Details: alt-ifname attr is directly placed in requests (as an alternative to ifname) but in responses its wrapped up in IFLA_PROP_LIST and only there is may be multi-attr. See rtnl_fill_prop_list(). Fixes: b2f63d904e72 ("doc/netlink: Add spec for rt link messages") Reviewed-by: Donald Hunter <donald.hunter@gm...
```diff diff --git a/Documentation/netlink/specs/rt_link.yaml b/Documentation/netlink/specs/rt_link.yaml index 31238455f8e9..200e9a7e5b11 100644 --- a/Documentation/netlink/specs/rt_link.yaml +++ b/Documentation/netlink/specs/rt_link.yaml @@ -1113,11 +1113,10 @@ attribute-sets: - name: prop-list ...
57e7dedf2b8c72caa6f04b9e08b19e4f370562fa
Analyze and fix the following issue in the Linux kernel code: tools: ynl-gen: make sure we validate subtype of array-nest
Problem Details: ArrayNest AKA indexed-array support currently skips inner type validation. We count the attributes and then we parse them, make sure we call validate, too. Otherwise buggy / unexpected kernel response may lead to crashes. Fixes: be5bea1cc0bf ("net: add basic C code generators for Netlink") Reviewed-by...
```diff diff --git a/tools/net/ynl/pyynl/ynl_gen_c.py b/tools/net/ynl/pyynl/ynl_gen_c.py index 2d856ccc88f4..30c0a34b2784 100755 --- a/tools/net/ynl/pyynl/ynl_gen_c.py +++ b/tools/net/ynl/pyynl/ynl_gen_c.py @@ -714,8 +714,11 @@ class TypeArrayNest(Type): def _attr_get(self, ri, var): local_vars = ['const ...
ce6cb8113c842b94e77364b247c4f85c7b34e0c2
Analyze and fix the following issue in the Linux kernel code: tools: ynl-gen: individually free previous values on double set
Problem Details: When user calls request_attrA_set() multiple times (for the same attribute), and attrA is of type which allocates memory - we try to free the previously associated values. For array types (including multi-attr) we have only freed the array, but the array may have contained pointers. Refactor the code ...
```diff diff --git a/tools/net/ynl/pyynl/ynl_gen_c.py b/tools/net/ynl/pyynl/ynl_gen_c.py index 662a925bd9e1..2d856ccc88f4 100755 --- a/tools/net/ynl/pyynl/ynl_gen_c.py +++ b/tools/net/ynl/pyynl/ynl_gen_c.py @@ -162,9 +162,15 @@ class Type(SpecAttr): def free_needs_iter(self): return False - def free(...
00ffb3724ce743578163f5ade2884374554ca021
Analyze and fix the following issue in the Linux kernel code: cxgb4: fix memory leak in cxgb4_init_ethtool_filters() error path
Problem Details: In the for loop used to allocate the loc_array and bmap for each port, a memory leak is possible when the allocation for loc_array succeeds, but the allocation for bmap fails. This is because when the control flow goes to the label free_eth_finfo, only the allocations starting from (i-1)th iteration ar...
```diff diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c index 7f3f5afa864f..1546c3db08f0 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c @@ -2270,6 +2270,7 @@ int cxgb4_init_etht...
09737cb80b8686ffca4ed1805fee745d5c85604d
Analyze and fix the following issue in the Linux kernel code: net: ethernet: ti: am65-cpsw: handle -EPROBE_DEFER
Problem Details: of_get_mac_address() might fetch the MAC address from NVMEM and that driver might not have been loaded. In that case, -EPROBE_DEFER is returned. Right now, this will trigger an immediate fallback to am65_cpsw_am654_get_efuse_macid() possibly resulting in a random MAC address although the MAC address is...
```diff diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c index 0a3877633976..aedef818800c 100644 --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c @@ -2679,7 +2679,9 @@ static int am65_cpsw_nuss_init_slave_ports(struct am65_cpsw...
875db86e1ec75fe633f1e85ed2f92c731cdbf760
Analyze and fix the following issue in the Linux kernel code: Bluetooth: vhci: Avoid needless snprintf() calls
Problem Details: Avoid double-copying of string literals. Use a "const char *" for each string instead of copying from .rodata into stack and then into the skb. We can go directly from .rodata to the skb. This also works around a Clang bug (that has since been fixed[1]). Reported-by: kernel test robot <lkp@intel.com>...
```diff diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c index a51935d37e5d..59f4d7bdffdc 100644 --- a/drivers/bluetooth/hci_vhci.c +++ b/drivers/bluetooth/hci_vhci.c @@ -289,18 +289,18 @@ static void vhci_coredump(struct hci_dev *hdev) static void vhci_coredump_hdr(struct hci_dev *hdev, stru...
39e160505198ff8c158f11bce2ba19809a756e8b
Analyze and fix the following issue in the Linux kernel code: block: integrity: Do not call set_page_dirty_lock()
Problem Details: Placing multiple protection information buffers inside the same page can lead to oopses because set_page_dirty_lock() can't be called from interrupt context. Since a protection information buffer is not backed by a file there is no point in setting its page dirty, there is nothing to synchronize. Drop...
```diff diff --git a/block/bio-integrity.c b/block/bio-integrity.c index 608594a154a5..43ef6bd06c85 100644 --- a/block/bio-integrity.c +++ b/block/bio-integrity.c @@ -66,16 +66,12 @@ struct bio_integrity_payload *bio_integrity_alloc(struct bio *bio, } EXPORT_SYMBOL(bio_integrity_alloc); -static void bio_integrity_u...
cd9e6d6fdd2de60bfb4672387c17d4ee7157cf8e
Analyze and fix the following issue in the Linux kernel code: drm/amd/display/dml2: use vzalloc rather than kzalloc
Problem Details: The structures are large and they do not require contiguous memory so use vzalloc. Fixes: 70839da63605 ("drm/amd/display: Add new DCN401 sources") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4126 Cc: Aurabindo Pillai <aurabindo.pillai@amd.com> Reviewed-by: Aurabindo Pillai <aurabindo.pilla...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c b/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c index 94e99e540691..5d16f36ec95c 100644 --- a/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c +++ b/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c @@ -2,6 +2,7 ...
2036be31741b00f030530381643a8b35a5a42b5c
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: Add back JPEG to video caps for carrizo and newer
Problem Details: JPEG is not supported on Vega only. Fixes: 0a6e7b06bdbe ("drm/amdgpu: Remove JPEG from vega and carrizo video caps") Signed-off-by: David Rosca <david.rosca@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 0f4dfe86fe922c...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c index 86d8bc10d90a..9b3510e53112 100644 --- a/drivers/gpu/drm/amd/amdgpu/vi.c +++ b/drivers/gpu/drm/amd/amdgpu/vi.c @@ -239,6 +239,13 @@ static const struct amdgpu_video_codec_info cz_video_codecs_decode_array[] = .max_pixels_per_...
e7afa85a0d0eba5bf2c0a446ff622ebdbc9812d6
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: fix warning of drm_mm_clean
Problem Details: Kernel doorbell BOs needs to be freed before ttm_fini. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4145 Fixes: 54c30d2a8def ("drm/amdgpu: create kernel doorbell pages") Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by:...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index b34b915203f2..7f354cd532dc 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -3510,6 +3510,7 @@ static int amdgpu_device_ip_fini(struct amdgpu_devi...
447fab30955cf7dba7dd563f42b67c02284860c8
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: use a dummy owner for sysfs triggered cleaner shaders v4
Problem Details: Otherwise triggering sysfs multiple times without other submissions in between only runs the shader once. v2: add some comment v3: re-add missing cast v4: squash in semicolon fix Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c index 72af5e5a894a..cf2df7790077 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c @@ -1438,9 +1438,11 @@ static int amdgpu_gfx_run_cleaner_shader_job(struct amdgpu_rin...
c70fc32f44431bb30f9025ce753ba8be25acbba3
Analyze and fix the following issue in the Linux kernel code: sched/fair: Adhere to place_entity() constraints
Problem Details: Mike reports that commit 6d71a9c61604 ("sched/fair: Fix EEVDF entity placement bug causing scheduling lag") relies on commit 4423af84b297 ("sched/fair: optimize the PLACE_LAG when se->vlag is zero") to not trip a WARN in place_entity(). What happens is that the lag of the very last entity is 0 per def...
```diff diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 5e1bd9e8464c..eb5a2572b4f8 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -3795,6 +3795,7 @@ static void reweight_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, update_entity_lag(cfs_rq, se); se->deadline -= se->vruntime; ...
44671e21e3463f36f6c6e4b691216f60e85840e4
Analyze and fix the following issue in the Linux kernel code: sched/debug: Print the local group's asym_prefer_cpu
Problem Details: Add a file to read local group's "asym_prefer_cpu" from debugfs. This information was useful when debugging issues where "asym_prefer_cpu" was incorrectly set to a CPU with a lower asym priority. Signed-off-by: K Prateek Nayak <kprateek.nayak@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infr...
```diff diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index 56ae54e0ce6a..557246880a7e 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -588,6 +588,10 @@ static void register_sd(struct sched_domain *sd, struct dentry *parent) debugfs_create_file("flags", 0444, parent, &sd->flags, &sd_flags_f...
9b62b7a6574ea25e1da15b883de74284fb45197c
Analyze and fix the following issue in the Linux kernel code: ASoC: rt722: fix pop noise at the beginning of DMIC recording
Problem Details: This patch added the PDE status check which makes sure the PDE transition is done. It will decrease the pop noise at the beginning of DMIC recording. Signed-off-by: Shuming Fan <shumingf@realtek.com> Link: https://patch.msgid.link/20250416092547.737879-1-shumingf@realtek.com Signed-off-by: Mark Brown ...
```diff diff --git a/sound/soc/codecs/rt722-sdca-sdw.c b/sound/soc/codecs/rt722-sdca-sdw.c index 142eb032b4f8..609ca0d6c83a 100644 --- a/sound/soc/codecs/rt722-sdca-sdw.c +++ b/sound/soc/codecs/rt722-sdca-sdw.c @@ -43,8 +43,12 @@ static int rt722_sdca_mbq_size(struct device *dev, unsigned int reg) RT722_SDCA_CTL_...
8772cc49e0b8ab782e475ce5ef659eedab601a09
Analyze and fix the following issue in the Linux kernel code: batman-adv: fix duplicate MAC address check
Problem Details: batadv_check_known_mac_addr() is both too lenient and too strict: - It is called from batadv_hardif_add_interface(), which means that it checked interfaces that are not used for batman-adv at all. Move it to batadv_hardif_enable_interface(). Also, restrict it to hardifs of the same mesh interfac...
```diff diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c index f145f9662653..d099434d3dfa 100644 --- a/net/batman-adv/hard-interface.c +++ b/net/batman-adv/hard-interface.c @@ -506,28 +506,32 @@ batadv_hardif_is_iface_up(const struct batadv_hard_iface *hard_iface) return false; } -sta...
07be53cfa81afe94b14fb4bfee8243f2e0125d5e
Analyze and fix the following issue in the Linux kernel code: selftests/ftrace: Differentiate bash and dash in dynevent_limitations.tc
Problem Details: bash and dash evaluate variables differently. dash will evaluate '\\' every time it is read whereas bash does not. TEST_STRING="$TEST_STRING \\$i" echo $TEST_STRING With i=123 On bash, that will print "\123" but on dash, that will print the escape sequence of \123 as the \ will be interpreted aga...
```diff diff --git a/tools/testing/selftests/ftrace/test.d/dynevent/dynevent_limitations.tc b/tools/testing/selftests/ftrace/test.d/dynevent/dynevent_limitations.tc index 6b94b678741a..f656bccb1a14 100644 --- a/tools/testing/selftests/ftrace/test.d/dynevent/dynevent_limitations.tc +++ b/tools/testing/selftests/ftrace/t...
1d31d536871fe8b16c8c0de58d201c78e21eb3a2
Analyze and fix the following issue in the Linux kernel code: kunit: qemu_configs: Disable faulting tests on 32-bit SPARC
Problem Details: The 32-bit sparc configuration (--arch sparc) crashes on the kunit_fault_test. It's known that some architectures don't handle deliberate segfaults in kernel mode well, so there's a config switch to disable tests which rely upon it by default. Use this for the sparc config, making sure the default con...
```diff diff --git a/tools/testing/kunit/qemu_configs/sparc.py b/tools/testing/kunit/qemu_configs/sparc.py index 3131dd299a6e..2019550a1b69 100644 --- a/tools/testing/kunit/qemu_configs/sparc.py +++ b/tools/testing/kunit/qemu_configs/sparc.py @@ -2,6 +2,7 @@ from ..qemu_config import QemuArchParams QEMU_ARCH = QemuA...
6ad7751537e884c45b5340a4a24c25535f0d9c13
Analyze and fix the following issue in the Linux kernel code: powerpc: enable dynamic preemption
Problem Details: Once the lazy preemption is supported, it would be desirable to change the preemption models at runtime. So add support for dynamic preemption using DYNAMIC_KEY. ::Tested lightly on Power10 LPAR Performance numbers indicate that, preempt=none(no dynamic) and preempt=none(dynamic) are close. cat /sys/...
```diff diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 6722625a406a..2519fc3538c6 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -277,6 +277,7 @@ config PPC select HAVE_PERF_EVENTS_NMI if PPC64 select HAVE_PERF_REGS select HAVE_PERF_USER_STACK_DUMP + select HAVE_PREEMPT_DYNAMIC_K...
1518474b70d663baf7757ccd1b1c229c077d9b3e
Analyze and fix the following issue in the Linux kernel code: KVM: powerpc: Enable commented out BUILD_BUG_ON() assertion
Problem Details: The BUILD_BUG_ON() assertion was commented out in commit 38634e676992 ("powerpc/kvm: Remove problematic BUILD_BUG_ON statement") and fixed in commit c0a187e12d48 ("KVM: powerpc: Fix BUILD_BUG_ON condition"), but not enabled. Enable it now that this no longer breaks and remove the comment. Signed-off-b...
```diff diff --git a/arch/powerpc/kvm/timing.h b/arch/powerpc/kvm/timing.h index 45817ab82bb4..14b0e23f601f 100644 --- a/arch/powerpc/kvm/timing.h +++ b/arch/powerpc/kvm/timing.h @@ -38,11 +38,7 @@ static inline void kvmppc_set_exit_type(struct kvm_vcpu *vcpu, int type) {} static inline void kvmppc_account_exit_stat(s...
0f725e9851379650d0db398a4e12dfab4c229fe1
Analyze and fix the following issue in the Linux kernel code: powerpc: mpic: Use str_enabled_disabled() helper function
Problem Details: Remove hard-coded strings by using the str_enabled_disabled() helper function. Use pr_debug() instead of printk(KERN_DEBUG) to silence a checkpatch warning. Reviewed-by: Ricardo B. Marlière <ricardo@marliere.net> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Madhavan Srinivasa...
```diff diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index 4afbab83a2e2..c706a08e9955 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c @@ -27,6 +27,7 @@ #include <linux/spinlock.h> #include <linux/pci.h> #include <linux/slab.h> +#include <linux/string_choices.h> #incl...
02a1324b08af3239dce5bcf52e09153e1f8a4bbd
Analyze and fix the following issue in the Linux kernel code: powerpc/kvm-hv-pmu: Add perf-events for Hostwide counters
Problem Details: Update 'kvm-hv-pmu.c' to add five new perf-events mapped to the five Hostwide counters. Since these newly introduced perf events are at system wide scope and can be read from any L1-Lpar CPU, 'kvmppc_pmu' scope and capabilities are updated appropriately. Also introduce two new helpers. First is kvmppc...
```diff diff --git a/arch/powerpc/perf/kvm-hv-pmu.c b/arch/powerpc/perf/kvm-hv-pmu.c index 705be24ccb43..ae264c9080ef 100644 --- a/arch/powerpc/perf/kvm-hv-pmu.c +++ b/arch/powerpc/perf/kvm-hv-pmu.c @@ -30,6 +30,11 @@ #include "asm/guest-state-buffer.h" enum kvmppc_pmu_eventid { + KVMPPC_EVENT_HOST_HEAP, + KVMPPC_E...
75caec0c2aa3a7ec84348d438c74cb8a2eb4de97
Analyze and fix the following issue in the Linux kernel code: i2c: atr: Fix wrong include
Problem Details: The fwnode.h is not supposed to be used by the drivers as it has the definitions for the core parts for different device property provider implementations. Drop it. Note, that fwnode API for drivers is provided in property.h which is included here. Fixes: a076a860acae ("media: i2c: add I2C Address Tr...
```diff diff --git a/drivers/i2c/i2c-atr.c b/drivers/i2c/i2c-atr.c index 8fe9ddff8e96..783fb8df2ebe 100644 --- a/drivers/i2c/i2c-atr.c +++ b/drivers/i2c/i2c-atr.c @@ -8,12 +8,12 @@ * Originally based on i2c-mux.c */ -#include <linux/fwnode.h> #include <linux/i2c-atr.h> #include <linux/i2c.h> #include <linux/ke...
96e0b355883006554a0bee3697da475971d6bba8
Analyze and fix the following issue in the Linux kernel code: ARM: 9447/1: arm/memremap: fix arch_memremap_can_ram_remap()
Problem Details: arm/memremap: fix arch_memremap_can_ram_remap() commit 260364d112bc ("arm[64]/memremap: don't abuse pfn_valid() to ensure presence of linear map") added the definition of arch_memremap_can_ram_remap() for arm[64] specific filtering of what pages can be used from the linear mapping. memblock_is_map_mem...
```diff diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index 748698e91a4b..27e64f782cb3 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c @@ -515,7 +515,5 @@ void __init early_ioremap_init(void) bool arch_memremap_can_ram_remap(resource_size_t offset, size_t size, unsigned long flags) {...
bafa451a96d0f1404aa1a5a267f78767a55fac71
Analyze and fix the following issue in the Linux kernel code: riscv: defconfig: Remove EXPERT
Problem Details: The setting of EXPERT is a leftover from when the riscv defconfig was first added. As mentioned in the EXPERT Kconfig help text it is not intended to be set in the usual case. Upon removal a bunch of intrusive debug-related kernel options are no longer set, which is good. A few may want to come back i...
```diff diff --git a/arch/riscv/configs/defconfig b/arch/riscv/configs/defconfig index 3c8e16d71e17..286f490ead37 100644 --- a/arch/riscv/configs/defconfig +++ b/arch/riscv/configs/defconfig @@ -18,12 +18,9 @@ CONFIG_CGROUP_DEVICE=y CONFIG_CGROUP_CPUACCT=y CONFIG_CGROUP_PERF=y CONFIG_CGROUP_BPF=y -CONFIG_NAMESPACES=...
550c2aa787d1b06efcb11de1877354502a1237f2
Analyze and fix the following issue in the Linux kernel code: riscv: KGDB: Remove ".option norvc/.option rvc" for kgdb_compiled_break
Problem Details: [ Quoting Samuel Holland: ] This is a separate issue, but using ".option rvc" here is a bug. It will unconditionally enable the C extension for the rest of the file, even if the kernel is being built with CONFIG_RISCV_ISA_C=n. [ Quoting Palmer Dabbelt: ] We're just looking at the address of ...
```diff diff --git a/arch/riscv/kernel/kgdb.c b/arch/riscv/kernel/kgdb.c index 5d1ce8dacaf5..9f3db3503dab 100644 --- a/arch/riscv/kernel/kgdb.c +++ b/arch/riscv/kernel/kgdb.c @@ -257,9 +257,7 @@ void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long pc) noinline void arch_kgdb_breakpoint(void) { asm(".global kgd...
3af4bec9c1db3f003be4d5ae09b6a737e4be1612
Analyze and fix the following issue in the Linux kernel code: riscv: KGDB: Do not inline arch_kgdb_breakpoint()
Problem Details: The arch_kgdb_breakpoint() function defines the kgdb_compiled_break symbol using inline assembly. There's a potential issue where the compiler might inline arch_kgdb_breakpoint(), which would then define the kgdb_compiled_break symbol multiple times, leading to fail to link vmlinux.o. This isn't mere...
```diff diff --git a/arch/riscv/include/asm/kgdb.h b/arch/riscv/include/asm/kgdb.h index 46677daf708b..cc11c4544cff 100644 --- a/arch/riscv/include/asm/kgdb.h +++ b/arch/riscv/include/asm/kgdb.h @@ -19,16 +19,9 @@ #ifndef __ASSEMBLY__ +void arch_kgdb_breakpoint(void); extern unsigned long kgdb_compiled_break; -...
f95bbfe18512c5c018720468959edac056a17196
Analyze and fix the following issue in the Linux kernel code: drivers: base: handle module_kobject creation
Problem Details: module_add_driver() relies on module_kset list for /sys/module/<built-in-module>/drivers directory creation. Since, commit 96a1a2412acba ("kernel/params.c: defer most of param_sysfs_init() to late_initcall time") drivers which are initialized from subsys_initcall() or any other higher precedence initc...
```diff diff --git a/drivers/base/module.c b/drivers/base/module.c index 5bc71bea883a..218aaa096455 100644 --- a/drivers/base/module.c +++ b/drivers/base/module.c @@ -42,16 +42,13 @@ int module_add_driver(struct module *mod, const struct device_driver *drv) if (mod) mk = &mod->mkobj; else if (drv->mod_name) { - ...
68715cb5c0e00284d93f976c6368809f64131b0b
Analyze and fix the following issue in the Linux kernel code: ASoC: Intel: sof_sdw: Add NULL check in asoc_sdw_rt_dmic_rtd_init()
Problem Details: mic_name returned by devm_kasprintf() could be NULL. Add a check for it. Signed-off-by: Chenyuan Yang <chenyuan0y@gmail.com> Fixes: bee2fe44679f ("ASoC: Intel: sof_sdw: use generic rtd_init function for Realtek SDW DMICs") Link: https://patch.msgid.link/20250415194134.292830-1-chenyuan0y@gmail.com Sig...
```diff diff --git a/sound/soc/sdw_utils/soc_sdw_rt_dmic.c b/sound/soc/sdw_utils/soc_sdw_rt_dmic.c index 46d917a99c51..97be110a59b6 100644 --- a/sound/soc/sdw_utils/soc_sdw_rt_dmic.c +++ b/sound/soc/sdw_utils/soc_sdw_rt_dmic.c @@ -29,6 +29,8 @@ int asoc_sdw_rt_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_s...
9b3ae50cb902322a2b5922b9fcf8132d9b4c2a24
Analyze and fix the following issue in the Linux kernel code: irqchip/irq-bcm2712-mip: Enable driver when ARCH_BCM2835 is enabled
Problem Details: The BCM2712 MIP driver is required for Raspberry PI5, but it's not automatically enabled when ARCH_BCM2835 is enabled and depends on ARCH_BRCMSTB. ARCH_BCM2835 shares drivers with ARCH_BRCMSTB platforms, but Raspberry PI5 does not require the BRCMSTB specific drivers, which are selected via ARCH_BRCMS...
```diff diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig index cec05e443083..08bb3b031f23 100644 --- a/drivers/irqchip/Kconfig +++ b/drivers/irqchip/Kconfig @@ -114,8 +114,8 @@ config I8259 config BCM2712_MIP tristate "Broadcom BCM2712 MSI-X Interrupt Peripheral support" - depends on ARCH_BRCMSTB || ...
1a760d10ded372d113a0410c42be246315bbc2ff
Analyze and fix the following issue in the Linux kernel code: thunderbolt: Fix a logic error in wake on connect
Problem Details: commit a5cfc9d65879c ("thunderbolt: Add wake on connect/disconnect on USB4 ports") introduced a sysfs file to control wake up policy for a given USB4 port that defaulted to disabled. However when testing commit 4bfeea6ec1c02 ("thunderbolt: Use wake on connect and disconnect over suspend") I found that...
```diff diff --git a/drivers/thunderbolt/usb4.c b/drivers/thunderbolt/usb4.c index e51d01671d8e..3e96f1afd426 100644 --- a/drivers/thunderbolt/usb4.c +++ b/drivers/thunderbolt/usb4.c @@ -440,10 +440,10 @@ int usb4_switch_set_wake(struct tb_switch *sw, unsigned int flags) bool configured = val & PORT_CS_19_PC; u...
28e89cdac6482f3c980df3e2e245db7366269124
Analyze and fix the following issue in the Linux kernel code: irqchip/renesas-rzv2h: Prevent TINT spurious interrupt
Problem Details: A spurious TINT interrupt is seen during boot on RZ/G3E SMARC EVK. A glitch in the edge detection circuit can cause a spurious interrupt. Clear the status flag after setting the ICU_TSSRk registers, which is recommended in the hardware manual as a countermeasure. Fixes: 0d7605e75ac2 ("irqchip: Add R...
```diff diff --git a/drivers/irqchip/irq-renesas-rzv2h.c b/drivers/irqchip/irq-renesas-rzv2h.c index 3d5b5fdf9bde..0f0fd7d4dfdf 100644 --- a/drivers/irqchip/irq-renesas-rzv2h.c +++ b/drivers/irqchip/irq-renesas-rzv2h.c @@ -170,6 +170,14 @@ static void rzv2h_tint_irq_endisable(struct irq_data *d, bool enable) else ...
7ed50dc550b0a3bad82f675aaefd8cd00362672d
Analyze and fix the following issue in the Linux kernel code: ASoC: cs48l32: Fix spelling mistake "exceeeds" -> "exceeds"
Problem Details: There is a spelling mistake in a cs48l32_fll_err message. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20250416081204.36851-1-colin.i.king@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org...
```diff diff --git a/sound/soc/codecs/cs48l32.c b/sound/soc/codecs/cs48l32.c index 4e2bc09773cb..8fd0df671730 100644 --- a/sound/soc/codecs/cs48l32.c +++ b/sound/soc/codecs/cs48l32.c @@ -1802,7 +1802,7 @@ static int cs48l32_fllhj_validate(struct cs48l32_fll *fll, } if (fout > CS48L32_FLL_MAX_FOUT) { - cs48l32_fl...
91f4ca732495ea5dad39e1b041ef0c2a6e1fe02f
Analyze and fix the following issue in the Linux kernel code: ASoC: rt722: fix pop noise at the beginning of headphone playback
Problem Details: This patch added the function_status check to avoid the calibration again. The codec driver reinitializes when the 'FUNCTION_NEEDS_INITIALIZATION' flag raises. Signed-off-by: Shuming Fan <shumingf@realtek.com> Link: https://patch.msgid.link/20250416092528.737845-1-shumingf@realtek.com Signed-off-by: M...
```diff diff --git a/sound/soc/codecs/rt722-sdca-sdw.c b/sound/soc/codecs/rt722-sdca-sdw.c index 11e2e8f68a98..142eb032b4f8 100644 --- a/sound/soc/codecs/rt722-sdca-sdw.c +++ b/sound/soc/codecs/rt722-sdca-sdw.c @@ -24,6 +24,7 @@ static int rt722_sdca_mbq_size(struct device *dev, unsigned int reg) case 0x2f50: case ...
b2accfe7ca5bc9f9af28e603b79bdd5ad8df5c0b
Analyze and fix the following issue in the Linux kernel code: powerpc/boot: Check for ld-option support
Problem Details: Commit 579aee9fc594 ("powerpc: suppress some linker warnings in recent linker versions") enabled support to add linker option "--no-warn-rwx-segments", if the version is greater than 2.39. Similar build warning were reported recently from linker version 2.35.2. ld: warning: arch/powerpc/boot/zImage.ep...
```diff diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper index 1db60fe13802..267ca6d4d9b3 100755 --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper @@ -234,10 +234,8 @@ fi # suppress some warnings in recent ld versions nowarn="-z noexecstack" -if ! ld_is_lld; then - if [ "$LD_VERSION"...
1413708f990cb7d025affd706ba9c23e2bfc1a27
Analyze and fix the following issue in the Linux kernel code: riscv: Avoid fortify warning in syscall_get_arguments()
Problem Details: When building with CONFIG_FORTIFY_SOURCE=y and W=1, there is a warning because of the memcpy() in syscall_get_arguments(): In file included from include/linux/string.h:392, from include/linux/bitmap.h:13, from include/linux/cpumask.h:12, from ...
```diff diff --git a/arch/riscv/include/asm/syscall.h b/arch/riscv/include/asm/syscall.h index 121fff429dce..eceabf59ae48 100644 --- a/arch/riscv/include/asm/syscall.h +++ b/arch/riscv/include/asm/syscall.h @@ -62,8 +62,11 @@ static inline void syscall_get_arguments(struct task_struct *task, unsigned long *args)...
c6f1401b1d5fb3b83bd16ba8a0f89a8b1c805993
Analyze and fix the following issue in the Linux kernel code: xfs: fix fsmap for internal zoned devices
Problem Details: Filesystems with an internal zoned rt section use xfs_rtblock_t values that are relative to the start of the data device. When fsmap reports on internal rt sections, it reports the space used by the data section as "OWN_FS". Unfortunately, the logic for resuming a query isn't quite right, so xfs/273 ...
```diff diff --git a/fs/xfs/xfs_fsmap.c b/fs/xfs/xfs_fsmap.c index a4bc1642fe56..414b27a86458 100644 --- a/fs/xfs/xfs_fsmap.c +++ b/fs/xfs/xfs_fsmap.c @@ -876,6 +876,7 @@ xfs_getfsmap_rtdev_rmapbt( const struct xfs_fsmap *keys, struct xfs_getfsmap_info *info) { + struct xfs_fsmap key0 = *keys; /* struct copy */ ...
b484c1e225a6a582fc78c4d7af7b286408bb7d41
Analyze and fix the following issue in the Linux kernel code: drm/i915/pxp: fix undefined reference to `intel_pxp_gsccs_is_ready_for_sessions'
Problem Details: On x86_64 with gcc version 13.3.0, I compile kernel with: make defconfig ./scripts/kconfig/merge_config.sh .config <( echo CONFIG_COMPILE_TEST=y ) make KCFLAGS="-fno-inline-functions -fno-inline-small-functions -fno-inline-functions-called-once" Then I get a linker error: ld: vmlinux.o...
```diff diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h b/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h index 9aae779c4da3..4969d3de2bac 100644 --- a/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_gsccs.h @@ -23,6 +23,7 @@ int intel_pxp_gsccs_init(struct intel_pxp *pxp); int...
d2fddbd3479928e52061e1c8dd302006b6283ce8
Analyze and fix the following issue in the Linux kernel code: bonding: Fix multiple long standing offload races
Problem Details: Refactor the bonding ipsec offload operations to fix a number of long-standing control plane races between state migration and user deletion and a few other issues. xfrm state deletion can happen concurrently with bond_change_active_slave() operation. This manifests itself as a bond_ipsec_del_sa() cal...
```diff diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 14f7c9712ad4..8ed8c29659a0 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -545,7 +545,20 @@ static void bond_ipsec_add_sa_all(struct bonding *bond) slave_warn(bond_dev, real_dev, "%s: ...
fd4e41ebf66cb8b43de2f640b97314c4ee3b4499
Analyze and fix the following issue in the Linux kernel code: bonding: Mark active offloaded xfrm_states
Problem Details: When the active link is changed for a bond device, the existing xfrm states need to be migrated over to the new link. This is done with: - bond_ipsec_del_sa_all() goes through the offloaded states list and removes all of them from hw. - bond_ipsec_add_sa_all() re-offloads all states to the new device...
```diff diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 4ba525a564c5..14f7c9712ad4 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -496,9 +496,9 @@ static int bond_ipsec_add_sa(struct net_device *bond_dev, goto out; } - xs->xso.real_dev =...
d53dda291bbd993a29b84d358d282076e3d01506
Analyze and fix the following issue in the Linux kernel code: xfrm: Remove unneeded device check from validate_xmit_xfrm
Problem Details: validate_xmit_xfrm checks whether a packet already passed through it on the master device (xso.dev) and skips processing the skb again on the slave device (xso.real_dev). This check was added in commit [1] to avoid tx packets on a bond device pass through xfrm twice and get two sets of headers, but th...
```diff diff --git a/net/xfrm/xfrm_device.c b/net/xfrm/xfrm_device.c index 4f4165ff738d..0be5f7ffd019 100644 --- a/net/xfrm/xfrm_device.c +++ b/net/xfrm/xfrm_device.c @@ -145,10 +145,6 @@ struct sk_buff *validate_xmit_xfrm(struct sk_buff *skb, netdev_features_t featur return NULL; } - /* This skb was already val...
d755887f8e5a2a18e15e6632a5193e5feea18499
Analyze and fix the following issue in the Linux kernel code: drm/xe/dma_buf: stop relying on placement in unmap
Problem Details: The is_vram() is checking the current placement, however if we consider exported VRAM with dynamic dma-buf, it looks possible for the xe driver to async evict the memory, notifying the importer, however importer does not have to call unmap_attachment() immediately, but rather just as "soon as possible"...
```diff diff --git a/drivers/gpu/drm/xe/xe_dma_buf.c b/drivers/gpu/drm/xe/xe_dma_buf.c index f67803e15a0e..f7a20264ea33 100644 --- a/drivers/gpu/drm/xe/xe_dma_buf.c +++ b/drivers/gpu/drm/xe/xe_dma_buf.c @@ -145,10 +145,7 @@ static void xe_dma_buf_unmap(struct dma_buf_attachment *attach, struct sg_table *sgt, ...
bd7c0cb695e87c0e43247be8196b4919edbe0e85
Analyze and fix the following issue in the Linux kernel code: drm/xe/userptr: fix notifier vs folio deadlock
Problem Details: User is reporting what smells like notifier vs folio deadlock, where migrate_pages_batch() on core kernel side is holding folio lock(s) and then interacting with the mappings of it, however those mappings are tied to some userptr, which means calling into the notifier callback and grabbing the notifier...
```diff diff --git a/drivers/gpu/drm/xe/xe_hmm.c b/drivers/gpu/drm/xe/xe_hmm.c index c3cc0fa105e8..57b71956ddf4 100644 --- a/drivers/gpu/drm/xe/xe_hmm.c +++ b/drivers/gpu/drm/xe/xe_hmm.c @@ -19,29 +19,6 @@ static u64 xe_npages_in_range(unsigned long start, unsigned long end) return (end - start) >> PAGE_SHIFT; } -...
1c406526bd84f1e0bd4bb4b50c6eeba0b135765a
Analyze and fix the following issue in the Linux kernel code: xfs: Fix spelling mistake "drity" -> "dirty"
Problem Details: There is a spelling mistake in fs/xfs/xfs_log.c. Fix it. Signed-off-by: Zhang Xianwei <zhang.xianwei8@zte.com.cn> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Carlos Maiolino <cem@kernel.org>
```diff diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 6493bdb57351..980aabc49512 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c @@ -2888,7 +2888,7 @@ xlog_force_and_check_iclog( * * 1. the current iclog is active and has no data; the previous iclog * is in the active or dirty state. - * 2. the cur...
399eab7f92fb73ffe621294a2d6bec8fc9f3b36b
Analyze and fix the following issue in the Linux kernel code: ata: libata-sata: Save all fields from sense data descriptor
Problem Details: When filling the taskfile result for a successful NCQ command, we use the SDB FIS from the FIS Receive Area, see e.g. ahci_qc_ncq_fill_rtf(). However, the SDB FIS only has fields STATUS and ERROR. For a successful NCQ command that has sense data, we will have a successful sense data descriptor, in th...
```diff diff --git a/drivers/ata/libata-sata.c b/drivers/ata/libata-sata.c index ba300cc0a3a3..2e4463d3a356 100644 --- a/drivers/ata/libata-sata.c +++ b/drivers/ata/libata-sata.c @@ -1510,6 +1510,8 @@ int ata_eh_get_ncq_success_sense(struct ata_link *link) unsigned int err_mask, tag; u8 *sense, sk = 0, asc = 0, asc...
baf2f2c2b4c8e1d398173acd4d2fa9131a86b84e
Analyze and fix the following issue in the Linux kernel code: platform/x86: msi-wmi-platform: Workaround a ACPI firmware bug
Problem Details: The ACPI byte code inside the ACPI control method responsible for handling the WMI method calls uses a global buffer for constructing the return value, yet the ACPI control method itself is not marked as "Serialized". This means that calling WMI methods on this WMI device is not thread-safe, as concurr...
```diff diff --git a/Documentation/wmi/devices/msi-wmi-platform.rst b/Documentation/wmi/devices/msi-wmi-platform.rst index 31a136942892..73197b31926a 100644 --- a/Documentation/wmi/devices/msi-wmi-platform.rst +++ b/Documentation/wmi/devices/msi-wmi-platform.rst @@ -138,6 +138,10 @@ input data, the meaning of which dep...