id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
ed70aaac7c359540d3d8332827fa60b6a45e15f2
Analyze and fix the following issue in the Linux kernel code: Kconfig: reduce the amount of power sequencing noise
Problem Details: Kconfig will ask the user twice about power sequencing: once for the QCom WCN power sequencing driver and then again for the PCI power control driver using it. Let's automate the selection of PCI_PWRCTL by introducing a new hidden symbol: HAVE_PWRCTL which should be selected by all platforms that have...
```diff diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms index a52618073de2..d7837d89564e 100644 --- a/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms @@ -267,6 +267,7 @@ config ARCH_QCOM bool "Qualcomm Platforms" select GPIOLIB select PINCTRL + select HAVE_PWRCTL help ...
e528be3c87be953b73e7826a2d7e4b837cbad39d
Analyze and fix the following issue in the Linux kernel code: thermal: core: Allow thermal zones to tell the core to ignore them
Problem Details: The iwlwifi wireless driver registers a thermal zone that is only needed when the network interface handled by it is up and it wants that thermal zone to be effectively ignored by the core otherwise. Before commit a8a261774466 ("thermal: core: Call monitor_thermal_zone() if zone temperature is invalid...
```diff diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c index ed0796aff722..d92470960b38 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c @@ -621,8 +621,14 @@ static int iwl_mvm_tzone_get_temp(struct thermal...
ca5442ed8f5383f86bb9b4d66eeb816cd90aeb3b
Analyze and fix the following issue in the Linux kernel code: drm/bridge-connector: Fix double free in error handling paths
Problem Details: The recent switch to drmm allocation in drm_bridge_connector_init() may cause double free on bridge_connector in some of the error handling paths. Drop the explicit kfree() calls on bridge_connector. Fixes: c12907be57b1 ("drm/bridge-connector: switch to using drmm allocations") Signed-off-by: Cristia...
```diff diff --git a/drivers/gpu/drm/drm_bridge_connector.c b/drivers/gpu/drm/drm_bridge_connector.c index 0869b663f17e..a4fbf1eb7ac5 100644 --- a/drivers/gpu/drm/drm_bridge_connector.c +++ b/drivers/gpu/drm/drm_bridge_connector.c @@ -443,10 +443,8 @@ struct drm_connector *drm_bridge_connector_init(struct drm_device *d...
bc657615e10ddd7637dcc05811194ad7e2baea33
Analyze and fix the following issue in the Linux kernel code: drm/bridge: Silence error messages upon probe deferral
Problem Details: When -EPROBE_DEFER is returned do not raise an error, but silently return this error instead. Fixes error like this: [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/bus@30800000/mipi-dsi@30a00000 to encoder None-34: -517 [drm:drm_bridge_attach] *ERROR* failed to attach bridge /soc@0/...
```diff diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c index d44f055dbe3e..c6af46dd02bf 100644 --- a/drivers/gpu/drm/drm_bridge.c +++ b/drivers/gpu/drm/drm_bridge.c @@ -353,8 +353,13 @@ err_reset_bridge: bridge->encoder = NULL; list_del(&bridge->chain_node); - DRM_ERROR("failed to attach...
c5118072e228e7e4385fc5ac46b2e31cf6c4f2d3
Analyze and fix the following issue in the Linux kernel code: net: dsa: b53: Limit chip-wide jumbo frame config to CPU ports
Problem Details: Broadcom switches supported by the b53 driver use a chip-wide jumbo frame configuration. In the commit referenced with the Fixes tag, the setting is applied just for the last port changing its MTU. While configuring CPU ports accounts for tagger overhead, user ports do not. When setting the MTU for a ...
```diff diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c index 8f50abe739b7..0783fc121bbb 100644 --- a/drivers/net/dsa/b53/b53_common.c +++ b/drivers/net/dsa/b53/b53_common.c @@ -2256,6 +2256,9 @@ static int b53_change_mtu(struct dsa_switch *ds, int port, int mtu) if (is5325(dev) || is...
66b6095c264e1b4e0a441c6329861806504e06c6
Analyze and fix the following issue in the Linux kernel code: net: dsa: mv88e6xxx: Limit chip-wide frame size config to CPU ports
Problem Details: Marvell chips not supporting per-port jumbo frame size configurations use a chip-wide frame size configuration. In the commit referenced with the Fixes tag, the setting is applied just for the last port changing its MTU. While configuring CPU ports accounts for tagger overhead, user ports do not. When...
```diff diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 07c897b13de1..5b4e2ce5470d 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -3626,7 +3626,8 @@ static int mv88e6xxx_change_mtu(struct dsa_switch *ds, int port, int new_mtu) mv88e6xxx_r...
4e076ff6ad5302c015617da30d877b4cdcbdf613
Analyze and fix the following issue in the Linux kernel code: net: airoha: Fix NULL pointer dereference in airoha_qdma_cleanup_rx_queue()
Problem Details: Move page_pool_get_dma_dir() inside the while loop of airoha_qdma_cleanup_rx_queue routine in order to avoid possible NULL pointer dereference if airoha_qdma_init_rx_queue() fails before properly allocating the page_pool pointer. Fixes: 23020f049327 ("net: airoha: Introduce ethernet support for EN7581...
```diff diff --git a/drivers/net/ethernet/mediatek/airoha_eth.c b/drivers/net/ethernet/mediatek/airoha_eth.c index cc1a69522f61..16761fde6c6c 100644 --- a/drivers/net/ethernet/mediatek/airoha_eth.c +++ b/drivers/net/ethernet/mediatek/airoha_eth.c @@ -1585,7 +1585,6 @@ static int airoha_qdma_init_rx_queue(struct airoha_...
fc28d1c1fe3b3e2fbc50834c8f73dda72f6af9fc
Analyze and fix the following issue in the Linux kernel code: spi: spidev: add correct compatible for Rohm BH2228FV
Problem Details: When Maxime originally added the BH2228FV to the spidev driver, he spelt it incorrectly - the d should have been a b. Add the correctly spelt compatible to the driver. Although the majority of users of this compatible are abusers, there is at least one board that validly uses the incorrect spelt compat...
```diff diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index 95fb5f1c91c1..05e6d007f9a7 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -734,6 +734,7 @@ static const struct of_device_id spidev_dt_ids[] = { { .compatible = "lwn,bk4", .data = &spidev_of_check }, { .compatible = "menlo,m53cpl...
5170dae5591036dba7daa519ea3126169300e275
Analyze and fix the following issue in the Linux kernel code: dt-bindings: trivial-devices: fix Rohm BH2228FV compatible string
Problem Details: When Maxime originally added the BH2228FV to the spidev driver, he spelt it incorrectly - the d should have been a b. That spelling was then propagated to the binding when written by Krzysztof. Add a new, correctly spelt compatible and advise against using the incorrectly spelling. Fixes: 025aea27732d...
```diff diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml index 0a419453d183..5d9de7f68afc 100644 --- a/Documentation/devicetree/bindings/trivial-devices.yaml +++ b/Documentation/devicetree/bindings/trivial-devices.yaml @@ -318,7 +318,9 @@ prope...
f2038c12e8133bf4c6bd4d1127a23310d55d9e21
Analyze and fix the following issue in the Linux kernel code: ASoC: sof: amd: fix for firmware reload failure in Vangogh platform
Problem Details: Setting ACP ACLK as clock source when ACP enters D0 state causing firmware load failure, as per design clock source should be internal clock. Remove acp_clkmux_sel field so that ACP will use internal clock source when ACP enters into D0 state. Fixes: d0dab6b76a9f ("ASoC: SOF: amd: Add sof support for...
```diff diff --git a/sound/soc/sof/amd/pci-vangogh.c b/sound/soc/sof/amd/pci-vangogh.c index 16eb2994fbab..eba580840100 100644 --- a/sound/soc/sof/amd/pci-vangogh.c +++ b/sound/soc/sof/amd/pci-vangogh.c @@ -34,7 +34,6 @@ static const struct sof_amd_acp_desc vangogh_chip_info = { .dsp_intr_base = ACP5X_DSP_SW_INTR_BAS...
f036e68212c11e5a7edbb59b5e25299341829485
Analyze and fix the following issue in the Linux kernel code: ipv4: Fix incorrect TOS in fibmatch route get reply
Problem Details: The TOS value that is returned to user space in the route get reply is the one with which the lookup was performed ('fl4->flowi4_tos'). This is fine when the matched route is configured with a TOS as it would not match if its TOS value did not match the one with which the lookup was performed. However...
```diff diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 82b8fe8faeb7..5090912533d6 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -3331,7 +3331,7 @@ static int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh, fri.tb_id = table_id; fri.dst = res.prefix; fri.dst_len = res.prefixlen...
338bb57e4c2a1c2c6fc92f9c0bd35be7587adca7
Analyze and fix the following issue in the Linux kernel code: ipv4: Fix incorrect TOS in route get reply
Problem Details: The TOS value that is returned to user space in the route get reply is the one with which the lookup was performed ('fl4->flowi4_tos'). This is fine when the matched route is configured with a TOS as it would not match if its TOS value did not match the one with which the lookup was performed. However...
```diff diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index 6e7984bfb986..72af2f223e59 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h @@ -173,6 +173,7 @@ struct fib_result { unsigned char type; unsigned char scope; u32 tclassid; + dscp_t dscp; struct fib_nh_common *nhc; struct f...
120f1c857a73e52132e473dee89b340440cb692b
Analyze and fix the following issue in the Linux kernel code: net: flow_dissector: use DEBUG_NET_WARN_ON_ONCE
Problem Details: The following splat is easy to reproduce upstream as well as in -stable kernels. Florian Westphal provided the following commit: d1dab4f71d37 ("net: add and use __skb_get_hash_symmetric_net") but this complementary fix has been also suggested by Willem de Bruijn and it can be easily backported to -...
```diff diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c index ada1e39b557e..0e638a37aa09 100644 --- a/net/core/flow_dissector.c +++ b/net/core/flow_dissector.c @@ -1117,7 +1117,7 @@ bool __skb_flow_dissect(const struct net *net, } } - WARN_ON_ONCE(!net); + DEBUG_NET_WARN_ON_ONCE(!net); if (n...
275aa53f59df769802f28a0a623019aadab2e05d
Analyze and fix the following issue in the Linux kernel code: drm/xe/pm: Add trace for pm functions
Problem Details: Add trace for xe pm function for better debuggability. v2: Fix indentation and add trace for xe_pm_runtime_get_ioctl Cc: Matthew Brost <matthew.brost@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patchwork.freedesktop.org/patch...
```diff diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c index de3b5df65e48..9f3c14fd9f33 100644 --- a/drivers/gpu/drm/xe/xe_pm.c +++ b/drivers/gpu/drm/xe/xe_pm.c @@ -20,6 +20,7 @@ #include "xe_guc.h" #include "xe_irq.h" #include "xe_pcode.h" +#include "xe_trace.h" #include "xe_wa.h" /** @@ -...
280e36f0d5b997173d014c07484c03a7f7750668
Analyze and fix the following issue in the Linux kernel code: nsfs: use cleanup guard
Problem Details: Ensure that rcu read lock is given up before returning. Link: https://lore.kernel.org/r/20240716-elixier-fliesen-1ab342151a61@brauner Fixes: ca567df74a28 ("nsfs: add pid translation ioctls") Reported-by: syzbot+a3e82ae343b26b4d2335@syzkaller.appspotmail.com Signed-off-by: Christian Brauner <brauner@ke...
```diff diff --git a/fs/nsfs.c b/fs/nsfs.c index a4a925dce331..97c37a9631e5 100644 --- a/fs/nsfs.c +++ b/fs/nsfs.c @@ -174,14 +174,14 @@ static long ns_ioctl(struct file *filp, unsigned int ioctl, fallthrough; case NS_GET_PID_IN_PIDNS: fallthrough; - case NS_GET_TGID_IN_PIDNS: + case NS_GET_TGID_IN_PIDNS: { ...
400e4064b63a4c302dff11136828f54de91eda2a
Analyze and fix the following issue in the Linux kernel code: fs/adfs: add MODULE_DESCRIPTION
Problem Details: Fix the 'make W=1' issue: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/adfs/adfs.o Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://lore.kernel.org/r/20240523-md-adfs-v1-1-364268e38370@quicinc.com Signed-off-by: Christian Brauner <brauner@kernel.org>
```diff diff --git a/fs/adfs/super.c b/fs/adfs/super.c index 9354b14bbfe3..f0b999a4961b 100644 --- a/fs/adfs/super.c +++ b/fs/adfs/super.c @@ -491,4 +491,5 @@ static void __exit exit_adfs_fs(void) module_init(init_adfs_fs) module_exit(exit_adfs_fs) +MODULE_DESCRIPTION("Acorn Disc Filing System"); MODULE_LICENSE("G...
5418e6dfc905b3ccc1e01bdad97d948697b20100
Analyze and fix the following issue in the Linux kernel code: misc: Kconfig: exclude mrvl-cn10k-dpi compilation for 32-bit systems
Problem Details: Upon adding CONFIG_ARCH_THUNDER & CONFIG_COMPILE_TEST dependency, compilation errors arise on 32-bit ARM with writeq() & readq() calls which are used for accessing 64-bit values. Since DPI hardware only works with 64-bit register accesses, using CONFIG_64BIT dependency to skip compilation on 32-bit sy...
```diff diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index f3bb75384627..41c3d2821a78 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -588,7 +588,7 @@ config NSM config MARVELL_CN10K_DPI tristate "Octeon CN10K DPI driver" depends on PCI - depends on ARCH_THUNDER || COMPILE_TEST + depend...
f4b89d8ce5a835afa51404977ee7e3889c2b9722
Analyze and fix the following issue in the Linux kernel code: landlock: Various documentation improvements
Problem Details: * Fix some typos, incomplete or confusing phrases. * Split paragraphs where appropriate. * List the same error code multiple times, if it has multiple possible causes. * Bring wording closer to the man page wording, which has undergone more thorough review (esp. for LANDLOCK_ACCESS_FS_WRITE_FILE)...
```diff diff --git a/Documentation/userspace-api/landlock.rst b/Documentation/userspace-api/landlock.rst index 07b63aec56fa..37dafce8038b 100644 --- a/Documentation/userspace-api/landlock.rst +++ b/Documentation/userspace-api/landlock.rst @@ -8,7 +8,7 @@ Landlock: unprivileged access control ==========================...
f0d17d696dfce77c9abc830e4ac2d677890a2dad
Analyze and fix the following issue in the Linux kernel code: HID: wacom: Modify pen IDs
Problem Details: The pen ID, 0x80842, was not the correct ID for wacom driver to treat. The ID was corrected to 0x8842. Also, 0x4200 was not the expected ID used on any Wacom device. Therefore, 0x4200 was removed. Signed-off-by: Tatsunosuke Tobita <tatsunosuke.tobita@wacom.com> Signed-off-by: Tatsunosuke Tobita <tatsu...
```diff diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c index a44367aef621..20de97ce0f5e 100644 --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c @@ -714,13 +714,12 @@ static int wacom_intuos_get_tool_type(int tool_id) case 0x8e2: /* IntuosHT2 pen */ case 0x022: case 0x200: /* Pro Pen 3 *...
c14112a5574ff5cf3de198ab6eeff53ac1234068
Analyze and fix the following issue in the Linux kernel code: driver core: auxiliary bus: Fix documentation of auxiliary_device
Problem Details: Fix the documentation of the below field of struct auxiliary_device include/linux/auxiliary_bus.h:150: warning: Function parameter or struct member 'sysfs' not described in 'auxiliary_device' include/linux/auxiliary_bus.h:150: warning: Excess struct member 'irqs' description in 'auxiliary_device' incl...
```diff diff --git a/include/linux/auxiliary_bus.h b/include/linux/auxiliary_bus.h index 3ba4487c9cd9..1539bbd263d2 100644 --- a/include/linux/auxiliary_bus.h +++ b/include/linux/auxiliary_bus.h @@ -58,9 +58,10 @@ * in * @name: Match name found by the auxiliary device driver, * @id: unique identitier if mul...
1f038d5897fe6b439039fc28420842abcc0d126b
Analyze and fix the following issue in the Linux kernel code: net: airoha: fix error branch in airoha_dev_xmit and airoha_set_gdm_ports
Problem Details: Fix error case management in airoha_dev_xmit routine since we need to DMA unmap pending buffers starting from q->head. Moreover fix a typo in error case branch in airoha_set_gdm_ports routine. Fixes: 23020f049327 ("net: airoha: Introduce ethernet support for EN7581 SoC") Signed-off-by: Lorenzo Biancon...
```diff diff --git a/drivers/net/ethernet/mediatek/airoha_eth.c b/drivers/net/ethernet/mediatek/airoha_eth.c index 7967a92803c2..cc1a69522f61 100644 --- a/drivers/net/ethernet/mediatek/airoha_eth.c +++ b/drivers/net/ethernet/mediatek/airoha_eth.c @@ -977,7 +977,7 @@ static int airoha_set_gdm_ports(struct airoha_eth *et...
03b54bad26f3c78bb1f90410ec3e4e7fe197adc9
Analyze and fix the following issue in the Linux kernel code: gve: Fix XDP TX completion handling when counters overflow
Problem Details: In gve_clean_xdp_done, the driver processes the TX completions based on a 32-bit NIC counter and a 32-bit completion counter stored in the tx queue. Fix the for loop so that the counter wraparound is handled correctly. Fixes: 75eaae158b1b ("gve: Add XDP DROP and TX support for GQI-QPL format") Signed...
```diff diff --git a/drivers/net/ethernet/google/gve/gve_tx.c b/drivers/net/ethernet/google/gve/gve_tx.c index 24a64ec1073e..e7fb7d6d283d 100644 --- a/drivers/net/ethernet/google/gve/gve_tx.c +++ b/drivers/net/ethernet/google/gve/gve_tx.c @@ -158,15 +158,16 @@ static int gve_clean_xdp_done(struct gve_priv *priv, struct...
f944ffcbc2e1c759764850261670586ddf3bdabb
Analyze and fix the following issue in the Linux kernel code: watchdog/perf: properly initialize the turbo mode timestamp and rearm counter
Problem Details: For systems on which the performance counter can expire early due to turbo modes the watchdog handler has a safety net in place which validates that since the last watchdog event there has at least 4/5th of the watchdog period elapsed. This works reliably only after the first watchdog event because th...
```diff diff --git a/kernel/watchdog_perf.c b/kernel/watchdog_perf.c index d577c4a8321e..59c1d86a73a2 100644 --- a/kernel/watchdog_perf.c +++ b/kernel/watchdog_perf.c @@ -75,11 +75,15 @@ static bool watchdog_check_timestamp(void) __this_cpu_write(last_timestamp, now); return true; } -#else -static inline bool watc...
30d77b7eef019fa4422980806e8b7cdc8674493e
Analyze and fix the following issue in the Linux kernel code: mm/mglru: fix ineffective protection calculation
Problem Details: mem_cgroup_calculate_protection() is not stateless and should only be used as part of a top-down tree traversal. shrink_one() traverses the per-node memcg LRU instead of the root_mem_cgroup tree, and therefore it should not call mem_cgroup_calculate_protection(). The existing misuse in shrink_one() c...
```diff diff --git a/mm/vmscan.c b/mm/vmscan.c index 6216d79edb7f..525d3ffa8451 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -3915,6 +3915,32 @@ done: * working set protection ******************************************************************************/ +static void set_initial_priorit...
b749cb0d61ca1ed120a555badf3a7b025b8a7fc2
Analyze and fix the following issue in the Linux kernel code: mm/zswap: fix a white space issue
Problem Details: We accidentally deleted a tab in commit f84152e9efc5 ("mm/zswap: use only one pool in zswap"). Add it back. Link: https://lkml.kernel.org/r/c15066a0-f061-42c9-b0f5-d60281d3d5d8@stanley.mountain Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Chengming Zhou <chengming.zhou@linux.d...
```diff diff --git a/mm/zswap.c b/mm/zswap.c index 66decab33d14..adeaf9c97fde 100644 --- a/mm/zswap.c +++ b/mm/zswap.c @@ -803,7 +803,7 @@ static void zswap_entry_free(struct zswap_entry *entry) atomic_dec(&zswap_same_filled_pages); else { zswap_lru_del(&zswap_list_lru, entry); - zpool_free(entry->pool->zpool, ...
1390a3334a48ecac5175865fd433d55eec255db8
Analyze and fix the following issue in the Linux kernel code: mm/hugetlb: fix kernel NULL pointer dereference when migrating hugetlb folio
Problem Details: A kernel crash was observed when migrating hugetlb folio: BUG: kernel NULL pointer dereference, address: 0000000000000008 PGD 0 P4D 0 Oops: Oops: 0002 [#1] PREEMPT SMP NOPTI CPU: 0 PID: 3435 Comm: bash Not tainted 6.10.0-rc6-00450-g8578ca01f21f #66 RIP: 0010:__folio_undo_large_rmappable+0x70/0xb0 RSP:...
```diff diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 80a93b69652f..11f25e00a293 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -2166,6 +2166,9 @@ static struct folio *alloc_buddy_hugetlb_folio(struct hstate *h, nid = numa_mem_id(); retry: folio = __folio_alloc(gfp_mask, order, nid, nmask); + /* Ensure hugetlb ...
667574e873b5f77a220b2a93329689f36fb56d5d
Analyze and fix the following issue in the Linux kernel code: mm/hugetlb: fix possible recursive locking detected warning
Problem Details: When tries to demote 1G hugetlb folios, a lockdep warning is observed: ============================================ WARNING: possible recursive locking detected 6.10.0-rc6-00452-ga4d0275fa660-dirty #79 Not tainted -------------------------------------------- bash/710 is trying to acquire lock: fffffff...
```diff diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index ecd0ceeea206..c9bf68c239a0 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -663,6 +663,7 @@ HPAGEFLAG(RawHwpUnreliable, raw_hwp_unreliable) /* Defines one hugetlb page size */ struct hstate { struct mutex resize_lock;...
33dfe9204f29b415bbc0abb1a50642d1ba94f5e9
Analyze and fix the following issue in the Linux kernel code: mm/gup: clear the LRU flag of a page before adding to LRU batch
Problem Details: If a large number of CMA memory are configured in system (for example, the CMA memory accounts for 50% of the system memory), starting a virtual virtual machine with device passthrough, it will call pin_user_pages_remote(..., FOLL_LONGTERM, ...) to pin memory. Normally if a page is present and in CMA ...
```diff diff --git a/mm/swap.c b/mm/swap.c index dc205bdfbbd4..9caf6b017cf0 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -211,10 +211,6 @@ static void folio_batch_move_lru(struct folio_batch *fbatch, move_fn_t move_fn) for (i = 0; i < folio_batch_count(fbatch); i++) { struct folio *folio = fbatch->folios[i]; - /* ...
af649773fb25250cd22625af021fb6275c56a3ee
Analyze and fix the following issue in the Linux kernel code: mm/numa_balancing: teach mpol_to_str about the balancing mode
Problem Details: Since balancing mode was added in bda420b98505 ("numa balancing: migrate on fault among multiple bound nodes"), it was possible to set this mode but it wouldn't be shown in /proc/<pid>/numa_maps since there was no support for it in the mpol_to_str() helper. Furthermore, because the balancing mode sets...
```diff diff --git a/mm/mempolicy.c b/mm/mempolicy.c index f8703feb68b7..327a19b0883d 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -3297,8 +3297,9 @@ out: * @pol: pointer to mempolicy to be formatted * * Convert @pol into a string. If @buffer is too short, truncate the string. - * Recommend a @maxlen of ...
5316b497c51fee98b399c055a76f10088dcdce2b
Analyze and fix the following issue in the Linux kernel code: mm: memcg1: convert charge move flags to unsigned long long
Problem Details: Currently MOVE_ANON and MOVE_FILE flags are defined as integers and it leads to the following Smatch static checker warning: mm/memcontrol-v1.c:609 mem_cgroup_move_charge_write() warn: was expecting a 64 bit value instead of '~(1 | 2)' Fix this be redefining them as unsigned long long. Even t...
```diff diff --git a/mm/memcontrol-v1.c b/mm/memcontrol-v1.c index 6b3e56e88a8a..2aeea4d8bf8e 100644 --- a/mm/memcontrol-v1.c +++ b/mm/memcontrol-v1.c @@ -44,8 +44,8 @@ static struct mem_cgroup_tree soft_limit_tree __read_mostly; /* * Types of charges to be moved. */ -#define MOVE_ANON 0x1U -#define MOVE_FILE 0x2U...
6ab42fe21c84d72da752923b4bd7075344f4a362
Analyze and fix the following issue in the Linux kernel code: alloc_tag: fix page_ext_get/page_ext_put sequence during page splitting
Problem Details: pgalloc_tag_sub() might call page_ext_put() using a page different from the one used in page_ext_get() call. This does not pose an issue since page_ext_put() ignores this parameter as long as it's non-NULL but technically this is wrong. Fix it by storing the original page used in page_ext_get() and p...
```diff diff --git a/include/linux/pgalloc_tag.h b/include/linux/pgalloc_tag.h index acb1e9ce7981..18cd0c0c73d9 100644 --- a/include/linux/pgalloc_tag.h +++ b/include/linux/pgalloc_tag.h @@ -71,6 +71,7 @@ static inline void pgalloc_tag_sub(struct page *page, unsigned int nr) static inline void pgalloc_tag_split(struct...
fd8acc0097b91fab3104fa8a66ce2fd9cf8b0c11
Analyze and fix the following issue in the Linux kernel code: lib: reuse page_ext_data() to obtain codetag_ref
Problem Details: codetag_ref_from_page_ext() reimplements the same calculation as page_ext_data(). Reuse existing function instead. Link: https://lkml.kernel.org/r/20240711220457.1751071-2-surenb@google.com Fixes: dcfe378c81f7 ("lib: introduce support for page allocation tagging") Signed-off-by: Suren Baghdasaryan <s...
```diff diff --git a/include/linux/pgalloc_tag.h b/include/linux/pgalloc_tag.h index 9cacadbd61f8..acb1e9ce7981 100644 --- a/include/linux/pgalloc_tag.h +++ b/include/linux/pgalloc_tag.h @@ -15,7 +15,7 @@ extern struct page_ext_operations page_alloc_tagging_ops; static inline union codetag_ref *codetag_ref_from_page...
4810a82c8a8ae06fe6496a23fcb89a4952603e60
Analyze and fix the following issue in the Linux kernel code: lib: add missing newline character in the warning message
Problem Details: Link: https://lkml.kernel.org/r/20240711220457.1751071-1-surenb@google.com Fixes: 22d407b164ff ("lib: add allocation tagging support for memory allocation profiling") Signed-off-by: Suren Baghdasaryan <surenb@google.com> Cc: Kees Cook <keescook@chromium.org> Cc: Kent Overstreet <kent.overstreet@linux.d...
```diff diff --git a/include/linux/alloc_tag.h b/include/linux/alloc_tag.h index abd24016a900..8c61ccd161ba 100644 --- a/include/linux/alloc_tag.h +++ b/include/linux/alloc_tag.h @@ -122,7 +122,7 @@ static inline void alloc_tag_add_check(union codetag_ref *ref, struct alloc_tag "alloc_tag was not cleared (got tag ...
3f74e6bd3b84a8b6bb3cc51609c89e5b9d58eed7
Analyze and fix the following issue in the Linux kernel code: mm/mglru: fix overshooting shrinker memory
Problem Details: set_initial_priority() tries to jump-start global reclaim by estimating the priority based on cold/hot LRU pages. The estimation does not account for shrinker objects, and it cannot do so because their sizes can be in different units other than page. If shrinker objects are the majority, e.g., on Tru...
```diff diff --git a/mm/vmscan.c b/mm/vmscan.c index 6403038c776e..6216d79edb7f 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -4930,7 +4930,11 @@ static void set_initial_priority(struct pglist_data *pgdat, struct scan_control /* round down reclaimable and round up sc->nr_to_reclaim */ priority = fls_long(reclaimabl...
8b671fe1a879923ecfb72dda6caf01460dd885ef
Analyze and fix the following issue in the Linux kernel code: mm/mglru: fix div-by-zero in vmpressure_calc_level()
Problem Details: evict_folios() uses a second pass to reclaim folios that have gone through page writeback and become clean before it finishes the first pass, since folio_rotate_reclaimable() cannot handle those folios due to the isolation. The second pass tries to avoid potential double counting by deducting scan_con...
```diff diff --git a/mm/vmscan.c b/mm/vmscan.c index 0761f91b407f..6403038c776e 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -4597,7 +4597,6 @@ retry: /* retry folios that may have missed folio_rotate_reclaimable() */ list_move(&folio->lru, &clean); - sc->nr_scanned -= folio_nr_pages(folio); } spin_lock...
7b7aca6d7c0f9b2d9400bfc57cb2b23cfbd5134d
Analyze and fix the following issue in the Linux kernel code: mm: ignore data-race in __swap_writepage
Problem Details: Syzbot reported a possible data race: BUG: KCSAN: data-race in __swap_writepage / scan_swap_map_slots read-write to 0xffff888102fca610 of 8 bytes by task 7106 on cpu 1. read to 0xffff888102fca610 of 8 bytes by task 7080 on cpu 0. While we are in __swap_writepage to read sis->flags, scan_swap_map_slo...
```diff diff --git a/mm/page_io.c b/mm/page_io.c index 6c1c1828bb88..ff8c99ee3af7 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -382,7 +382,12 @@ void __swap_writepage(struct folio *folio, struct writeback_control *wbc) */ if (data_race(sis->flags & SWP_FS_OPS)) swap_writepage_fs(folio, wbc); - else if (sis->...
dffe24e9587607c377d87d6c372653ae44b99ce7
Analyze and fix the following issue in the Linux kernel code: hugetlbfs: ensure generic_hugetlb_get_unmapped_area() returns higher address than mmap_min_addr
Problem Details: generic_hugetlb_get_unmapped_area() was returning an address less than mmap_min_addr if the mmap argument addr, after alignment, was less than mmap_min_addr, causing mmap to fail. This is because current generic_hugetlb_get_unmapped_area() code does not take into account mmap_min_addr. This patch ens...
```diff diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index a84832bd06c2..cc5e7e80d557 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c @@ -222,13 +222,13 @@ generic_hugetlb_get_unmapped_area(struct file *file, unsigned long addr, unsigned long flags) { struct mm_struct *mm = current->m...
e3615bd198289f319172c428f20857accb46b830
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: fix corruption with high refresh rates on DCN 3.0
Problem Details: This reverts commit bc87d666c05a13e6d4ae1ddce41fc43d2567b9a2 and the register changes from commit 6d4279cb99ac4f51d10409501d29969f687ac8dc. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3412 Cc: mikhail.v.gavrilov@gmail.com Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Tested-by: Mikhail G...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/optc/dcn10/dcn10_optc.c b/drivers/gpu/drm/amd/display/dc/optc/dcn10/dcn10_optc.c index 336488c0574e..94427875bcdd 100644 --- a/drivers/gpu/drm/amd/display/dc/optc/dcn10/dcn10_optc.c +++ b/drivers/gpu/drm/amd/display/dc/optc/dcn10/dcn10_optc.c @@ -945,19 +945,10 @@ voi...
cbd070a4ae62f119058973f6d2c984e325bce6e7
Analyze and fix the following issue in the Linux kernel code: ipvs: properly dereference pe in ip_vs_add_service
Problem Details: Use pe directly to resolve sparse warning: net/netfilter/ipvs/ip_vs_ctl.c:1471:27: warning: dereference of noderef expression Fixes: 39b972231536 ("ipvs: handle connections started by real-servers") Signed-off-by: Chen Hanxiao <chenhx.fnst@fujitsu.com> Acked-by: Julian Anastasov <ja@ssi.bg> Acked-b...
```diff diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index 78a1cc72dc38..706c2b52a1ac 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c @@ -1459,18 +1459,18 @@ ip_vs_add_service(struct netns_ipvs *ipvs, struct ip_vs_service_user_kern *u, if (ret < 0) g...
1b0ad43177c097d38b967b99c2b71d8be28b0223
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Support SOCK_STREAM in unix_inet_redir_to_connected()
Problem Details: Function ignores the AF_UNIX socket type argument, SOCK_DGRAM is hardcoded. Fix to respect the argument provided. Fixes: 75e0e27db6cf ("selftest/bpf: Change udp to inet in some function names") Suggested-by: Jakub Sitnicki <jakub@cloudflare.com> Signed-off-by: Michal Luczaj <mhal@rbox.co> Signed-off-b...
```diff diff --git a/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c b/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c index e91b59366030..c075d376fcab 100644 --- a/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c +++ b/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c @@ -1828,7 +1828,7 @@...
ee8b8f5d83eb2c9caaebcf633310905ee76856e9
Analyze and fix the following issue in the Linux kernel code: efi/libstub: Zero initialize heap allocated struct screen_info
Problem Details: After calling uefi interface allocate_pool to apply for memory, we should clear 0 to prevent the possibility of using random values. Signed-off-by: Qiang Ma <maqianga@uniontech.com> Cc: <stable@vger.kernel.org> # v6.6+ Fixes: 732ea9db9d8a ("efi: libstub: Move screen_info handling to common code") Sign...
```diff diff --git a/drivers/firmware/efi/libstub/screen_info.c b/drivers/firmware/efi/libstub/screen_info.c index a51ec201ca3c..5d3a1e32d177 100644 --- a/drivers/firmware/efi/libstub/screen_info.c +++ b/drivers/firmware/efi/libstub/screen_info.c @@ -32,6 +32,8 @@ struct screen_info *__alloc_screen_info(void) if (sta...
638f32604385fd23059985da8de918e9c18f0b98
Analyze and fix the following issue in the Linux kernel code: af_unix: Disable MSG_OOB handling for sockets in sockmap/sockhash
Problem Details: AF_UNIX socket tracks the most recent OOB packet (in its receive queue) with an `oob_skb` pointer. BPF redirecting does not account for that: when an OOB packet is moved between sockets, `oob_skb` is left outdated. This results in a single skb that may be accessed from two different sockets. Take the ...
```diff diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index b0a4c6d08e0a..0be0dcb07f7b 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -2721,10 +2721,49 @@ static struct sk_buff *manage_oob(struct sk_buff *skb, struct sock *sk, static int unix_stream_read_skb(struct sock *sk, skb_read_actor_t recv...
3c870059e9f8897c032f4256f90c41ee822218a8
Analyze and fix the following issue in the Linux kernel code: bpftool: Fix typo in usage help
Problem Details: The usage help for "bpftool prog help" contains a ° instead of the _ symbol for cgroup/sendmsg_unix. Fix the typo. Fixes: 8b3cba987e6d ("bpftool: Add support for cgroup unix socket address hooks") Signed-off-by: Donald Hunter <donald.hunter@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.n...
```diff diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c index 40ea743d139f..2ff949ea82fa 100644 --- a/tools/bpf/bpftool/prog.c +++ b/tools/bpf/bpftool/prog.c @@ -2489,7 +2489,7 @@ static int do_help(int argc, char **argv) " cgroup/connect_unix | cgroup/getpeername4 | cgroup/getpeerna...
189f1a976e426011e6a5588f1d3ceedf71fe2965
Analyze and fix the following issue in the Linux kernel code: libbpf: Fix no-args func prototype BTF dumping syntax
Problem Details: For all these years libbpf's BTF dumper has been emitting not strictly valid syntax for function prototypes that have no input arguments. Instead of `int (*blah)()` we should emit `int (*blah)(void)`. This is not normally a problem, but it manifests when we get kfuncs in vmlinux.h that have no input ...
```diff diff --git a/tools/lib/bpf/btf_dump.c b/tools/lib/bpf/btf_dump.c index 5dbca76b953f..894860111ddb 100644 --- a/tools/lib/bpf/btf_dump.c +++ b/tools/lib/bpf/btf_dump.c @@ -1559,10 +1559,12 @@ static void btf_dump_emit_type_chain(struct btf_dump *d, * Clang for BPF target generates func_proto with no * ...
92717bc077892d1ce60fee07aee3a33f33909b85
Analyze and fix the following issue in the Linux kernel code: perf dso: Fix build when libunwind is enabled
Problem Details: Now that symsrc_filename is always accessed through an accessor, we also need a free() function for it to avoid the following compilation error: util/unwind-libunwind-local.c:416:12: error: lvalue required as unary ‘&’ operand 416 | zfree(&dso__symsrc_filename(dso)); Fixes: 1553419c3c10 ...
```diff diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c index 2340c4f6d0c2..67414944f245 100644 --- a/tools/perf/util/dso.c +++ b/tools/perf/util/dso.c @@ -1501,7 +1501,7 @@ void dso__delete(struct dso *dso) auxtrace_cache__free(RC_CHK_ACCESS(dso)->auxtrace_cache); dso_cache__free(dso); dso__free_a2l(d...
452bca0edbd0764ca0284239d5438b3edd305ab3
Analyze and fix the following issue in the Linux kernel code: drm/xe: Don't suspend device upon wedge
Problem Details: When wedging a device we shouldn't be suspending device as state for debug will be lost. Also this appears to not work as the below stack trace pops upon trying to resume a wedged device: [ 304.245044] INFO: task cat:12115 blocked for more than 151 seconds. [ 304.251333] Tainted: G W ...
```diff diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c index 8b9c191940df..f51d456d15f7 100644 --- a/drivers/gpu/drm/xe/xe_device.c +++ b/drivers/gpu/drm/xe/xe_device.c @@ -895,6 +895,13 @@ u64 xe_device_uncanonicalize_addr(struct xe_device *xe, u64 address) return address & GENMASK_ULL(...
7dbe8af13c189f5937e87e9fb924d5bbc49e6f71
Analyze and fix the following issue in the Linux kernel code: drm/xe: Wedge the entire device
Problem Details: Wedge the entire device, not just GT which may have triggered the wedge. To implement this, cleanup the layering so xe_device_declare_wedged() calls into the lower layers (GT) to ensure entire device is wedged. While we are here, also signal any pending GT TLB invalidations upon wedging device. Lastl...
```diff diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c index 06cebaffb451..8b9c191940df 100644 --- a/drivers/gpu/drm/xe/xe_device.c +++ b/drivers/gpu/drm/xe/xe_device.c @@ -911,6 +911,9 @@ u64 xe_device_uncanonicalize_addr(struct xe_device *xe, u64 address) */ void xe_device_declare_wed...
e1ef78dce9b7b0fa7f9d88bb3554441d74d33b34
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: fexit_sleep: Fix stack allocation for arm64
Problem Details: On ARM64 the stack pointer should be aligned at a 16 byte boundary or the SPAlignmentFault can occur. The fexit_sleep selftest allocates the stack for the child process as a character array, this is not guaranteed to be aligned at 16 bytes. Because of the SPAlignmentFault, the child process is killed ...
```diff diff --git a/tools/testing/selftests/bpf/DENYLIST.aarch64 b/tools/testing/selftests/bpf/DENYLIST.aarch64 index 3c7c3e79aa93..901349da680f 100644 --- a/tools/testing/selftests/bpf/DENYLIST.aarch64 +++ b/tools/testing/selftests/bpf/DENYLIST.aarch64 @@ -1,6 +1,5 @@ bpf_cookie/multi_kprobe_attach_api ...
fada32ed6dbc748f447c8d050a961b75d946055a
Analyze and fix the following issue in the Linux kernel code: nfs: pass explicit offset/count to trace events
Problem Details: nfs_folio_length is unsafe to use without having the folio locked and a check for a NULL ->f_mapping that protects against truncations and can lead to kernel crashes. E.g. when running xfstests generic/065 with all nfs trace points enabled. Follow the model of the XFS trace points and pass in an expl...
```diff diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 0e2f87120cb8..9aa2ab218c0a 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -436,7 +436,7 @@ static void nfs_invalidate_folio(struct folio *folio, size_t offset, /* Cancel any unstarted writes on this page */ nfs_wb_folio_cancel(inode, folio); folio_wait_p...
0935ee6032dfe68bd1f8ddf4c43b618d7beafc69
Analyze and fix the following issue in the Linux kernel code: selftests: netfilter: add test case for recent mismatch bug
Problem Details: Without 'netfilter: nf_set_pipapo: fix initial map fill' this fails: TEST: reported issues Add two elements, flush, re-add 1s [ OK ] net,mac with reload 1s [ OK ] net,port,proto 1s ...
```diff diff --git a/tools/testing/selftests/net/netfilter/nft_concat_range.sh b/tools/testing/selftests/net/netfilter/nft_concat_range.sh index 6d66240e149c..47088b005390 100755 --- a/tools/testing/selftests/net/netfilter/nft_concat_range.sh +++ b/tools/testing/selftests/net/netfilter/nft_concat_range.sh @@ -27,7 +27,...
791a615b7ad2258c560f91852be54b0480837c93
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_set_pipapo: fix initial map fill
Problem Details: The initial buffer has to be inited to all-ones, but it must restrict it to the size of the first field, not the total field size. After each round in the map search step, the result and the fill map are swapped, so if we have a set where f->bsize of the first element is smaller than m->bsize_max, tho...
```diff diff --git a/net/netfilter/nft_set_pipapo.c b/net/netfilter/nft_set_pipapo.c index 15a236bebb46..eb4c4a4ac7ac 100644 --- a/net/netfilter/nft_set_pipapo.c +++ b/net/netfilter/nft_set_pipapo.c @@ -434,7 +434,7 @@ bool nft_pipapo_lookup(const struct net *net, const struct nft_set *set, res_map = scratch->map + ...
782161895eb4ac45cf7cfa8db375bd4766cb8299
Analyze and fix the following issue in the Linux kernel code: netfilter: ctnetlink: use helper function to calculate expect ID
Problem Details: Delete expectation path is missing a call to the nf_expect_get_id() helper function to calculate the expectation ID, otherwise LSB of the expectation object address is leaked to userspace. Fixes: 3c79107631db ("netfilter: ctnetlink: don't use conntrack/expect object addresses as id") Reported-by: zdi-...
```diff diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index 3b846cbdc050..4cbf71d0786b 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c @@ -3420,7 +3420,8 @@ static int ctnetlink_del_expect(struct sk_buff *skb, if (cda[CTA_EXPEC...
a19ce320c379e0519b68178c596e43d1d5dda03b
Analyze and fix the following issue in the Linux kernel code: power: sequencing: fix an invalid pointer dereference in error path
Problem Details: We may end up calling pwrseq_target_free() on a partially initialized target object whose unit is either NULL or an ERR_PTR(). Avoid dereferencing invalid memory by adding an appropriate check to pwrseq_target_free(). Fixes: 249ebf3f65f8 ("power: sequencing: implement the pwrseq core") Reported-by: Da...
```diff diff --git a/drivers/power/sequencing/core.c b/drivers/power/sequencing/core.c index 9c32b07a55e7..0ffc259c6bb6 100644 --- a/drivers/power/sequencing/core.c +++ b/drivers/power/sequencing/core.c @@ -212,7 +212,8 @@ pwrseq_target_new(const struct pwrseq_target_data *data) static void pwrseq_target_free(struct...
0e03c643dc9389e61fa484562dae58c8d6e96d63
Analyze and fix the following issue in the Linux kernel code: eth: fbnic: fix s390 build.
Problem Details: Building the fbnic nn s390, yield a build bug: In function ‘fbnic_config_drop_mode_rcq’, inlined from ‘fbnic_enable’ at drivers/net/ethernet/meta/fbnic/fbnic_txrx.c:1836:4: ././include/linux/compiler_types.h:510:45: error: call to ‘__compiletime_assert_919’ declared with attribute error: FIELD_PRE...
```diff diff --git a/drivers/net/ethernet/meta/Kconfig b/drivers/net/ethernet/meta/Kconfig index d8f5e9f9bb33..a9f078212c78 100644 --- a/drivers/net/ethernet/meta/Kconfig +++ b/drivers/net/ethernet/meta/Kconfig @@ -20,6 +20,7 @@ if NET_VENDOR_META config FBNIC tristate "Meta Platforms Host Network Interface" depen...
df39038cd89525d465c2c8827eb64116873f141a
Analyze and fix the following issue in the Linux kernel code: s390/mm: Fix VM_FAULT_HWPOISON handling in do_exception()
Problem Details: There is no support for HWPOISON, MEMORY_FAILURE, or ARCH_HAS_COPY_MC on s390. Therefore we do not expect to see VM_FAULT_HWPOISON in do_exception(). However, since commit af19487f00f3 ("mm: make PTE_MARKER_SWAPIN_ERROR more general"), it is possible to see VM_FAULT_HWPOISON in combination with PTE_MA...
```diff diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 6b19a33c49c2..8e149ef5e89b 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c @@ -433,12 +433,13 @@ error: handle_fault_error_nolock(regs, 0); else do_sigsegv(regs, SEGV_MAPERR); - } else if (fault & VM_FAULT_SIGBUS) { + } else ...
e1a261ba599eec97e1c5c7760d5c3698fc24e6a6
Analyze and fix the following issue in the Linux kernel code: printk: Add a short description string to kmsg_dump()
Problem Details: kmsg_dump doesn't forward the panic reason string to the kmsg_dumper callback. This patch adds a new struct kmsg_dump_detail, that will hold the reason and description, and pass it to the dump() callback. To avoid updating all kmsg_dump() call, it adds a kmsg_dump_desc() function and a macro for backw...
```diff diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c index e385d3164648..f9c6568a9137 100644 --- a/arch/powerpc/kernel/nvram_64.c +++ b/arch/powerpc/kernel/nvram_64.c @@ -73,7 +73,7 @@ static const char *nvram_os_partitions[] = { }; static void oops_to_nvram(struct kmsg_dumper *dumpe...
e14f480df7fbcb0c84ce9142c861701495d9b6e2
Analyze and fix the following issue in the Linux kernel code: vdpa/octeon_ep: Fix error code in octep_process_mbox()
Problem Details: Return -EINVAL for invalid signatures. Don't return success. Fixes: 8b6c724cdab8 ("virtio: vdpa: vDPA driver for Marvell OCTEON DPU devices") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Message-Id: <623e885b-1a05-479e-ab97-01bcf10bf5b8@stanley.mountain> Signed-off-by: Michael S. Tsirkin <...
```diff diff --git a/drivers/vdpa/octeon_ep/octep_vdpa_hw.c b/drivers/vdpa/octeon_ep/octep_vdpa_hw.c index 7fa0491bb201..11bd76ae18cf 100644 --- a/drivers/vdpa/octeon_ep/octep_vdpa_hw.c +++ b/drivers/vdpa/octeon_ep/octep_vdpa_hw.c @@ -140,7 +140,7 @@ static int octep_process_mbox(struct octep_hw *oct_hw, u16 id, u16 qi...
3bfd7c0ba184de99e9f5083b29e5308f30767265
Analyze and fix the following issue in the Linux kernel code: ALSA: seq: ump: Skip useless ports for static blocks
Problem Details: When the UMP Endpoint is configured with static blocks, the block configuration will never change, hence the unused ports will be unchanged as well. Creating sequencer ports for those unused ports is simply useless, and it might be rather confusing for users. The idea behind the inactive ports was for...
```diff diff --git a/sound/core/seq/seq_ump_client.c b/sound/core/seq/seq_ump_client.c index c627d72f7fe2..9cdfbeae3ed5 100644 --- a/sound/core/seq/seq_ump_client.c +++ b/sound/core/seq/seq_ump_client.c @@ -28,6 +28,7 @@ struct seq_ump_group { int group; /* group index (0-based) */ unsigned int dir_bits; /* dire...
88e98af9f4b5b0d60c1fe7f7f2701b5467691e75
Analyze and fix the following issue in the Linux kernel code: ALSA: pcm_dmaengine: Don't synchronize DMA channel when DMA is paused
Problem Details: When suspended, the DMA channel may enter PAUSE state if dmaengine_pause() is supported by DMA. At this state, dmaengine_synchronize() should not be called, otherwise the DMA channel can't be resumed successfully. Fixes: e8343410ddf0 ("ALSA: dmaengine: Synchronize dma channel after drop()") Signed-off...
```diff diff --git a/sound/core/pcm_dmaengine.c b/sound/core/pcm_dmaengine.c index b54336d4bffc..b134a51b3fd5 100644 --- a/sound/core/pcm_dmaengine.c +++ b/sound/core/pcm_dmaengine.c @@ -352,8 +352,12 @@ EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_open_request_chan); int snd_dmaengine_pcm_sync_stop(struct snd_pcm_substream *s...
a503f91a3645651a39baf97f1aed90d5d9f9bda9
Analyze and fix the following issue in the Linux kernel code: mtd: rawnand: lpx32xx: Fix dma_request_chan() error checks
Problem Details: The dma_request_chan() returns error pointer in case of error, while dma_request_channel() returns NULL in case of error therefore different error checks are needed for the two. Fixes: 7326d3fb1ee3 ("mtd: rawnand: lpx32xx: Request DMA channels using DT entries") Signed-off-by: Piotr Wojtaszczyk <piotr...
```diff diff --git a/drivers/mtd/nand/raw/lpc32xx_mlc.c b/drivers/mtd/nand/raw/lpc32xx_mlc.c index 92cebe871bb4..b9c3adc54c01 100644 --- a/drivers/mtd/nand/raw/lpc32xx_mlc.c +++ b/drivers/mtd/nand/raw/lpc32xx_mlc.c @@ -575,7 +575,7 @@ static int lpc32xx_dma_setup(struct lpc32xx_nand_host *host) dma_cap_mask_t mask; ...
d29e8e28d6d53b3406c214059b8e048fa950a136
Analyze and fix the following issue in the Linux kernel code: mtd: spinand: macronix: Add support for serial NAND flash
Problem Details: MX35{U,L}F{2,4}G24AD-Z4I8 are Macronix serial NAND flashes. Their main difference from MX35{U,L}F{2,4}G24AD lies in the plane number. The plane number for those with the postfix Z4I8 is 1. These flashes have been validated on Xilinx zynq-picozed board which include Macronix SPI Host. Signed-off-by: ...
```diff diff --git a/drivers/mtd/nand/spi/macronix.c b/drivers/mtd/nand/spi/macronix.c index aaf610f5d4a1..3f9e9c572854 100644 --- a/drivers/mtd/nand/spi/macronix.c +++ b/drivers/mtd/nand/spi/macronix.c @@ -158,6 +158,15 @@ static const struct spinand_info macronix_spinand_table[] = { &update_cache_variants...
e33df1c488d6e2b58064355651adb51901137036
Analyze and fix the following issue in the Linux kernel code: mtd: rawnand: intel: use 'time_left' variable with wait_for_completion_timeout()
Problem Details: There is a confusing pattern in the kernel to use a variable named 'timeout' to store the result of wait_for_completion_timeout() causing patterns like: timeout = wait_for_completion_timeout(...) if (!timeout) return -ETIMEDOUT; with all kinds of permutations. Use 'time_left' as a variable to make ...
```diff diff --git a/drivers/mtd/nand/raw/intel-nand-controller.c b/drivers/mtd/nand/raw/intel-nand-controller.c index f0ad2308f6d5..78174c463b36 100644 --- a/drivers/mtd/nand/raw/intel-nand-controller.c +++ b/drivers/mtd/nand/raw/intel-nand-controller.c @@ -295,7 +295,7 @@ static int ebu_dma_start(struct ebu_nand_cont...
d64270128bf551d68f47122c8893ea78bfbad8be
Analyze and fix the following issue in the Linux kernel code: wifi: rtw89: 8852bt: rfk: Fix spelling mistake "KIP_RESOTRE" -> "KIP_RESTORE"
Problem Details: There is a spelling mistake in a literal string. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20240710112253.228171-1-colin.i.king@gmail.com
```diff diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852bt_rfk.c b/drivers/net/wireless/realtek/rtw89/rtw8852bt_rfk.c index fa0e49d58112..5bdabb45e968 100644 --- a/drivers/net/wireless/realtek/rtw89/rtw8852bt_rfk.c +++ b/drivers/net/wireless/realtek/rtw89/rtw8852bt_rfk.c @@ -1863,7 +1863,7 @@ static void _dpk_on...
8fbcaa308591b91e9037ab6a8d733873b749a70d
Analyze and fix the following issue in the Linux kernel code: wifi: rtw88: Set efuse->ext_lna_5g - fix typo
Problem Details: efuse->ext_lna_2g is set twice and efuse->ext_lna_5g is not set at all. Set each one once. Nothing uses these members right now. They will be used by the RTL8821AU and RTL8812AU drivers. Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-b...
```diff diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c index 7ab7a988b123..9d9d33a4a503 100644 --- a/drivers/net/wireless/realtek/rtw88/main.c +++ b/drivers/net/wireless/realtek/rtw88/main.c @@ -2005,7 +2005,7 @@ static int rtw_chip_efuse_info_setup(struct rtw_dev *rt...
17e6a1213058d8759bcf043151c04612df55ebc4
Analyze and fix the following issue in the Linux kernel code: um: Use generic runtime constant implementation
Problem Details: UML should not be using the architecture native runtime constants, since that requires also having the appropriate instruction fixups (and all the linker script details). Not that using that code would be impossible, but it's not worth it. Just point UML at the generic version. Reported-by: Nathan Ch...
```diff diff --git a/arch/um/include/asm/Kbuild b/arch/um/include/asm/Kbuild index 6c583040537c..18f902da8e99 100644 --- a/arch/um/include/asm/Kbuild +++ b/arch/um/include/asm/Kbuild @@ -19,6 +19,7 @@ generic-y += param.h generic-y += parport.h generic-y += percpu.h generic-y += preempt.h +generic-y += runtime-const...
f8e52fb8c2b61baf0e376db4dc3347c326feb781
Analyze and fix the following issue in the Linux kernel code: docs/pinctrl: fix typo in mapping example
Problem Details: Small typo. The device name in the example should be "foo-i2c.0" and not "foo-i2c.o". Signed-off-by: Marc Ferland <marc.ferland@sonatest.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20240709183919.3337131-1-marc.ferland@sonatest.com
```diff diff --git a/Documentation/driver-api/pin-control.rst b/Documentation/driver-api/pin-control.rst index 4639912dc9cc..27ea1236307e 100644 --- a/Documentation/driver-api/pin-control.rst +++ b/Documentation/driver-api/pin-control.rst @@ -1002,7 +1002,7 @@ it even more compact which assumes you want to use pinctrl-...
f4854bf741c4cdb8f8cdefbf533f9b8dfd43f041
Analyze and fix the following issue in the Linux kernel code: KVM: x86: Replace static_call_cond() with static_call()
Problem Details: The use of static_call_cond() is essentially the same as static_call() on x86 (e.g. static_call() now handles a NULL pointer as a NOP), so replace it with static_call() to simplify the code. Link: https://lore.kernel.org/all/3916caa1dcd114301a49beafa5030eca396745c1.1679456900.git.jpoimboe@kernel.org/ ...
```diff diff --git a/arch/x86/include/asm/kvm-x86-ops.h b/arch/x86/include/asm/kvm-x86-ops.h index 26e73d046569..68ad4f923664 100644 --- a/arch/x86/include/asm/kvm-x86-ops.h +++ b/arch/x86/include/asm/kvm-x86-ops.h @@ -9,8 +9,7 @@ BUILD_BUG_ON(1) * "static_call_update()" calls. * * KVM_X86_OP_OPTIONAL() can be us...
8fe76a1c2264a02155895cda9f97a6a5a9b97d91
Analyze and fix the following issue in the Linux kernel code: sh: push-switch: Add missing MODULE_DESCRIPTION() macro
Problem Details: Fixes the following warning when building allmodconfig with W=1 C=1: WARNING: modpost: missing MODULE_DESCRIPTION() in arch/sh/drivers/push-switch.o Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Link: https://lore.kernel....
```diff diff --git a/arch/sh/drivers/push-switch.c b/arch/sh/drivers/push-switch.c index 362e4860bf52..1dea43381b5a 100644 --- a/arch/sh/drivers/push-switch.c +++ b/arch/sh/drivers/push-switch.c @@ -131,4 +131,5 @@ module_exit(switch_exit); MODULE_VERSION(DRV_VERSION); MODULE_AUTHOR("Paul Mundt"); +MODULE_DESCRIPTI...
4b0eb9ce15912ec303cc515888691b6ec6c32196
Analyze and fix the following issue in the Linux kernel code: Documentation/amdgpu: Fix duplicate declaration
Problem Details: Address the below kernel doc warning: Documentation/gpu/amdgpu/display/display-manager:134: drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h:3: WARNING: Duplicate C declaration, also defined at gpu/amdgpu/display/dcn-blocks:101. Declaration is '.. c:struct:: mpcc_blnd_cfg'. Documentation/gpu/amdgpu/display...
```diff diff --git a/Documentation/gpu/amdgpu/display/dcn-blocks.rst b/Documentation/gpu/amdgpu/display/dcn-blocks.rst index f80df596ef5c..5e34366f6dbe 100644 --- a/Documentation/gpu/amdgpu/display/dcn-blocks.rst +++ b/Documentation/gpu/amdgpu/display/dcn-blocks.rst @@ -34,6 +34,7 @@ MPC .. kernel-doc:: drivers/gpu/...
d938ec1a12a22a4eedff319aa41cba48e9c5e544
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Add simple struct doc to remove doc build warning
Problem Details: This commit is a part of a series that addresses the following build warning for opp: ./drivers/gpu/drm/amd/display/dc/inc/hw/opp.h:1: warning: no structured comments found ./drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h:1: warning: no structured comments found This commit fixes this issue by adding a ...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h b/drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h index 9ac7fc717a92..0150f2581ee4 100644 --- a/drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h +++ b/drivers/gpu/drm/amd/display/dc/inc/hw/dpp.h @@ -147,16 +147,28 @@ struct cnv_color_keyer_params { int color_key...
9947dbf984dd79d644a5468a47a76d9fef9f0884
Analyze and fix the following issue in the Linux kernel code: Documentation/gpu: Remove ':export:' option from DCN documentation
Problem Details: This commit reduces, but does not fix, all the occurrences and some of the documentation warnings related to the 'no structured comments.' This was caused by the wrong use of the ':export:' option in the DCN kernel-doc, so this commit drops the usage of those options. Acked-by: Alex Deucher <alexander...
```diff diff --git a/Documentation/gpu/amdgpu/display/dcn-blocks.rst b/Documentation/gpu/amdgpu/display/dcn-blocks.rst index 118aeb9fd2b4..582a5fee7f29 100644 --- a/Documentation/gpu/amdgpu/display/dcn-blocks.rst +++ b/Documentation/gpu/amdgpu/display/dcn-blocks.rst @@ -11,9 +11,6 @@ DCHUBBUB .. kernel-doc:: drivers/g...
6e169c7e0f842c48c7bf683fb789dbf5a8b1dfd8
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Add doc entry for program_3dlut_size
Problem Details: Fixes the warning: Function parameter or struct member 'program_3dlut_size' not described in 'mpc_funcs' Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Closes: https://lore.kernel.org/dri-devel/20240715090445.7e9387ec@canb.auug.org.au/ Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Si...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h b/drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h index 40a9b3471208..3a89cc0cffc1 100644 --- a/drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h +++ b/drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h @@ -1039,6 +1039,20 @@ struct mpc_funcs { */ void (*program_lut_m...
ecfa23c8df7ef3ea2a429dfe039341bf792e95b4
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu/vcn: identify unified queue in sw init
Problem Details: Determine whether VCN using unified queue in sw_init, instead of calling functions later on. v2: fix coding style Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Signed-off-by: Alex Deucher <alexand...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c index 8d65b096db90..69b2c2503d55 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c @@ -147,6 +147,10 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev) } } + ...
77ae5e5b00720372af2860efdc4bc652ac682696
Analyze and fix the following issue in the Linux kernel code: eth: fbnic: Fix spelling mistake "tiggerring" -> "triggering"
Problem Details: There is a spelling mistake in a netdev_warn message. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://patch.msgid.link/20240716093851.1003131-1-colin.i.king@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
```diff diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c index b1a471fac4fe..0ed4c9fff5d8 100644 --- a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c +++ b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c @@ -1499,7 +1499,7 @@ void fbnic_disable(struct fbnic_net *fbn) ...
b49991d83bba4ae77a560c5f021932e8290bd022
Analyze and fix the following issue in the Linux kernel code: wifi: ath12k: fix build vs old compiler
Problem Details: gcc 11.4.1-3 warns about memcpy() with overlapping pointers: drivers/net/wireless/ath/ath12k/wow.c: In function ‘ath12k_wow_convert_8023_to_80211.constprop’: ./include/linux/fortify-string.h:114:33: error: ‘__builtin_memcpy’ accessing 18446744073709551611 or more bytes at offsets 0 and 0 overlaps 9223...
```diff diff --git a/drivers/net/wireless/ath/ath12k/wow.c b/drivers/net/wireless/ath/ath12k/wow.c index c5cba825a84a..bead19db2c9a 100644 --- a/drivers/net/wireless/ath/ath12k/wow.c +++ b/drivers/net/wireless/ath/ath12k/wow.c @@ -186,7 +186,7 @@ ath12k_wow_convert_8023_to_80211(struct ath12k *ar, if (eth_pkt_ofs < E...
eeb1f825b5dc68047a0556e5ae86d1467920db41
Analyze and fix the following issue in the Linux kernel code: drm/gpuvm: fix missing dependency to DRM_EXEC
Problem Details: In commit 50c1a36f594b ("drm/gpuvm: track/lock/validate external/evicted objects") we started using drm_exec, but did not select DRM_EXEC in the Kconfig for DRM_GPUVM, fix this. Cc: Christian König <christian.koenig@amd.com> Cc: Boris Brezillon <boris.brezillon@collabora.com> Cc: Thomas Hellström <tho...
```diff diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index d0aa277fc3bf..d08d79bbb0f6 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -254,6 +254,7 @@ config DRM_EXEC config DRM_GPUVM tristate depends on DRM + select DRM_EXEC help GPU-VM representation providing helper...
2a1fc7dc36260fbe74b6ca29dc6d9088194a2115
Analyze and fix the following issue in the Linux kernel code: KVM: x86: Suppress MMIO that is triggered during task switch emulation
Problem Details: Explicitly suppress userspace emulated MMIO exits that are triggered when emulating a task switch as KVM doesn't support userspace MMIO during complex (multi-step) emulation. Silently ignoring the exit request can result in the WARN_ON_ONCE(vcpu->mmio_needed) firing if KVM exits to userspace for some ...
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index caf528bb775b..6c07f7ff0eff 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -11800,7 +11800,13 @@ int kvm_task_switch(struct kvm_vcpu *vcpu, u16 tss_selector, int idt_index, ret = emulator_task_switch(ctxt, tss_selector, idt_index, reason...
3d4415ed75a57fc96ea203a9832e3c5ac5982719
Analyze and fix the following issue in the Linux kernel code: KVM: x86/mmu: Bug the VM if KVM tries to split a !hugepage SPTE
Problem Details: Bug the VM instead of simply warning if KVM tries to split a SPTE that is non-present or not-huge. KVM is guaranteed to end up in a broken state as the callers fully expect a valid SPTE, e.g. the shadow MMU will add an rmap entry, and all MMUs will account the expected small page. Returning '0' is al...
```diff diff --git a/arch/x86/kvm/mmu/spte.c b/arch/x86/kvm/mmu/spte.c index 8275b96b6596..b15ce06edb46 100644 --- a/arch/x86/kvm/mmu/spte.c +++ b/arch/x86/kvm/mmu/spte.c @@ -296,11 +296,7 @@ u64 make_huge_page_split_spte(struct kvm *kvm, u64 huge_spte, union kvm_mmu_page { u64 child_spte; - if (WARN_ON_ONCE(!is_s...
6f6a23d42bdfbbfe1b41a23e2c78319a0cc65db3
Analyze and fix the following issue in the Linux kernel code: ASoC: Intel: Fix RT5650 SSP lookup
Problem Details: Commit 8efcd4864652 ("ASoC: Intel: sof_rt5682: use common module for sof_card_private initialization") migrated the pin assignment in the context struct up to soc-acpi-intel-ssp-common.c. This uses a lookup table to see if a device has a amp/codec before assigning the pin. The issue here arises when co...
```diff diff --git a/sound/soc/intel/common/soc-acpi-intel-ssp-common.c b/sound/soc/intel/common/soc-acpi-intel-ssp-common.c index 75d0b931d895..de7a3f7f47f1 100644 --- a/sound/soc/intel/common/soc-acpi-intel-ssp-common.c +++ b/sound/soc/intel/common/soc-acpi-intel-ssp-common.c @@ -64,6 +64,15 @@ static const struct co...
9ee3f0d8c9999eb1ef2866e86f8d57d996fc0348
Analyze and fix the following issue in the Linux kernel code: ASOC: SOF: Intel: hda-loader: only wait for HDaudio IOC for IPC4 devices
Problem Details: Multiple users report a regression bisected to commit d5263dbbd8af ("ASoC: SOF: Intel: don't ignore IOC interrupts for non-audio transfers"). The firmware version is the likely suspect, as these users relied on SOF 2.0 while Intel only tested with the 2.2 release. Rather than completely disable the wa...
```diff diff --git a/sound/soc/sof/intel/hda-loader.c b/sound/soc/sof/intel/hda-loader.c index b8b914eaf7e0..75f6240cf3e1 100644 --- a/sound/soc/sof/intel/hda-loader.c +++ b/sound/soc/sof/intel/hda-loader.c @@ -310,15 +310,19 @@ int hda_cl_copy_fw(struct snd_sof_dev *sdev, struct hdac_ext_stream *hext_stream return ...
7dc357d343f134bf59815ff6098b93503ec8a23b
Analyze and fix the following issue in the Linux kernel code: tpm: Use auth only after NULL check in tpm_buf_check_hmac_response()
Problem Details: Dereference auth after NULL check in tpm_buf_check_hmac_response(). Otherwise, unless tpm2_sessions_init() was called, a call can cause NULL dereference, when TCG_TPM2_HMAC is enabled. [jarkko: adjusted the commit message.] Cc: stable@vger.kernel.org # v6.10+ Fixes: 7ca110f2679b ("tpm: Address !chip->...
```diff diff --git a/drivers/char/tpm/tpm2-sessions.c b/drivers/char/tpm/tpm2-sessions.c index 2281d55df545..d3521aadd43e 100644 --- a/drivers/char/tpm/tpm2-sessions.c +++ b/drivers/char/tpm/tpm2-sessions.c @@ -746,15 +746,16 @@ int tpm_buf_check_hmac_response(struct tpm_chip *chip, struct tpm_buf *buf, struct tpm2_a...
3f45181358e4df50a40ea1bb51b00a1f295f915e
Analyze and fix the following issue in the Linux kernel code: tcp: Don't access uninit tcp_rsk(req)->ao_keyid in tcp_create_openreq_child().
Problem Details: syzkaller reported KMSAN splat in tcp_create_openreq_child(). [0] The uninit variable is tcp_rsk(req)->ao_keyid. tcp_rsk(req)->ao_keyid is initialised only when tcp_conn_request() finds a valid TCP AO option in SYN. Then, tcp_rsk(req)->used_tcp_ao is set accordingly. Let's not read tcp_rsk(req)->ao...
```diff diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index bc67f6b9efae..a19a9dbd3409 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c @@ -514,9 +514,6 @@ struct sock *tcp_create_openreq_child(const struct sock *sk, const struct tcp_sock *oldtp; struct tcp_sock *newtp; u32 ...
d8b17a364ec48239fccb65efe74bb485e79e6743
Analyze and fix the following issue in the Linux kernel code: platform/x86: asus-wmi: fix TUF laptop RGB variant
Problem Details: In kbd_rgb_mode_store the dev_get_drvdata() call was assuming the device data was asus_wmi when it was actually led_classdev. This patch corrects this by making the correct chain of calls to get the asus_wmi driver data. Fixes: ae834a549ec1 ("platform/x86: asus-wmi: add support variant of TUF RGB") T...
```diff diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c index 26c45fd093a0..cc735931f97b 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -880,10 +880,14 @@ static ssize_t kbd_rgb_mode_store(struct device *dev, struct device_attribute *attr, ...
182c6941c55347c735e70ffca77741cd000cbec7
Analyze and fix the following issue in the Linux kernel code: platform/x86/intel/tpmi/plr: Fix output in plr_print_bits()
Problem Details: Smatch complains that 'str' can be used without being initialized: drivers/platform/x86/intel/intel_plr_tpmi.c:178 plr_print_bits() error: uninitialized symbol 'str'. In this loop, we iterate over all the set bits and print the name of the bit. The intention is that if there is a bit which i...
```diff diff --git a/drivers/platform/x86/intel/intel_plr_tpmi.c b/drivers/platform/x86/intel/intel_plr_tpmi.c index c1aa52c23d25..69ace6a629bc 100644 --- a/drivers/platform/x86/intel/intel_plr_tpmi.c +++ b/drivers/platform/x86/intel/intel_plr_tpmi.c @@ -162,10 +162,11 @@ static int plr_clear_cpu_status(struct tpmi_plr...
509580fad7323b6a5da27e8365cd488f3b57210e
Analyze and fix the following issue in the Linux kernel code: drm/i915/dp: Don't switch the LTTPR mode on an active link
Problem Details: Switching to transparent mode leads to a loss of link synchronization, so prevent doing this on an active link. This happened at least on an Intel N100 system / DELL UD22 dock, the LTTPR residing either on the host or the dock. To fix the issue, keep the current mode on an active link, adjusting the LT...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.c b/drivers/gpu/drm/i915/display/intel_dp_link_training.c index 1bc4ef84ff3b..d044c8e36bb3 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c +++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c @@ -117,10 +117,24 @@ intel_d...
8bfd6f0923cd7e48aa5d9e5a4e20af818a32c30a
Analyze and fix the following issue in the Linux kernel code: kconfig: call expr_eliminate_yn() at least once in expr_eliminate_dups()
Problem Details: Kconfig simplifies expressions, but redundant '&&' and '||' operators involving constant symbols 'y' and 'n' are sometimes trimmed and sometimes not. [Test Code] config DEP def_bool y config A bool "A" depends on DEP && y config B bool "B"...
```diff diff --git a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c index 6d4b5a5a1e62..b2dfd3123a5d 100644 --- a/scripts/kconfig/expr.c +++ b/scripts/kconfig/expr.c @@ -637,7 +637,7 @@ struct expr *expr_eliminate_dups(struct expr *e) return e; oldcount = trans_count; - while (1) { + do { trans_count = 0; ...
3914cdde89c29b681e73e507a04ca50f147482a3
Analyze and fix the following issue in the Linux kernel code: modpost: remove self-definitions of R_ARM_* macros
Problem Details: Commit f5983dab0ead ("modpost: define more R_ARM_* for old distributions") added self-definitions for the R_ARM_* macros to fix build errors on CentOS 7. RHEL/CentOS 7 were retired at the end of June. Remove all the R_ARM_* definitions (except for R_ARM_THM_CALL), which should be available in recent ...
```diff diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 11731fc62140..e9aae1b7ff77 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1168,39 +1168,9 @@ static Elf_Addr addend_386_rel(uint32_t *location, unsigned int r_type) return (Elf_Addr)(-1); } -#ifndef R_ARM_CALL -#define R_A...
712aba5543b88996bc4682086471076fbf048927
Analyze and fix the following issue in the Linux kernel code: kbuild: avoid build error when single DTB is turned into composite DTB
Problem Details: As commit afa974b77128 ("kbuild: add real-prereqs shorthand for $(filter-out FORCE,$^)") explained, $(real-prereqs) is not just a list of objects when linking a multi-object module. If a single-object module is turned into a multi-object module, $^ (and therefore $(real-prereqs) as well) contains heade...
```diff diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index d78b5d38beaa..636119dc4403 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -407,8 +407,12 @@ cmd_dtc = $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; -d $(depfile).dtc.tmp $(dtc-tmp) ; \ cat $(depfile).pr...
2f99ffd8d730caddadb5e0257ff8c3faf16c6ee6
Analyze and fix the following issue in the Linux kernel code: Input: bbnsm_pwrkey - fix missed key press after suspend
Problem Details: Report input event directly on wakeup to ensure no press event is missed when resuming from suspend. Signed-off-by: Jacky Bai <ping.bai@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Acked-by: Jason Liu <jason.hui.liu@nxp.com> Signed-off-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org...
```diff diff --git a/drivers/input/misc/nxp-bbnsm-pwrkey.c b/drivers/input/misc/nxp-bbnsm-pwrkey.c index 1d99206dd3a8..eb4173f9c820 100644 --- a/drivers/input/misc/nxp-bbnsm-pwrkey.c +++ b/drivers/input/misc/nxp-bbnsm-pwrkey.c @@ -38,6 +38,7 @@ struct bbnsm_pwrkey { int irq; int keycode; int keystate; /* 1:press...
3911af778f208e5f49d43ce739332b91e26bc48e
Analyze and fix the following issue in the Linux kernel code: scsi: ufs: core: Fix deadlock during RTC update
Problem Details: There is a deadlock when runtime suspend waits for the flush of RTC work, and the RTC work calls ufshcd_rpm_get_sync() to wait for runtime resume. Here is deadlock backtrace: kworker/0:1 D 4892.876354 10 10971 4859 0x4208060 0x8 10 0 120 670730152367 ptr f0ffff80c2e40000 0 1 0x00000001...
```diff diff --git a/drivers/ufs/core/ufshcd-priv.h b/drivers/ufs/core/ufshcd-priv.h index ce36154ce963..7aea8fbaeee8 100644 --- a/drivers/ufs/core/ufshcd-priv.h +++ b/drivers/ufs/core/ufshcd-priv.h @@ -316,6 +316,11 @@ static inline int ufshcd_rpm_get_sync(struct ufs_hba *hba) return pm_runtime_get_sync(&hba->ufs_de...
aa8684755a283536bd8ad93141052f47a4faa5a3
Analyze and fix the following issue in the Linux kernel code: workqueue: Remove unneeded lockdep_assert_cpus_held()
Problem Details: The commit 19af45757383 ("workqueue: Remove cpus_read_lock() from apply_wqattrs_lock()") removes the unneed cpus_read_lock() after the pwq creations and installations have been reworked based on wq_online_cpumask rather than cpu_online_mask making cpus_read_lock() is unneeded during wqattrs changes. B...
```diff diff --git a/kernel/workqueue.c b/kernel/workqueue.c index dfd42c28e404..1745ca788ede 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -5342,8 +5342,6 @@ static int apply_workqueue_attrs_locked(struct workqueue_struct *wq, * * Performs GFP_KERNEL allocations. * - * Assumes caller has CPU hotplu...
7df0be6e6280c6fca01d039864bb123e5e36604b
Analyze and fix the following issue in the Linux kernel code: drm/i915/gt: Do not consider preemption during execlists_dequeue for gen8
Problem Details: We're seeing a GPU hang issue on a CHV platform, which was caused by commit bac24f59f454 ("drm/i915/execlists: Enable coarse preemption boundaries for Gen8"). The Gen8 platform only supports timeslicing and doesn't have a preemption mechanism, as its engines do not have a preemption timer. Commit 751...
```diff diff --git a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c index 21829439e686..72090f52fb85 100644 --- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c +++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c @@ -3315,11 +3315,7 @@ static voi...
7bbae44cf1bda02537a84cd8ad75bd81694acfc7
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: fix doc entry for bb_from_dmub
Problem Details: Fixes the warning: Function parameter or struct member 'bb_from_dmub' not described in 'amdgpu_display_manager' Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deu...
```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 5fd1b6b44577..369159c29bbe 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h @@ -587,7 +587,9 @@ struct amdgpu_display_man...
28814be8823002eca06d857d4bce70eb4c6fccd3
Analyze and fix the following issue in the Linux kernel code: drm/amd: Bump KMS_DRIVER_MINOR version
Problem Details: Increase the KMS minor version to indicate GFX12 DCC support since this contains a major change in how DCC is managed across IPs like GFX, DCN etc. This will be used mainly by userspace like Mesa to figure out DCC support on GFX12 hardware. v2: fix version number (Alex) Signed-off-by: Aurabindo Pilla...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 78089f2f79f5..094498a0964b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -116,9 +116,10 @@ * - 3.55.0 - Add AMDGPU_INFO_GPUVM_FAULT query * - 3.56.0 - ...
92fc2c469eb26060384e9b2cd4cb0cc228aba582
Analyze and fix the following issue in the Linux kernel code: nvme-pci: Fix the instructions for disabling power management
Problem Details: pcie_aspm=off tells the kernel not to modify the ASPM configuration. This setting does not guarantee that ASPM (Active State Power Management) is disabled. Hence add pcie_port_pm=off. This disables power management for all PCIe ports. This patch has been tested on a workstation with a Samsung SSD 970 ...
```diff diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index bc24a85e96ce..8087b054da66 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -1309,7 +1309,7 @@ static void nvme_warn_reset(struct nvme_dev *dev, u32 csts) dev_warn(dev->ctrl.device, "Does your device have a faulty po...
b96c312551b241bc17226c5347c6d6b38a1efd3e
Analyze and fix the following issue in the Linux kernel code: ring-buffer: Use vma_pages() helper function
Problem Details: Use the vma_pages() helper function and fix the following Coccinelle/coccicheck warning reported by vma_pages.cocci: WARNING: Consider using vma_pages helper on vma Rename the local variable vma_pages accordingly. Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com> Link: https://lore.kernel.or...
```diff diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index f3d772461a60..d59cf0023e38 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -6920,7 +6920,7 @@ static int __rb_inc_dec_mapped(struct ring_buffer_per_cpu *cpu_buffer, static int __rb_map_vma(struct ring_buffer_...
7dc836187f7c6f70a82b4521503e9f9f96194581
Analyze and fix the following issue in the Linux kernel code: trace/pid_list: Change gfp flags in pid_list_fill_irq()
Problem Details: pid_list_fill_irq() runs via irq_work. When CONFIG_PREEMPT_RT is disabled, it would run in irq_context. so it shouldn't sleep while memory allocation. Change gfp flags from GFP_KERNEL to GFP_NOWAIT to prevent sleep in irq_work. This change wouldn't impact functionality in practice because the worst-s...
```diff diff --git a/kernel/trace/pid_list.c b/kernel/trace/pid_list.c index 19b271a12c99..4966e6bbdf6f 100644 --- a/kernel/trace/pid_list.c +++ b/kernel/trace/pid_list.c @@ -354,7 +354,7 @@ static void pid_list_refill_irq(struct irq_work *iwork) while (upper_count-- > 0) { union upper_chunk *chunk; - chunk = k...
94dfa500e7deddceff22768bb994f0fa67bd2fd0
Analyze and fix the following issue in the Linux kernel code: tracing: Fix NULL vs IS_ERR() check in enable_instances()
Problem Details: The trace_array_create_systems() function returns error pointers, not NULL. Fix the check to match. Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Fixes: e645535a954a ("tracing: Add option to use memmapped memory for trace boot instance") Link: https...
```diff diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 71cca10581d6..5462fb10ff64 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -10507,7 +10507,7 @@ __init static void enable_instances(void) } tr = trace_array_create_systems(name, NULL, addr, size); - if (!tr) { + if (IS_ERR(...
9cf71eb0faef4bff01df4264841b8465382d7927
Analyze and fix the following issue in the Linux kernel code: spi: microchip-core: ensure TX and RX FIFOs are empty at start of a transfer
Problem Details: While transmitting with rx_len == 0, the RX FIFO is not going to be emptied in the interrupt handler. A subsequent transfer could then read crap from the previous transfer out of the RX FIFO into the start RX buffer. The core provides a register that will empty the RX and TX FIFOs, so do that before ea...
```diff diff --git a/drivers/spi/spi-microchip-core.c b/drivers/spi/spi-microchip-core.c index aa72b9dd8956..057092506bd5 100644 --- a/drivers/spi/spi-microchip-core.c +++ b/drivers/spi/spi-microchip-core.c @@ -91,6 +91,8 @@ #define REG_CONTROL2 (0x28) #define REG_COMMAND (0x2c) #define COMMAND_CLRFRAMECNT BIT(4)...
3a5e76283672efddf47cea39ccfe9f5735cc91d5
Analyze and fix the following issue in the Linux kernel code: spi: microchip-core: fix init function not setting the master and motorola modes
Problem Details: mchp_corespi_init() reads the CONTROL register, sets the master and motorola bits, but doesn't write the value back to the register. The function also doesn't ensure the controller is disabled at the start, which may present a problem if the controller was used by an earlier boot stage as some settings...
```diff diff --git a/drivers/spi/spi-microchip-core.c b/drivers/spi/spi-microchip-core.c index c69d45e5bff2..aa72b9dd8956 100644 --- a/drivers/spi/spi-microchip-core.c +++ b/drivers/spi/spi-microchip-core.c @@ -295,17 +295,13 @@ static void mchp_corespi_init(struct spi_controller *host, struct mchp_corespi * unsigned...