id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
735ee8582da3d239eb0c7a53adca61b79fb228b3
Analyze and fix the following issue in the Linux kernel code: netfilter: xt_tcpmss: check remaining length before reading optlen
Problem Details: Quoting reporter: In net/netfilter/xt_tcpmss.c (lines 53-68), the TCP option parser reads op[i+1] directly without validating the remaining option length. If the last byte of the option field is not EOL/NOP (0/1), the code attempts to index op[i+1]. In the case where i + 1 == optlen, this cause...
```diff diff --git a/net/netfilter/xt_tcpmss.c b/net/netfilter/xt_tcpmss.c index 37704ab01799..0d32d4841cb3 100644 --- a/net/netfilter/xt_tcpmss.c +++ b/net/netfilter/xt_tcpmss.c @@ -61,7 +61,7 @@ tcpmss_mt(const struct sk_buff *skb, struct xt_action_param *par) return (mssval >= info->mss_min && mssval <= inf...
de8a70cefcb26cdceaafdc5ac144712681419c29
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_conncount: fix tracking of connections from localhost
Problem Details: Since commit be102eb6a0e7 ("netfilter: nf_conncount: rework API to use sk_buff directly"), we skip the adding and trigger a GC when the ct is confirmed. For connections originated from local to local it doesn't work because the connection is confirmed on POSTROUTING, therefore tracking on the INPUT hoo...
```diff diff --git a/net/netfilter/nf_conncount.c b/net/netfilter/nf_conncount.c index 288936f5c1bf..14e62b3263cd 100644 --- a/net/netfilter/nf_conncount.c +++ b/net/netfilter/nf_conncount.c @@ -179,14 +179,25 @@ static int __nf_conncount_add(struct net *net, return -ENOENT; if (ct && nf_ct_is_confirmed(ct)) { -...
cda26c645946b08f070f20c166d4736767e4a805
Analyze and fix the following issue in the Linux kernel code: netfilter: nft_compat: add more restrictions on netlink attributes
Problem Details: As far as I can see nothing bad can happen when NFTA_TARGET/MATCH_NAME are too large because this calls x_tables helpers which check for the length, but it seems better to already reject it during netlink parsing. Rest of the changes avoid silent u8/u16 truncations. For _TYPE, its expected to be only...
```diff diff --git a/net/netfilter/nft_compat.c b/net/netfilter/nft_compat.c index 72711d62fddf..08f620311b03 100644 --- a/net/netfilter/nft_compat.c +++ b/net/netfilter/nft_compat.c @@ -134,7 +134,8 @@ static void nft_target_eval_bridge(const struct nft_expr *expr, } static const struct nla_policy nft_target_polic...
21d033e472735ecec677f1ae46d6740b5e47a4f3
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_conncount: increase the connection clean up limit to 64
Problem Details: After the optimization to only perform one GC per jiffy, a new problem was introduced. If more than 8 new connections are tracked per jiffy the list won't be cleaned up fast enough possibly reaching the limit wrongly. In order to prevent this issue, only skip the GC if it was already triggered during ...
```diff diff --git a/include/net/netfilter/nf_conntrack_count.h b/include/net/netfilter/nf_conntrack_count.h index 52a06de41aa0..cf0166520cf3 100644 --- a/include/net/netfilter/nf_conntrack_count.h +++ b/include/net/netfilter/nf_conntrack_count.h @@ -13,6 +13,7 @@ struct nf_conncount_list { u32 last_gc; /* jiffies a...
6f93616a7323d646d18db9c09f147e453b40fdd7
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_tables: reset table validation state on abort
Problem Details: If a transaction fails the final validation in the commit hook, the table validation state is changed to NFT_VALIDATE_DO and a replay of the batch is performed. Every rule insert will then do a graph validation. This is much slower, but provides better error reporting to the user because we can point...
```diff diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index 729a92781a1a..027bab30c238 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -11536,6 +11536,13 @@ static int nf_tables_abort(struct net *net, struct sk_buff *skb, ret = __nf_tables_abort(net, acti...
9adfb1ba701494aea216ee5c45ed9a1929398102
Analyze and fix the following issue in the Linux kernel code: media: iris: Change psc properties message to debug level
Problem Details: The message for attempting to set already configured input or output parameter subscribe change properties is not an error condition. Move it from error to debug level and make it more descriptive by indicating which specific input or output psc was already set. Signed-off-by: Vishnu Reddy <busanna.re...
```diff diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c b/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c index df31f452b69b..5db00f8a5e06 100644 --- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c @@ -813,7 +813,7 ...
3f9b5c1ccd4484086b5ad51ed05c5d94ecaab7d3
Analyze and fix the following issue in the Linux kernel code: media: iris: Document difference in size during allocation
Problem Details: As we get ready for kzalloc checking for invalid sizes, let's add documentation for the cases where the size is different but valid. This patch fixes this cocci warning: ./platform/qcom/iris/iris_hfi_gen2_command.c:1215:9-25: WARNING: casting value returned by memory allocation function to (struct iri...
```diff diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c b/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c index c75c8b9398a2..df31f452b69b 100644 --- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c @@ -1296,5 +1296,...
4b11f2336e23d5c55b76591bd8ac39b059f68ad0
Analyze and fix the following issue in the Linux kernel code: platform/x86: acer-wmi: Fix missing capability check
Problem Details: During the rework of the fan behavior control code in commit d8e8362b09d3 ("platform/x86: acer-wmi: Fix setting of fan behavior"), acer_toggle_turbo() was changed to use WMID_gaming_set_fan_behavior() instead of WMID_gaming_set_u64() when switching the fans to turbo mode. The new function however does ...
```diff diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index 54ca3edf532a..e0eaaefb13d0 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -2070,7 +2070,8 @@ static int acer_toggle_turbo(void) WMID_gaming_set_u64(0x1, ACER_CAP_TURBO_LED); /* Set...
01f31c2fffae7550ec3bd392256b2566f9233834
Analyze and fix the following issue in the Linux kernel code: platform/x86: asus-armoury: keep the list ordered alphabetically
Problem Details: Model GA403WM appears after GA403WR breaking the alphabetical order: swap theirs position. Fixes: f5fc40734b0f ("platform/x86: asus-armoury: add support for GA403WM") Signed-off-by: Denis Benato <denis.benato@linux.dev> Link: https://patch.msgid.link/20260116180637.859803-4-denis.benato@linux.dev Revi...
```diff diff --git a/drivers/platform/x86/asus-armoury.h b/drivers/platform/x86/asus-armoury.h index 3efb4b4d0d22..c67942010869 100644 --- a/drivers/platform/x86/asus-armoury.h +++ b/drivers/platform/x86/asus-armoury.h @@ -957,7 +957,7 @@ static const struct dmi_system_id power_limits[] = { }, { .matches = { - ...
43098a53939e98e6c8191db4bac3c7ef9eed503c
Analyze and fix the following issue in the Linux kernel code: platform/x86: asus-armoury: fix ppt data for FA608UM
Problem Details: ppt_pl3_fppt_def and ppt_pl3_fppt_max are wrong: correct it. Fixes: a22d893f490d ("platform/x86: asus-armoury: add support for FA608UM") Signed-off-by: Denis Benato <denis.benato@linux.dev> Link: https://patch.msgid.link/20260116180637.859803-2-denis.benato@linux.dev Reviewed-by: Ilpo Järvinen <ilpo.j...
```diff diff --git a/drivers/platform/x86/asus-armoury.h b/drivers/platform/x86/asus-armoury.h index 0063c64a7860..710eef74cdb7 100644 --- a/drivers/platform/x86/asus-armoury.h +++ b/drivers/platform/x86/asus-armoury.h @@ -611,8 +611,8 @@ static const struct dmi_system_id power_limits[] = { .ppt_pl2_sppt_def = 54,...
467d4afc6caa64b84a6db1634f8091e931f4a7cb
Analyze and fix the following issue in the Linux kernel code: platform/x86: hp-bioscfg: Fix automatic module loading
Problem Details: hp-bioscfg has a MODULE_DEVICE_TABLE with a GUID in it that looks plausible, but the module doesn't automatically load on applicable systems. This is because the GUID has some lower case characters and so it doesn't match the modalias during boot. Update the GUIDs to be all uppercase. Cc: stable@vger...
```diff diff --git a/drivers/platform/x86/hp/hp-bioscfg/bioscfg.h b/drivers/platform/x86/hp/hp-bioscfg/bioscfg.h index 6b6748e4be21..f1eec0e4ba07 100644 --- a/drivers/platform/x86/hp/hp-bioscfg/bioscfg.h +++ b/drivers/platform/x86/hp/hp-bioscfg/bioscfg.h @@ -57,14 +57,14 @@ enum mechanism_values { #define PASSWD_MEC...
10dc959398175736e495f71c771f8641e1ca1907
Analyze and fix the following issue in the Linux kernel code: io_uring/io-wq: check IO_WQ_BIT_EXIT inside work run loop
Problem Details: Currently this is checked before running the pending work. Normally this is quite fine, as work items either end up blocking (which will create a new worker for other items), or they complete fairly quickly. But syzbot reports an issue where io-wq takes seemingly forever to exit, and with a bit of debu...
```diff diff --git a/io_uring/io-wq.c b/io_uring/io-wq.c index 9fd9f6ab722c..2fa7d3601edb 100644 --- a/io_uring/io-wq.c +++ b/io_uring/io-wq.c @@ -598,9 +598,9 @@ static void io_worker_handle_work(struct io_wq_acct *acct, __releases(&acct->lock) { struct io_wq *wq = worker->wq; - bool do_kill = test_bit(IO_WQ_BIT_...
25150715e0b049b99df664daf05dab12f41c3e13
Analyze and fix the following issue in the Linux kernel code: platform/x86: hp-bioscfg: Fix kernel panic in GET_INSTANCE_ID macro
Problem Details: The GET_INSTANCE_ID macro that caused a kernel panic when accessing sysfs attributes: 1. Off-by-one error: The loop condition used '<=' instead of '<', causing access beyond array bounds. Since array indices are 0-based and go from 0 to instances_count-1, the loop should use '<'. 2. Missing NUL...
```diff diff --git a/drivers/platform/x86/hp/hp-bioscfg/bioscfg.h b/drivers/platform/x86/hp/hp-bioscfg/bioscfg.h index 3166ef328eba..6b6748e4be21 100644 --- a/drivers/platform/x86/hp/hp-bioscfg/bioscfg.h +++ b/drivers/platform/x86/hp/hp-bioscfg/bioscfg.h @@ -10,6 +10,7 @@ #include <linux/wmi.h> #include <linux/type...
1a0f69e3c28477b97d3609569b7e8feb4b6162e8
Analyze and fix the following issue in the Linux kernel code: drm/bridge: synopsys: dw-dp: fix error paths of dw_dp_bind
Problem Details: Fix several issues in dw_dp_bind() error handling: 1. Missing return after drm_bridge_attach() failure - the function continued execution instead of returning an error. 2. Resource leak: drm_dp_aux_register() is not a devm function, so drm_dp_aux_unregister() must be called on all error paths a...
```diff diff --git a/drivers/gpu/drm/bridge/synopsys/dw-dp.c b/drivers/gpu/drm/bridge/synopsys/dw-dp.c index 82aaf74e1bc0..432342452484 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-dp.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-dp.c @@ -2062,33 +2062,41 @@ struct dw_dp *dw_dp_bind(struct device *dev, struct drm_encod...
6ea258d1f6895c61af212473b51477d39b8c99d2
Analyze and fix the following issue in the Linux kernel code: fs/namei: fix kernel-doc markup for dentry_create
Problem Details: O_ is interpreted as a broken hyperlink target. Escape _ with a backslash. The asterisk in "struct file *" is interpreted as an opening emphasis string that never closes. Replace double quotes with rST backticks. Change "a ERR_PTR" to "an ERR_PTR". Signed-off-by: Jay Winston <jaybenjaminwinston@gmai...
```diff diff --git a/fs/namei.c b/fs/namei.c index aefb21bc0944..45dd897a0393 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -4939,7 +4939,7 @@ EXPORT_SYMBOL(start_creating_user_path); /** * dentry_create - Create and open a file * @path: path to create - * @flags: O_ flags + * @flags: O\_ flags * @mode: mode bits ...
a4b4385d0523e39a7c058cb5a6c8269e513126ca
Analyze and fix the following issue in the Linux kernel code: drm: of: drm_of_panel_bridge_remove(): fix device_node leak
Problem Details: drm_of_panel_bridge_remove() uses of_graph_get_remote_node() to get a device_node but does not put the node reference. Fixes: c70087e8f16f ("drm/drm_of: add drm_of_panel_bridge_remove function") Cc: stable@vger.kernel.org # v4.15 Acked-by: Maxime Ripard <mripard@kernel.org> Link: https://patch.msgid.l...
```diff diff --git a/include/drm/drm_of.h b/include/drm/drm_of.h index 7f0256dae3f1..f3e55ea2174c 100644 --- a/include/drm/drm_of.h +++ b/include/drm/drm_of.h @@ -5,6 +5,7 @@ #include <linux/err.h> #include <linux/of_graph.h> #if IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_DRM_PANEL_BRIDGE) +#include <linux/of.h> #i...
3317785a8803db629efc759d811d0f589d3a0b2d
Analyze and fix the following issue in the Linux kernel code: s390/ap: Fix wrong APQN fill calculation
Problem Details: The upper limit of the firmware queue fill state for each APQN is reported by the hwinfo.qd field. This field shows the numbers 0-7 for 1-8 queue spaces available. But the exploiting code assumed the real boundary is stored there and thus stoppes queuing in messages one tick too early. Correct the lim...
```diff diff --git a/drivers/s390/crypto/ap_card.c b/drivers/s390/crypto/ap_card.c index 8102c8134c49..8b0ad6f582ec 100644 --- a/drivers/s390/crypto/ap_card.c +++ b/drivers/s390/crypto/ap_card.c @@ -43,7 +43,7 @@ static ssize_t depth_show(struct device *dev, struct device_attribute *attr, { struct ap_card *ac = to_a...
2c73cfd0cfc44ffe331ccb81f6ac45fc399d9ddb
Analyze and fix the following issue in the Linux kernel code: media: iris: Prevent output buffer queuing before stream-on completes
Problem Details: During normal playback, stream-on for input is followed by output, and only after input stream-on does actual streaming begin. However, when gst-play performs a seek, both input and output streams are stopped, and on restart, output stream-on occurs first. At this point, firmware has not yet started st...
```diff diff --git a/drivers/media/platform/qcom/iris/iris_vb2.c b/drivers/media/platform/qcom/iris/iris_vb2.c index 139b821f7952..bf0b8400996e 100644 --- a/drivers/media/platform/qcom/iris/iris_vb2.c +++ b/drivers/media/platform/qcom/iris/iris_vb2.c @@ -193,10 +193,14 @@ int iris_vb2_start_streaming(struct vb2_queue *...
9aa8d63d09cfc44d879427cc5ba308012ca4ab8e
Analyze and fix the following issue in the Linux kernel code: media: iris: gen2: Add sanity check for session stop
Problem Details: In iris_kill_session, inst->state is set to IRIS_INST_ERROR and session_close is executed, which will kfree(inst_hfi_gen2->packet). If stop_streaming is called afterward, it will cause a crash. Add a NULL check for inst_hfi_gen2->packet before sendling STOP packet to firmware to fix that. Fixes: 1171...
```diff diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c b/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c index b492d9dfddd3..c75c8b9398a2 100644 --- a/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen2_command.c @@ -1036,6 +1036,...
1dabf00ee206eceb0f08a1fe5d1ce635f9064338
Analyze and fix the following issue in the Linux kernel code: media: iris: gen1: Destroy internal buffers after FW releases
Problem Details: After the firmware releases internal buffers, the driver was not destroying them. This left stale allocations that were no longer used, especially across resolution changes where new buffers are allocated per the updated requirements. As a result, memory was wasted until session close. Destroy interna...
```diff diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c b/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c index 1c107daca9e8..11815f6f5bac 100644 --- a/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c @@ -441,6 +441,8 ...
811dbc546f47559dc9d2098c612acfd47e32479e
Analyze and fix the following issue in the Linux kernel code: media: iris: Skip resolution set on first IPSC
Problem Details: The resolution property is not supposed to be set during reconfig. Existing iris_drc_pending(inst) check is insufficient, as it doesn't cover the first port setting change. Extend the conditional check to also skip resolution setting when the instance is in IRIS_INST_SUB_FIRST_IPSC. Fixes: caf2055487...
```diff diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c b/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c index b6261d186d21..1c107daca9e8 100644 --- a/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c @@ -733,7 +733,7 ...
2d0bbd982dfdd67da488a772f7a8a1bdca7642bf
Analyze and fix the following issue in the Linux kernel code: media: iris: Add buffer to list only after successful allocation
Problem Details: Move `list_add_tail()` to after `dma_alloc_attrs()` succeeds when creating internal buffers. Previously, the buffer was enqueued in `buffers->list` before the DMA allocation. If the allocation failed, the function returned `-ENOMEM` while leaving a partially initialized buffer in the list, which could ...
```diff diff --git a/drivers/media/platform/qcom/iris/iris_buffer.c b/drivers/media/platform/qcom/iris/iris_buffer.c index b89b1ee06cce..f1f003a787bf 100644 --- a/drivers/media/platform/qcom/iris/iris_buffer.c +++ b/drivers/media/platform/qcom/iris/iris_buffer.c @@ -351,12 +351,15 @@ static int iris_create_internal_buf...
bbef55f414100853d5bcea56a41f8b171bac8fcb
Analyze and fix the following issue in the Linux kernel code: media: iris: Add missing platform data entries for SM8750
Problem Details: Two platform-data fields for SM8750 were missed: - get_vpu_buffer_size = iris_vpu33_buf_size Without this, the driver fails to allocate the required internal buffers, leading to basic decode/encode failures during session bring-up. - max_core_mbps = ((7680 * 4320) / 256) * 60 With...
```diff diff --git a/drivers/media/platform/qcom/iris/iris_platform_gen2.c b/drivers/media/platform/qcom/iris/iris_platform_gen2.c index b2d8559dd2b8..c932dc026616 100644 --- a/drivers/media/platform/qcom/iris/iris_platform_gen2.c +++ b/drivers/media/platform/qcom/iris/iris_platform_gen2.c @@ -1056,6 +1056,7 @@ const s...
8fc707d13df517222db12b465af4aa9df05c99e1
Analyze and fix the following issue in the Linux kernel code: media: iris: remove v4l2_m2m_ioctl_{de,en}coder_cmd API usage during STOP handling
Problem Details: Currently v4l2_m2m_ioctl_{de,enc}coder_cmd is being invoked during STOP command handling. However, this is not required as the iris driver has its own drain and stop handling mechanism in place. Using the m2m command API in this context leads to incorrect behavior, where the LAST flag is prematurely a...
```diff diff --git a/drivers/media/platform/qcom/iris/iris_vidc.c b/drivers/media/platform/qcom/iris/iris_vidc.c index dfd94f4a84a9..bd38d84c9cc7 100644 --- a/drivers/media/platform/qcom/iris/iris_vidc.c +++ b/drivers/media/platform/qcom/iris/iris_vidc.c @@ -573,9 +573,10 @@ static int iris_dec_cmd(struct file *filp, v...
4980721cb97d6c47700ab61a048ac8819cfeec87
Analyze and fix the following issue in the Linux kernel code: media: iris: use fallback size when S_FMT is called without width/height
Problem Details: According to 4.5.1.5 of the M2M stateful decoder UAPI documentation, providing the width and the height to S_FMT is "required only if it cannot be parsed from the stream", otherwise they can be left as 0 and the S_FMT implementation is expected to return a valid placeholder resolution that would let RE...
```diff diff --git a/drivers/media/platform/qcom/iris/iris_vdec.c b/drivers/media/platform/qcom/iris/iris_vdec.c index bf7b9c621cb7..467d00044a2f 100644 --- a/drivers/media/platform/qcom/iris/iris_vdec.c +++ b/drivers/media/platform/qcom/iris/iris_vdec.c @@ -216,6 +216,14 @@ int iris_vdec_s_fmt(struct iris_inst *inst, ...
71fe80364a6584f404556ac9a6a4aca4ab80fb5b
Analyze and fix the following issue in the Linux kernel code: media: iris: Fix fps calculation
Problem Details: iris_venc_s_param() uses do_div to divide two 64 bits operators, this is wrong. Luckily for us, both of the operators fit in 32 bits, so we can use a normal division. Now that we are at it, mark the fps smaller than 1 as invalid, the code does not seem to handle them properly. The following cocci war...
```diff diff --git a/drivers/media/platform/qcom/iris/iris_venc.c b/drivers/media/platform/qcom/iris/iris_venc.c index 5830eba93c68..0ed5018f9fe3 100644 --- a/drivers/media/platform/qcom/iris/iris_venc.c +++ b/drivers/media/platform/qcom/iris/iris_venc.c @@ -382,8 +382,7 @@ int iris_venc_s_param(struct iris_inst *inst,...
89f7cf35901138d9828d981ce64c131a3da6e867
Analyze and fix the following issue in the Linux kernel code: media: iris: Fix ffmpeg corrupted frame error
Problem Details: When the ffmpeg decoder is running, the driver receives the V4L2_BUF_FLAG_KEYFRAME flag in the input buffer. The driver then forwards this flag information to the firmware. The firmware, in turn, copies the input buffer flags directly into the output buffer flags. Upon receiving the output buffer from ...
```diff diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c b/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c index 52da7ef7bab0..b6261d186d21 100644 --- a/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c @@ -282,7 +282,7 ...
370e19042fb8ac68109f8bdb0fdd8118baf39318
Analyze and fix the following issue in the Linux kernel code: Revert "media: iris: Add sanity check for stop streaming"
Problem Details: This reverts commit ad699fa78b59241c9d71a8cafb51525f3dab04d4. Revert the check that skipped stop_streaming when the instance was in IRIS_INST_ERROR, as it caused multiple regressions: 1. Buffers were not returned to vb2 when the instance was already in error state, triggering warnings in the vb2 c...
```diff diff --git a/drivers/media/platform/qcom/iris/iris_vb2.c b/drivers/media/platform/qcom/iris/iris_vb2.c index db8768d8a8f6..139b821f7952 100644 --- a/drivers/media/platform/qcom/iris/iris_vb2.c +++ b/drivers/media/platform/qcom/iris/iris_vb2.c @@ -231,8 +231,6 @@ void iris_vb2_stop_streaming(struct vb2_queue *q)...
9210f5ff6318163835d9e42ee68006be4da0f531
Analyze and fix the following issue in the Linux kernel code: ASoC: fsl: imx-card: Do not force slot width to sample width
Problem Details: imx-card currently sets the slot width to the physical sample width for I2S links. This breaks controllers that use fixed-width slots (e.g. 32-bit FIFO words), causing the unused bits in the slot to contain undefined data when playing 16-bit streams. Do not override the slot width in the machine drive...
```diff diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c index 28699d7b75ca..05b4e971a366 100644 --- a/sound/soc/fsl/imx-card.c +++ b/sound/soc/fsl/imx-card.c @@ -346,7 +346,6 @@ static int imx_aif_hw_params(struct snd_pcm_substream *substream, SND_SOC_DAIFMT_PDM; } else { slots = 2; - ...
63c072e2937e6c9995df1b6a28523ed2ae68d364
Analyze and fix the following issue in the Linux kernel code: media: venus: vdec: restrict EOS addr quirk to IRIS2 only
Problem Details: On SM8250 (IRIS2) with firmware older than 1.0.087, the firmware could not handle a dummy device address for EOS buffers, so a NULL device address is sent instead. The existing check used IS_V6() alongside a firmware version gate: if (IS_V6(core) && is_fw_rev_or_older(core, 1, 0, 87)) fdat...
```diff diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index d0bd2d86a31f..4cd69440e875 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -565,7 +565,13 @@ vdec_decoder_cmd(struct file *file, void *fh, struct v4l2_de...
93ecd6ee95c38cb533fa25f48d3c1c8cb69f410f
Analyze and fix the following issue in the Linux kernel code: media: venus: vdec: fix error state assignment for zero bytesused
Problem Details: When hfi_session_flush is issued, all queued buffers are returned to the V4L2 driver. Some of these buffers are not processed and have bytesused = 0. Currently, the driver marks such buffers as error even during drain operations, which can incorrectly flag EOS buffers. Only capture buffers with zero p...
```diff diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index 4a6641fdffcf..d0bd2d86a31f 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -1440,10 +1440,10 @@ static void vdec_buf_done(struct venus_inst *inst, unsign...
930e69757b74c3ae083b0c3c7419bfe7f0edc7b2
Analyze and fix the following issue in the Linux kernel code: ALSA: usb-audio: Fix use-after-free in snd_usb_mixer_free()
Problem Details: When snd_usb_create_mixer() fails, snd_usb_mixer_free() frees mixer->id_elems but the controls already added to the card still reference the freed memory. Later when snd_card_register() runs, the OSS mixer layer calls their callbacks and hits a use-after-free read. Call trace: get_ctl_value+0x63f/0x...
```diff diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 90917c6ea871..bfe15b1cb66c 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c @@ -2945,10 +2945,23 @@ static int parse_audio_unit(struct mixer_build *state, int unitid) static void snd_usb_mixer_free(struct usb_mixer_interface *mixer) { + struct u...
53ed3d91a141f5c8b3bce45b0004fbbfefe77956
Analyze and fix the following issue in the Linux kernel code: x86/segment: Use MOVL when reading segment registers
Problem Details: Use MOVL when reading segment registers to avoid 0x66 operand-size override insn prefix. The segment value is always 16-bit and gets zero-extended to the full 32-bit size. Example: 4e4: 66 8c c0 mov %es,%ax 4e7: 66 89 83 80 0b 00 00 mov %ax,0xb80(%rbx) 4e4: ...
```diff diff --git a/arch/x86/include/asm/segment.h b/arch/x86/include/asm/segment.h index f59ae7186940..9f5be2bbd291 100644 --- a/arch/x86/include/asm/segment.h +++ b/arch/x86/include/asm/segment.h @@ -348,7 +348,7 @@ static inline void __loadsegment_fs(unsigned short value) * Save a segment register away: */ #de...
6be87fbb27763c2999e1c69bbec1f3a63cf05422
Analyze and fix the following issue in the Linux kernel code: selftests/net: Add env for container based tests
Problem Details: Add an env NetDrvContEnv for container based selftests. This automates the setup of a netns, netkit pair with one inside the netns, and a BPF program that forwards skbs from the NETIF host inside the container. Currently only netkit is used, but other virtual netdevs e.g. veth can be used too. Expect...
```diff diff --git a/tools/testing/selftests/drivers/net/README.rst b/tools/testing/selftests/drivers/net/README.rst index eb838ae94844..b94e81c2e030 100644 --- a/tools/testing/selftests/drivers/net/README.rst +++ b/tools/testing/selftests/drivers/net/README.rst @@ -62,6 +62,13 @@ LOCAL_V4, LOCAL_V6, REMOTE_V4, REMOTE_...
61d99ce3dfc2f1ba5bf713093bb3a5faf5ebc2dc
Analyze and fix the following issue in the Linux kernel code: selftests/net: Add bpf skb forwarding program
Problem Details: Add nk_forward.bpf.c, a BPF program that forwards skbs matching some IPv6 prefix received on eth0 ifindex to a specified netkit ifindex. This will be needed by netkit container tests. Signed-off-by: David Wei <dw@davidwei.uk> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Stanislav Fo...
```diff diff --git a/tools/testing/selftests/drivers/net/hw/nk_forward.bpf.c b/tools/testing/selftests/drivers/net/hw/nk_forward.bpf.c new file mode 100644 index 000000000000..86ebfc1445b6 --- /dev/null +++ b/tools/testing/selftests/drivers/net/hw/nk_forward.bpf.c @@ -0,0 +1,49 @@ +// SPDX-License-Identifier: GPL-2.0 +...
122610220134b32c742cc056eaf64f7017ac8cd9
Analyze and fix the following issue in the Linux kernel code: mmc: rtsx_pci_sdmmc: implement sdmmc_card_busy function
Problem Details: rtsx_pci_sdmmc does not have an sdmmc_card_busy function, so any voltage switches cause a kernel warning, "mmc0: cannot verify signal voltage switch." Copy the sdmmc_card_busy function from rtsx_pci_usb to rtsx_pci_sdmmc to fix this. Fixes: ff984e57d36e ("mmc: Add realtek pcie sdmmc host driver") Sig...
```diff diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c index dc2587ff8519..4db3328f46df 100644 --- a/drivers/mmc/host/rtsx_pci_sdmmc.c +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c @@ -1306,6 +1306,46 @@ out: return err; } +static int sdmmc_card_busy(struct mmc_host *mmc) +{ + struct ...
5f7be8afc40c5ccf1be0410514703e50a49532c0
Analyze and fix the following issue in the Linux kernel code: drm/rockchip: dw_hdmi_qp: Fix RK3576 HPD interrupt handling
Problem Details: The threaded interrupt handler on RK3576 checks HPD IRQ status before deciding to continue with interrupt clearing and unmasking. This is not only redundant, since a similar verification has been already performed by the hard IRQ handler before masking the interrupt, but is also error prone, because i...
```diff diff --git a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c index e91caae7e353..831d221bfd0d 100644 --- a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c @@ -280,12 +280,7 @@ static irqreturn_t dw_hdmi_qp_rk3576...
c259cd7ea3c9ad369c473ba2385d82e3432088b1
Analyze and fix the following issue in the Linux kernel code: revocable: fix missing module license and description
Problem Details: Fix missing MODULE_LICENSE() and MODULE_DESCRIPTION() in the revocable Kunit test module. Reported-by: Mark Brown <broonie@kernel.org> Closes: https://lore.kernel.org/all/aW6GNvuQVNCUcoy-@sirena.org.uk/ Fixes: cd7693419bb5 ("revocable: Add Kunit test cases") Reviewed-by: Tzung-Bi Shih <tzungbi@kernel....
```diff diff --git a/drivers/base/revocable_test.c b/drivers/base/revocable_test.c index 28d46ce1ba0c..873a44082b6c 100644 --- a/drivers/base/revocable_test.c +++ b/drivers/base/revocable_test.c @@ -137,3 +137,6 @@ static struct kunit_suite revocable_test_suite = { }; kunit_test_suite(revocable_test_suite); + +MODU...
8a8c942cad4cd12f739a8bb60cac77fd173c4e07
Analyze and fix the following issue in the Linux kernel code: gpio: cdev: Fix resource leaks on errors in gpiolib_cdev_register()
Problem Details: On error handling paths, gpiolib_cdev_register() doesn't free the allocated resources which results leaks. Fix it. Cc: stable@vger.kernel.org Fixes: 7b9b77a8bba9 ("gpiolib: add a per-gpio_device line state notification workqueue") Fixes: d83cee3d2bb1 ("gpio: protect the pointer to gpio_chip in gpio_d...
```diff diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c index ed249a45d658..2adc3c070908 100644 --- a/drivers/gpio/gpiolib-cdev.c +++ b/drivers/gpio/gpiolib-cdev.c @@ -2797,13 +2797,18 @@ int gpiolib_cdev_register(struct gpio_device *gdev, dev_t devt) return -ENOMEM; ret = cdev_device_add(...
f47872bed40ffee580ac772eefea94fab75b18d3
Analyze and fix the following issue in the Linux kernel code: hinic3: Add .ndo_tx_timeout and .ndo_get_stats64
Problem Details: Implement following callback function: .ndo_tx_timeout .ndo_get_stats64 Use a work queue to trace tx_timeout callback and dump necessary debug information. Co-developed-by: Zhu Yikai <zhuyikai1@h-partners.com> Signed-off-by: Zhu Yikai <zhuyikai1@h-partners.com> Signed-off-by: Fan Gong <gongfan1@huawe...
```diff diff --git a/drivers/net/ethernet/huawei/hinic3/hinic3_hwdev.h b/drivers/net/ethernet/huawei/hinic3/hinic3_hwdev.h index 3c15f22973fe..58bc561f95b3 100644 --- a/drivers/net/ethernet/huawei/hinic3/hinic3_hwdev.h +++ b/drivers/net/ethernet/huawei/hinic3/hinic3_hwdev.h @@ -17,6 +17,15 @@ enum hinic3_event_service_...
e806f7dde8ba28bc72a7a0898589cac79f6362ac
Analyze and fix the following issue in the Linux kernel code: timekeeping: Adjust the leap state for the correct auxiliary timekeeper
Problem Details: When __do_ajdtimex() was introduced to handle adjtimex for any timekeeper, this reference to tk_core was not updated. When called on an auxiliary timekeeper, the core timekeeper would be updated incorrectly. This gets caught by the lock debugging diagnostics because the timekeepers sequence lock gets ...
```diff diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 3ec3daa4acab..91fa2003351c 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -2735,7 +2735,7 @@ static int __do_adjtimex(struct tk_data *tkd, struct __kernel_timex *txc, timekeeping_update_from_shadow(tkd, TK_CLO...
98d5110f90ae0dbc5f2f13f033e06f6d57009e0d
Analyze and fix the following issue in the Linux kernel code: iommupt: Make it clearer to the compiler that pts.level == 0 for single page
Problem Details: Older versions of gcc and clang sometimes get tripped up by the build time assertion in FIELD_PREP because they can see that the argument to FIELD_PREP is constant but can't see that the if condition protecting it is also a constant false. In file included from <command-line>: In function 'amdv1...
```diff diff --git a/drivers/iommu/generic_pt/iommu_pt.h b/drivers/iommu/generic_pt/iommu_pt.h index 3327116a441c..52ef028ed2db 100644 --- a/drivers/iommu/generic_pt/iommu_pt.h +++ b/drivers/iommu/generic_pt/iommu_pt.h @@ -645,7 +645,7 @@ static __always_inline int __do_map_single_page(struct pt_range *range, struct ...
c0a652a3d1970caa0023632ae3a4ea21991d2f1a
Analyze and fix the following issue in the Linux kernel code: iommu/amd: Remove unused variable in amd_iommufd_viommu_destroy()
Problem Details: This fixes warning reported by 0-DAY CI Kernel Test Service. Fixes: 757d2b1fdf5b ("iommu/amd: Introduce gDomID-to-hDomID Mapping and handle parent domain invalidation") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202601190634.bl7Mjx5Q-lkp@intel.com/ Sig...
```diff diff --git a/drivers/iommu/amd/iommufd.c b/drivers/iommu/amd/iommufd.c index 2e50633d9c72..ad627fd5ccc7 100644 --- a/drivers/iommu/amd/iommufd.c +++ b/drivers/iommu/amd/iommufd.c @@ -59,7 +59,6 @@ int amd_iommufd_viommu_init(struct iommufd_viommu *viommu, struct iommu_domain * static void amd_iommufd_viommu_de...
8d76a7d89c12d08382b66e2f21f20d0627d14859
Analyze and fix the following issue in the Linux kernel code: irqchip/gic-v3-its: Avoid truncating memory addresses
Problem Details: On 32-bit machines with CONFIG_ARM_LPAE, it is possible for lowmem allocations to be backed by addresses physical memory above the 32-bit address limit, as found while experimenting with larger VMSPLIT configurations. This caused the qemu virt model to crash in the GICv3 driver, which allocates the 'i...
```diff diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index ada585bfa451..2988def30972 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -709,7 +709,7 @@ static struct its_collection *its_build_mapd_cmd(struct its_node *its, struct its_cmd...
b18247f9dab735c9c2d63823d28edc9011e7a1ad
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Do not enable hdmi_sound node on Pinebook Pro
Problem Details: Remove the redundant enabling of the hdmi_sound node in the Pinebook Pro board dts file, because the HDMI output is unused on this device. [1][2] This change also eliminates the following kernel log warning, which is caused by the unenabled dependent node of hdmi_sound that ultimately results in the n...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts index eaaca08a7601..a6ac89567baf 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts @@ -421,10 +421,6 @@ status = "...
6742b998166485558ccb0e89b5d5fd93c1aae3ca
Analyze and fix the following issue in the Linux kernel code: arm64: dts: rockchip: Fix imx258 variant on pinephone pro
Problem Details: imx258 had the driver updated a while back and it introduced two variants, the imx258 and imx258-pdaf. The pinephone pro is using the pdaf variant so this switches it to the correct variant and eliminates the pdaf pixels from the sensor output resulting in a much cleaner image. Signed-off-by: Luis Gar...
```diff diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts index 141ab9850290..cee9e35d770e 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts @@ -451,7 +451,7 @@ status ...
aebc29dec67aa998a9ea6d34aacba7b5c6a74d33
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: apply advertised TTLM from association response
Problem Details: When the AP has a disabled link that the station can include in the association, the fact that the link is dormant needs to be advertised in the TID to Link Mapping (TTLM). Section 35.3.7.2.3 ("Negotiation of TTLM") of Draft P802.11REVmf_D1.0 also states that the mapping needs to be included in the ass...
```diff diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 9d9313eee59f..bd573f8e61fb 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -451,8 +451,6 @@ struct ieee80211_mgd_assoc_data { struct ieee80211_conn_settings conn; u16 status; - - bool disabled; } li...
3f3d8ff31496874a69b131866f62474eb24ed20a
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: don't increment crypto_tx_tailroom_needed_cnt twice
Problem Details: In reconfig, in case the driver asks to disconnect during the reconfig, all the keys of the interface are marked as tainted. Then ieee80211_reenable_keys will loop over all the interface keys, and for each one it will a) increment crypto_tx_tailroom_needed_cnt b) call ieee80211_key_enable_hw_accel, whi...
```diff diff --git a/net/mac80211/key.c b/net/mac80211/key.c index d5da7ccea66e..04c8809173d7 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c @@ -987,7 +987,8 @@ void ieee80211_reenable_keys(struct ieee80211_sub_if_data *sdata) if (ieee80211_sdata_running(sdata)) { list_for_each_entry(key, &sdata->key_l...
5dc6975566f5d142ec53eb7e97af688c45dd314d
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: don't perform DA check on S1G beacon
Problem Details: S1G beacons don't contain the DA field as per IEEE80211-2024 9.3.4.3, so the DA broadcast check reads the SA address of the S1G beacon which will subsequently lead to the beacon being dropped. As a result, passive scanning is not possible. Fix this by only performing the check on non-S1G beacons to all...
```diff diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 5ef315ed3b0f..4823c8d45639 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c @@ -347,8 +347,13 @@ void ieee80211_scan_rx(struct ieee80211_local *local, struct sk_buff *skb) mgmt->da)) return; } else { - /* Beacons are expected ...
d1c0978a7e7864fcaa7cdd562a8f938afcd2ad39
Analyze and fix the following issue in the Linux kernel code: drm/tests: hdmi: fix build failure
Problem Details: The commit ca59e33f5a1f ("drm/atomic: add max_size check to drm_property_replace_blob_from_id()") added a new parameter to drm_property_replace_blob_from_id(), however commit 7436a87db99d ("drm/tests: hdmi: check the infoframes behaviour") was based on the older tree and used the old number of params (...
```diff diff --git a/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c b/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c index 1c60947a13a1..13e405979e33 100644 --- a/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c +++ b/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c @@ -2779,7 +2779,7 @@ retry_conn_state: ...
304c3ebcaff36560d76e3030ba0839e629635f47
Analyze and fix the following issue in the Linux kernel code: pinctrl: th1520: Fix typo
Problem Details: This fixes a simple typo in the TH1520 SPI0 for group3 pins: QSPI0 is misspelled QSPI1. Signed-off-by: Thomas Gerner <thomas.gerner@muenchen-mail.de> Signed-off-by: Linus Walleij <linusw@kernel.org>
```diff diff --git a/drivers/pinctrl/pinctrl-th1520.c b/drivers/pinctrl/pinctrl-th1520.c index e641bad6728c..83e9c9f77370 100644 --- a/drivers/pinctrl/pinctrl-th1520.c +++ b/drivers/pinctrl/pinctrl-th1520.c @@ -287,7 +287,7 @@ static const struct pinctrl_pin_desc th1520_group3_pins[] = { TH1520_PAD(5, QSPI0_D0_MOSI,...
7006477e7ff01ce9be7014f25049372450a8e17b
Analyze and fix the following issue in the Linux kernel code: arm64: STM32: drop an undefined Kconfig symbol
Problem Details: Drop ARM_SMC_MBOX since it is not defined or used anywhere else in the kernel source tree. Fixes: 9e4e24414cc6 ("arm64: introduce STM32 family on Armv8 architecture") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20251230181429.3429404-1-rdunlap@infradead.org Sign...
```diff diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms index fff14807c965..d8af5633341b 100644 --- a/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms @@ -372,7 +372,6 @@ config ARCH_STM32 bool "STMicroelectronics STM32 SoC Family" select GPIOLIB select PINCTRL - select ARM...
6dad7fa8581e96321ec8a6a4f8160762466f539a
Analyze and fix the following issue in the Linux kernel code: drm/hisilicon/hibmc: Adding reset colorbar cfg in dp init.
Problem Details: Add colorbar disable operation before reset chontroller, to make sure colorbar status is clear in the DP init, so if rmmod the driver and the previous colorbar configuration will not affect the next time insmod the driver. Fixes: 3c7623fb5bb6 ("drm/hisilicon/hibmc: Enable this hot plug detect of irq f...
```diff diff --git a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c index 8f8ca940b6b2..d5bd3c45649b 100644 --- a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c +++ b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c @@ -180,6 +180,8 @@ int hibmc_dp_hw_init(struct hibmc_dp *dp) /* int in...
0607052a6aee1e3d218a99fae70ba9f14b3b47ed
Analyze and fix the following issue in the Linux kernel code: drm/hisilicon/hibmc: fix no showing problem with loading hibmc manually
Problem Details: When using command rmmod and insmod, there is no showing in second time insmoding. Because DP controller won't send HPD signals, if connection doesn't change or controller isn't reset. So add reset before unreset in hibmc_dp_hw_init(). And also need to move the HDCP cfg after DP controller de-resets, ...
```diff diff --git a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c index 37549dafa06c..8f8ca940b6b2 100644 --- a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c +++ b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_hw.c @@ -177,13 +177,16 @@ int hibmc_dp_hw_init(struct hibmc_dp *dp) dp_dev-...
607805abfb747b98f43aa57d6d9ba4caed4d106f
Analyze and fix the following issue in the Linux kernel code: drm/hisilicon/hibmc: add dp mode valid check
Problem Details: If DP is connected, check the DP BW in mode_valid_ctx() to ensure that DP's link rate supports high-resolution data transmission. Fixes: 0ab6ea261c1f ("drm/hisilicon/hibmc: add dp module in hibmc") Signed-off-by: Baihan Li <libaihan@huawei.com> Signed-off-by: Yongbang Shi <shiyongbang@huawei.com> Revi...
```diff diff --git a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_config.h b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_config.h index 08f9e1caf7fc..efb30a758475 100644 --- a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_config.h +++ b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_config.h @@ -17,5 +17,7 @@ #define HIBMC_DP_LINK_RATE_CAL 27 #d...
3906e7a3b26d683868704fe262db443207f392fe
Analyze and fix the following issue in the Linux kernel code: drm/hisilicon/hibmc: fix dp probabilistical detect errors after HPD irq
Problem Details: The issue is that drm_connector_helper_detect_from_ddc() returns wrong status when plugging or unplugging the monitor, which may cause the link failed err.[0] Use HPD pin status in DP's detect_ctx() for real physical monitor in/out, and implement a complete DP detection including read DPCD, check if it...
```diff diff --git a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_comm.h b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_comm.h index 4add05c7f161..f9ee7ebfec55 100644 --- a/drivers/gpu/drm/hisilicon/hibmc/dp/dp_comm.h +++ b/drivers/gpu/drm/hisilicon/hibmc/dp/dp_comm.h @@ -40,6 +40,10 @@ struct hibmc_dp_dev { struct mutex lock; /* ...
6af62d12317f369f96b0f272e9e074372d09e89d
Analyze and fix the following issue in the Linux kernel code: drm/i915/cx0: Fix HDMI FRL clock rates
Problem Details: HDMI FRL clock rates are incorrectly defined. Fix these rates. Signed-off-by: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https://patch.msgid.link/20260119093757.2850233-10-mika.kahola@intel.com
```diff diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c b/drivers/gpu/drm/i915/display/intel_cx0_phy.c index 26d3d41d41a7..eda0e176b8be 100644 --- a/drivers/gpu/drm/i915/display/intel_cx0_phy.c +++ b/drivers/gpu/drm/i915/display/intel_cx0_phy.c @@ -1924,7 +1924,7 @@ static const struct intel_c20pll_state mtl_...
cf0635d40af0029ed5f600f366a395df3c58a19b
Analyze and fix the following issue in the Linux kernel code: drm/i915/lt_phy: Create macro for LT PHY PLL state
Problem Details: Create a macro for PLL state for LT PHY similar as for cx0 case. v2: - Move addition of LT_PHY_PLL_DP/HDMI_PARAMS() to this patch. - Fix end of table checking while looking up a table. Signed-off-by: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Link: https:...
```diff diff --git a/drivers/gpu/drm/i915/display/intel_lt_phy.c b/drivers/gpu/drm/i915/display/intel_lt_phy.c index 48f644f417d2..a86ae6139ff0 100644 --- a/drivers/gpu/drm/i915/display/intel_lt_phy.c +++ b/drivers/gpu/drm/i915/display/intel_lt_phy.c @@ -437,15 +437,32 @@ static const struct intel_lt_phy_pll_state xe3p...
70b3c280533167749a8f740acaa8ef720f78f984
Analyze and fix the following issue in the Linux kernel code: gpio: cdev: Fix resource leaks on errors in lineinfo_changed_notify()
Problem Details: On error handling paths, lineinfo_changed_notify() doesn't free the allocated resources which results leaks. Fix it. Cc: stable@vger.kernel.org Fixes: d4cd0902c156 ("gpio: cdev: make sure the cdev fd is still active before emitting events") Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> Link: http...
```diff diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c index 67cbb05d34ca..ed249a45d658 100644 --- a/drivers/gpio/gpiolib-cdev.c +++ b/drivers/gpio/gpiolib-cdev.c @@ -2549,6 +2549,7 @@ static int lineinfo_changed_notify(struct notifier_block *nb, ctx = kzalloc(sizeof(*ctx), GFP_ATOMIC); if (...
faff6846474e99295a139997f93ef6db222b5cee
Analyze and fix the following issue in the Linux kernel code: gpio: cdev: Correct return code on memory allocation failure
Problem Details: -ENOMEM is a more appropriate return code for memory allocation failures. Correct it. Cc: stable@vger.kernel.org Fixes: 20bddcb40b2b ("gpiolib: cdev: replace locking wrappers for gpio_device with guards") Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> Link: https://lore.kernel.org/r/20260116081036...
```diff diff --git a/drivers/gpio/gpiolib-cdev.c b/drivers/gpio/gpiolib-cdev.c index 3735c9fe1502..67cbb05d34ca 100644 --- a/drivers/gpio/gpiolib-cdev.c +++ b/drivers/gpio/gpiolib-cdev.c @@ -2696,7 +2696,7 @@ static int gpio_chrdev_open(struct inode *inode, struct file *file) cdev = kzalloc(sizeof(*cdev), GFP_KERNE...
793e8f7d52814e096f63373eca643d2672366a5a
Analyze and fix the following issue in the Linux kernel code: drm/tyr: fix register name in error print
Problem Details: The `..IRQ..` register is printed here. Not the `..INT..` one. Correct this. Cc: stable@vger.kernel.org Fixes: cf4fd52e3236 ("rust: drm: Introduce the Tyr driver for Arm Mali GPUs") Link: https://lore.kernel.org/rust-for-linux/A04F0357-896E-4ACC-BC0E-DEE8608CE518@collabora.com/ Signed-off-by: Dirk Beh...
```diff diff --git a/drivers/gpu/drm/tyr/driver.rs b/drivers/gpu/drm/tyr/driver.rs index f0da58932702..434b80bb994b 100644 --- a/drivers/gpu/drm/tyr/driver.rs +++ b/drivers/gpu/drm/tyr/driver.rs @@ -75,7 +75,7 @@ fn issue_soft_reset(dev: &Device<Bound>, iomem: &Devres<IoMem>) -> Result { dev_err!(dev, "GPU res...
436418ef5baa024b7b15dd730c36d651c6aaaf47
Analyze and fix the following issue in the Linux kernel code: arm64: dts: amlogic: meson-sm1-odroid: Eliminate Odroid HC4 power glitches during boot.
Problem Details: Fix issue with Odroid HC4 (and all meson-sm1-odroid) DTS that causes regulator power to momentarily glitch OFF-ON during boot. Add regulator-boot-on to all regulator-fixed and regulator-gpio entries that (1) define a gpio AND (2) define regulator-always-on. U-boot powers on devices necessary for boot...
```diff diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts index 0170139b8d32..3ece30a0a1ff 100644 --- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts +++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts @@ -52,6 +52,7 @@ gpio = <&g...
2397e9264676be7794f8f7f1e9763d90bd3c7335
Analyze and fix the following issue in the Linux kernel code: crypto: authencesn - reject too-short AAD (assoclen<8) to match ESP/ESN spec
Problem Details: authencesn assumes an ESP/ESN-formatted AAD. When assoclen is shorter than the minimum expected length, crypto_authenc_esn_decrypt() can advance past the end of the destination scatterlist and trigger a NULL pointer dereference in scatterwalk_map_and_copy(), leading to a kernel panic (DoS). Add a mini...
```diff diff --git a/crypto/authencesn.c b/crypto/authencesn.c index d1bf0fda3f2e..542a978663b9 100644 --- a/crypto/authencesn.c +++ b/crypto/authencesn.c @@ -169,6 +169,9 @@ static int crypto_authenc_esn_encrypt(struct aead_request *req) struct scatterlist *src, *dst; int err; + if (assoclen < 8) + return -EINV...
7d0507772406e129329983b8b807e5b499bd74fd
Analyze and fix the following issue in the Linux kernel code: drm/buddy: release free_trees array on buddy mm teardown
Problem Details: During initialization of DRM buddy memory manager at drm_buddy_init, mm->free_trees array is allocated for both clear and dirty RB trees. During cleanup happening at drm_buddy_fini it is never freed, leading to following memory leaks observed on xe module load & unload cycles: kmemleak_alloc+0x4a/...
```diff diff --git a/drivers/gpu/drm/drm_buddy.c b/drivers/gpu/drm/drm_buddy.c index 2f279b46bd2c..8308116058cc 100644 --- a/drivers/gpu/drm/drm_buddy.c +++ b/drivers/gpu/drm/drm_buddy.c @@ -420,6 +420,7 @@ void drm_buddy_fini(struct drm_buddy *mm) for_each_free_tree(i) kfree(mm->free_trees[i]); + kfree(mm->free...
94a8cea54cd935c54fa2fba70354757c0fc245e3
Analyze and fix the following issue in the Linux kernel code: ext4: fix dirtyclusters double decrement on fs shutdown
Problem Details: fstests test generic/388 occasionally reproduces a warning in ext4_put_super() associated with the dirty clusters count: WARNING: CPU: 7 PID: 76064 at fs/ext4/super.c:1324 ext4_put_super+0x48c/0x590 [ext4] Tracing the failure shows that the warning fires due to an s_dirtyclusters_counter value of -...
```diff diff --git a/fs/ext4/mballoc-test.c b/fs/ext4/mballoc-test.c index a9416b20ff64..4abb40d4561c 100644 --- a/fs/ext4/mballoc-test.c +++ b/fs/ext4/mballoc-test.c @@ -567,7 +567,7 @@ test_mark_diskspace_used_range(struct kunit *test, bitmap = mbt_ctx_bitmap(sb, TEST_GOAL_GROUP); memset(bitmap, 0, sb->s_blocks...
b18c5b84fa4a3c3c41b25c9b8f52ed9471c0c98d
Analyze and fix the following issue in the Linux kernel code: hfsplus: fix generic/037 xfstests failure
Problem Details: The xfstests' test-case generic/037 fails to execute correctly: FSTYP -- hfsplus PLATFORM -- Linux/x86_64 hfsplus-testing-0001 6.15.0-rc4+ #8 SMP PREEMPT_DYNAMIC Thu May 1 16:43:22 PDT 2025 MKFS_OPTIONS -- /dev/loop51 MOUNT_OPTIONS -- /dev/loop51 /mnt/scratch generic/037 - output mismatch (see xfstes...
```diff diff --git a/fs/hfsplus/attributes.c b/fs/hfsplus/attributes.c index 74b0ca9c4f17..4b79cd606276 100644 --- a/fs/hfsplus/attributes.c +++ b/fs/hfsplus/attributes.c @@ -193,46 +193,26 @@ attr_not_found: return 0; } -int hfsplus_create_attr(struct inode *inode, - const char *name, - const void *value, s...
491f2927ae097e2d405afe0b3fe841931ab8aad2
Analyze and fix the following issue in the Linux kernel code: ext4: fast commit: make s_fc_lock reclaim-safe
Problem Details: s_fc_lock can be acquired from inode eviction and thus is reclaim unsafe. Since the fast commit path holds s_fc_lock while writing the commit log, allocations under the lock can enter reclaim and invert the lock order with fs_reclaim. Add ext4_fc_lock()/ext4_fc_unlock() helpers which acquire s_fc_lock ...
```diff diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 3b5454208305..9610602fe37b 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -1788,6 +1788,10 @@ struct ext4_sb_info { * Main fast commit lock. This lock protects accesses to the * following fields: * ei->i_fc_list, s_fc_dentry_q, s_fc_q, s_fc_bytes,...
bdc56a9c46b2a99c12313122b9352b619a2e719e
Analyze and fix the following issue in the Linux kernel code: ext4: fix e4b bitmap inconsistency reports
Problem Details: A bitmap inconsistency issue was observed during stress tests under mixed huge-page workloads. Ext4 reported multiple e4b bitmap check failures like: ext4_mb_complex_scan_group:2508: group 350, 8179 free clusters as per group info. But got 8192 blocks Analysis and experimentation confirmed that the i...
```diff diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 56d50fd3310b..de4cacb740b3 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -1706,16 +1706,17 @@ ext4_mb_load_buddy_gfp(struct super_block *sb, ext4_group_t group, /* Avoid locking the folio in the fast path ... */ folio = __filemap_get_fol...
ca81109d4a8f192dc1cbad4a1ee25246363c2833
Analyze and fix the following issue in the Linux kernel code: ext4: fix memory leak in ext4_ext_shift_extents()
Problem Details: In ext4_ext_shift_extents(), if the extent is NULL in the while loop, the function returns immediately without releasing the path obtained via ext4_find_extent(), leading to a memory leak. Fix this by jumping to the out label to ensure the path is properly released. Fixes: a18ed359bdddc ("ext4: alway...
```diff diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 27eb2c1df012..e0295e0339b4 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -5406,7 +5406,8 @@ again: if (!extent) { EXT4_ERROR_INODE(inode, "unexpected hole at %lu", (unsigned long) *iterator); - return -EFSCORRUPTED; + ret = -...
b994ace83a2bc7699420f6a4c6b860c8da133159
Analyze and fix the following issue in the Linux kernel code: io_uring/waitid: fix KCSAN warning on io_waitid->head
Problem Details: Storing of the iw->head entry inside the wait_queue callback, or when removing a waitid item, really should use proper load/store acquire/release semantics, and KCSAN correctly warns of that. Ensure that they do so. Reported-by: syzbot+eb441775f4f948a0902f@syzkaller.appspotmail.com Fixes: a48c0cbf28c0...
```diff diff --git a/io_uring/waitid.c b/io_uring/waitid.c index 2d4cbd47c67c..d25d60aed6af 100644 --- a/io_uring/waitid.c +++ b/io_uring/waitid.c @@ -114,11 +114,11 @@ static void io_waitid_remove_wq(struct io_kiocb *req) struct io_waitid *iw = io_kiocb_to_cmd(req, struct io_waitid); struct wait_queue_head *head; ...
ebb87dd74c34a76e1e93041e9329cf9269be35ed
Analyze and fix the following issue in the Linux kernel code: riscv: dts: sophgo: fix the node order of SG2042 peripheral
Problem Details: In sg2042.dtsi, some peripheral device node does not follow the address order. Reorder them in ascending order by address. Reviewed-by: Chen Wang <unicorn_wang@outlook.com> Link: https://lore.kernel.org/r/20260113023828.790136-2-inochiama@gmail.com Signed-off-by: Inochi Amaoto <inochiama@gmail.com> Si...
```diff diff --git a/arch/riscv/boot/dts/sophgo/sg2042.dtsi b/arch/riscv/boot/dts/sophgo/sg2042.dtsi index e6891f95d479..9fddf3f0b3b9 100644 --- a/arch/riscv/boot/dts/sophgo/sg2042.dtsi +++ b/arch/riscv/boot/dts/sophgo/sg2042.dtsi @@ -264,94 +264,6 @@ #clock-cells = <1>; }; - pcie_rc0: pcie@7060000000 { - c...
9c7e71c97c8cd086b148d0d3d1cd84a1deab023c
Analyze and fix the following issue in the Linux kernel code: btrfs: fix Wmaybe-uninitialized warning in replay_one_buffer()
Problem Details: Warning was found when compiling using loongarch64-gcc 12.3.1: $ make CFLAGS_tree-log.o=-Wmaybe-uninitialized In file included from fs/btrfs/ctree.h:21, from fs/btrfs/tree-log.c:12: fs/btrfs/accessors.h: In function 'replay_one_buffer': fs/btrfs/accessors.h:66:16: warning: 'inode_item' m...
```diff diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 2d9d38b82daa..6cffcf0c3e7a 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -2798,7 +2798,7 @@ static int replay_one_buffer(struct extent_buffer *eb, nritems = btrfs_header_nritems(eb); for (wc->log_slot = 0; wc->log_slot < nritems;...
270564513489d98b721a1e4a10017978d5213bff
Analyze and fix the following issue in the Linux kernel code: ext4: move ext4_percpu_param_init() before ext4_mb_init()
Problem Details: When running `kvm-xfstests -c ext4/1k -C 1 generic/383` with the `DOUBLE_CHECK` macro defined, the following panic is triggered: ================================================================== EXT4-fs error (device vdc): ext4_validate_block_bitmap:423: comm mount: bg 0: bad ...
```diff diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 87205660c5d0..5c2e931d8a53 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -5604,6 +5604,10 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb) clear_opt2(sb, MB_OPTIMIZE_SCAN); } + err = ext4_percpu_param_init(sbi); +...
a380a02ea3ddc69c1c1ccca3882748dee33ec3d3
Analyze and fix the following issue in the Linux kernel code: rtc: pcf8563: use correct of_node for output clock
Problem Details: When switching to regmap, the i2c_client pointer was removed from struct pcf8563 so this function switched to using the RTC device instead. But the RTC device is a child of the original I2C device and does not have an associated of_node. Reference the correct device's of_node to ensure that the outpu...
```diff diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c index 4e61011fb7a9..b281e9489df1 100644 --- a/drivers/rtc/rtc-pcf8563.c +++ b/drivers/rtc/rtc-pcf8563.c @@ -424,7 +424,7 @@ static const struct clk_ops pcf8563_clkout_ops = { static struct clk *pcf8563_clkout_register_clk(struct pcf8563 *pcf8...
d5aca9a17f6de884febc56018f92d743b8ea1298
Analyze and fix the following issue in the Linux kernel code: rtc: max31335: use correct CONFIG symbol in IS_REACHABLE()
Problem Details: IS_REACHABLE() is meant to be used with full symbol names from a kernel .config file, not the shortened symbols used in Kconfig files, so change HWMON to CONFIG_HWMON in 3 places. Fixes: dedaf03b99d6 ("rtc: max31335: add driver support") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Nu...
```diff diff --git a/drivers/rtc/rtc-max31335.c b/drivers/rtc/rtc-max31335.c index 23b7bf16b4cd..952b455071d6 100644 --- a/drivers/rtc/rtc-max31335.c +++ b/drivers/rtc/rtc-max31335.c @@ -591,7 +591,7 @@ static struct nvmem_config max31335_nvmem_cfg = { .size = MAX31335_RAM_SIZE, }; -#if IS_REACHABLE(HWMON) +#if IS...
f9ecfd9bfedba9fd9d4b015b33b847571f7fdd42
Analyze and fix the following issue in the Linux kernel code: rtc: nvvrs: Add ARCH_TEGRA to the NV VRS RTC driver
Problem Details: The NV VRS RTC driver currently is only supported on the Tegra platform so add a dep for ARCH_TEGRA and compile test so it doesn't show up universally across all arches/platforms. Fixes: 9d6d6b06933c8 ("rtc: nvvrs: add NVIDIA VRS RTC device driver") Cc: Shubhi Garg <shgarg@nvidia.com> Cc: Jon Hunter <...
```diff diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 50dc779f7f98..50ba48609d74 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -418,6 +418,7 @@ config RTC_DRV_SPACEMIT_P1 config RTC_DRV_NVIDIA_VRS10 tristate "NVIDIA VRS10 RTC device" + depends on ARCH_TEGRA || COMPILE_TEST help ...
0eb1927502e870e4b8beaab403775056a8f4f0db
Analyze and fix the following issue in the Linux kernel code: orangefs: Replace deprecated strcpy with strscpy
Problem Details: strcpy() has been deprecated [1] because it performs no bounds checking on the destination buffer, which can lead to buffer overflows. Replace it with the safer strscpy(). No functional changes. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy [1] Signed-off-by: Thorsten Bl...
```diff diff --git a/fs/orangefs/xattr.c b/fs/orangefs/xattr.c index eee3c5ed1bbb..a431aa07a229 100644 --- a/fs/orangefs/xattr.c +++ b/fs/orangefs/xattr.c @@ -152,7 +152,7 @@ ssize_t orangefs_inode_getxattr(struct inode *inode, const char *name, goto out_unlock; new_op->upcall.req.getxattr.refn = orangefs_inode-...
b505f1944535f83d369ae68813e7634d11b990d3
Analyze and fix the following issue in the Linux kernel code: x86/kfence: avoid writing L1TF-vulnerable PTEs
Problem Details: For native, the choice of PTE is fine. There's real memory backing the non-present PTE. However, for XenPV, Xen complains: (XEN) d1 L1TF-vulnerable L1e 8010000018200066 - Shadowing To explain, some background on XenPV pagetables: Xen PV guests are control their own pagetables; they choose the ...
```diff diff --git a/arch/x86/include/asm/kfence.h b/arch/x86/include/asm/kfence.h index ff5c7134a37a..acf9ffa1a171 100644 --- a/arch/x86/include/asm/kfence.h +++ b/arch/x86/include/asm/kfence.h @@ -42,10 +42,34 @@ static inline bool kfence_protect_page(unsigned long addr, bool protect) { unsigned int level; pte_t...
605f6586ecf78395f0185ab24c368fb46a06e434
Analyze and fix the following issue in the Linux kernel code: mm/vma: do not leak memory when .mmap_prepare swaps the file
Problem Details: The current implementation of mmap() is set up such that a struct file object is obtained for the input fd in ksys_mmap_pgoff() via fget(), and its reference count decremented at the end of the function via. fput(). If a merge can be achieved, we are fine to simply decrement the refcount on the file....
```diff diff --git a/mm/vma.c b/mm/vma.c index dc92f3dd8514..7a908a964d18 100644 --- a/mm/vma.c +++ b/mm/vma.c @@ -37,6 +37,8 @@ struct mmap_state { bool check_ksm_early :1; /* If we map new, hold the file rmap lock on mapping. */ bool hold_file_rmap_lock :1; + /* If .mmap_prepare changed the file, we don't need ...
b7880cb166ab62c2409046b2347261abf701530e
Analyze and fix the following issue in the Linux kernel code: migrate: correct lock ordering for hugetlb file folios
Problem Details: Syzbot has found a deadlock (analyzed by Lance Yang): 1) Task (5749): Holds folio_lock, then tries to acquire i_mmap_rwsem(read lock). 2) Task (5754): Holds i_mmap_rwsem(write lock), then tries to acquire folio_lock. migrate_pages() -> migrate_hugetlbs() -> unmap_and_move_huge_page() <- Tak...
```diff diff --git a/mm/migrate.c b/mm/migrate.c index 5169f9717f60..4688b9e38cd2 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -1458,6 +1458,7 @@ static int unmap_and_move_huge_page(new_folio_t get_new_folio, int page_was_mapped = 0; struct anon_vma *anon_vma = NULL; struct address_space *mapping = NULL; + enu...
90f3c123247e9564f2ecf861946ec41ceaf5e198
Analyze and fix the following issue in the Linux kernel code: panic: only warn about deprecated panic_print on write access
Problem Details: The panic_print_deprecated() warning is being triggered on both read and write operations to the panic_print parameter. This causes spurious warnings when users run 'sysctl -a' to list all sysctl values, since that command reads /proc/sys/kernel/panic_print and triggers the deprecation notice. Modify...
```diff diff --git a/kernel/panic.c b/kernel/panic.c index 0d52210a9e2b..0c20fcaae98a 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -131,7 +131,8 @@ static int proc_taint(const struct ctl_table *table, int write, static int sysctl_panic_print_handler(const struct ctl_table *table, int write, void *buffer,...
f9a49aa302a05e91ca01f69031cb79a0ea33031f
Analyze and fix the following issue in the Linux kernel code: fs/writeback: skip AS_NO_DATA_INTEGRITY mappings in wait_sb_inodes()
Problem Details: Above the while() loop in wait_sb_inodes(), we document that we must wait for all pages under writeback for data integrity. Consequently, if a mapping, like fuse, traditionally does not have data integrity semantics, there is no need to wait at all; we can simply skip these inodes. This restores fuse...
```diff diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 6800886c4d10..baa2f2141146 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -2750,8 +2750,13 @@ static void wait_sb_inodes(struct super_block *sb) * The mapping can appear untagged while still on-list since we * do not have the mapping lo...
be31340a4cc259340044b7fc4f7e97f58c74ee8e
Analyze and fix the following issue in the Linux kernel code: mm: take into account mm_cid size for mm_struct static definitions
Problem Details: Both init_mm and efi_mm static definitions need to make room for the 2 mm_cid cpumasks. This fixes possible out-of-bounds accesses to init_mm and efi_mm. Add a space between # and define for the mm_alloc_cid() definition to make it consistent with the coding style used in the rest of this header file...
```diff diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 110b319a2ffb..aa4639888f89 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -1368,7 +1368,7 @@ extern struct mm_struct init_mm; #define MM_STRUCT_FLEXIBLE_ARRAY_INIT \ { \ - [0 ... sizeof(cpumask_t)-1] = ...
6ac433f8b2590b09ca00863d218665729ac985f7
Analyze and fix the following issue in the Linux kernel code: mm: rename cpu_bitmap field to flexible_array
Problem Details: The cpu_bitmap flexible array now contains more than just the cpu_bitmap. In preparation for changing the static mm_struct definitions to cover for the additional space required, change the cpu_bitmap type from "unsigned long" to "char", require an unsigned long alignment of the flexible array, and re...
```diff diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c index f5ff6e84a9b7..17b5f3415465 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c @@ -74,10 +74,10 @@ struct mm_struct efi_mm = { .page_table_lock = __SPIN_LOCK_UNLOCKED(efi_mm.page_table_lock), .mmlist = LIST_HEA...
12a6ddfc76bb8a6d4508171d806c8632cf50a74a
Analyze and fix the following issue in the Linux kernel code: mm: add missing static initializer for init_mm::mm_cid.lock
Problem Details: Initialize the mm_cid.lock struct member of init_mm. Link: https://lkml.kernel.org/r/20251224173358.647691-2-mathieu.desnoyers@efficios.com Fixes: 8cea569ca785 ("sched/mmcid: Use proper data structures") Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Reviewed-by: Thomas Gleixner <tg...
```diff diff --git a/mm/init-mm.c b/mm/init-mm.c index 4600e7605cab..a514f8ce47e3 100644 --- a/mm/init-mm.c +++ b/mm/init-mm.c @@ -44,6 +44,9 @@ struct mm_struct init_mm = { .mm_lock_seq = SEQCNT_ZERO(init_mm.mm_lock_seq), #endif .user_ns = &init_user_ns, +#ifdef CONFIG_SCHED_MM_CID + .mm_cid.lock = __RAW_SPIN_LOC...
56aca3e0f7308821b6404730a0a6bfd9f26fa04c
Analyze and fix the following issue in the Linux kernel code: net/mlx5e: Use regular ICOSQ for triggering NAPI
Problem Details: Before the cited commit, ICOSQ is used to post NOP WQE to trigger hardware interrupt and start NAPI, but this mechanism suffers from a race condition: mlx5e_alloc_rx_mpwqe may post UMR WQEs to ICOSQ _before_ NOP WQE is posted. The cited commit fixes the issue by replacing ICOSQ with async ICOSQ, as a n...
```diff diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h index ad2bdb041fa3..8f0dd4ccba0f 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h @@ -388,6 +388,7 @@ enum { MLX5E_SQ_STATE_DIM, MLX5E_SQ_STATE...
d837fbee92453fbb829f950c8e7cf76207d73f33
Analyze and fix the following issue in the Linux kernel code: net/sched: qfq: Use cl_is_active to determine whether class is active in qfq_rm_from_ag
Problem Details: This is more of a preventive patch to make the code more consistent and to prevent possible exploits that employ child qlen manipulations on qfq. use cl_is_active instead of relying on the child qdisc's qlen to determine class activation. Fixes: 462dbc9101acd ("pkt_sched: QFQ Plus: fair-queueing servi...
```diff diff --git a/net/sched/sch_qfq.c b/net/sched/sch_qfq.c index 9d59090bbe93..e7778413e72f 100644 --- a/net/sched/sch_qfq.c +++ b/net/sched/sch_qfq.c @@ -373,7 +373,7 @@ static void qfq_rm_from_agg(struct qfq_sched *q, struct qfq_class *cl) /* Deschedule class and remove it from its parent aggregate. */ static v...
50da4b9d07a7a463e2cfb738f3ad4cff6b2c9c3b
Analyze and fix the following issue in the Linux kernel code: net/sched: Enforce that teql can only be used as root qdisc
Problem Details: Design intent of teql is that it is only supposed to be used as root qdisc. We need to check for that constraint. Although not important, I will describe the scenario that unearthed this issue for the curious. GangMin Kim <km.kim1503@gmail.com> managed to concot a scenario as follows: ROOT qdisc 1:0...
```diff diff --git a/net/sched/sch_teql.c b/net/sched/sch_teql.c index 8badec6d82a2..6e4bdaa876ed 100644 --- a/net/sched/sch_teql.c +++ b/net/sched/sch_teql.c @@ -178,6 +178,11 @@ static int teql_qdisc_init(struct Qdisc *sch, struct nlattr *opt, if (m->dev == dev) return -ELOOP; + if (sch->parent != TC_H_ROOT) {...
fab13d738c9bd645965464b881335f580d38a54e
Analyze and fix the following issue in the Linux kernel code: clk: qcom: dispcc-sm7150: Fix dispcc_mdss_pclk1_clk_src
Problem Details: Set CLK_OPS_PARENT_ENABLE to ensure the parent gets prepared and enabled when switching to it. Fixes: e3c13e0caa8c ("clk: qcom: dispcc-sm7150: Fix dispcc_mdss_pclk0_clk_src") Signed-off-by: David Heidelberg <david@ixit.cz> Link: https://lore.kernel.org/r/20260117-sm7150-dispcc-fix-v1-1-2f39966bcad2@ix...
```diff diff --git a/drivers/clk/qcom/dispcc-sm7150.c b/drivers/clk/qcom/dispcc-sm7150.c index 811d380a8e9f..ed8e34ffd69b 100644 --- a/drivers/clk/qcom/dispcc-sm7150.c +++ b/drivers/clk/qcom/dispcc-sm7150.c @@ -371,7 +371,7 @@ static struct clk_rcg2 dispcc_mdss_pclk1_clk_src = { .name = "dispcc_mdss_pclk1_clk_src", ...
dda4bdd325326dd67ae4401f4f3d35b9cf781e3f
Analyze and fix the following issue in the Linux kernel code: arm64: dts: qcom: talos: Drop opp-shared from QUP OPP table
Problem Details: QUP devices are currently marked with opp-shared in their OPP table, causing the kernel to treat them as part of a shared OPP domain. This leads to the qcom_geni_serial driver failing to probe with error -EBUSY (-16). Remove the opp-shared property to ensure the OPP framework treats the QUP OPP table ...
```diff diff --git a/arch/arm64/boot/dts/qcom/talos.dtsi b/arch/arm64/boot/dts/qcom/talos.dtsi index d956c91c7cc8..88980d8c3ee3 100644 --- a/arch/arm64/boot/dts/qcom/talos.dtsi +++ b/arch/arm64/boot/dts/qcom/talos.dtsi @@ -532,7 +532,6 @@ qup_opp_table: opp-table-qup { compatible = "operating-points-v2"; - opp-...
ab9b218a1521133a4410722907fa7189566be9bc
Analyze and fix the following issue in the Linux kernel code: octeontx2: cn10k: fix RX flowid TCAM mask handling
Problem Details: The RX flowid programming initializes the TCAM mask to all ones, but then overwrites it when clearing the MAC DA mask bits. This results in losing the intended initialization and may affect other match fields. Update the code to clear the MAC DA bits using an AND operation, making the handling of mask...
```diff diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c index 4c7e0f345cb5..060c715ebad0 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c @@ -328,7 +32...
d321d505edb64286bae0e464574d0fd553e31adc
Analyze and fix the following issue in the Linux kernel code: selftests: net: csum: Fix printk format in recv_get_packet_csum_status()
Problem Details: Following warning is encountered when building selftests on powerpc/32. CC csum csum.c: In function 'recv_get_packet_csum_status': csum.c:710:50: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Wformat=] 710 | ...
```diff diff --git a/tools/testing/selftests/net/lib/csum.c b/tools/testing/selftests/net/lib/csum.c index 27437590eeb5..e28884ce3ab3 100644 --- a/tools/testing/selftests/net/lib/csum.c +++ b/tools/testing/selftests/net/lib/csum.c @@ -707,7 +707,7 @@ static uint32_t recv_get_packet_csum_status(struct msghdr *msg) ...
2c28769a51deb6022d7fbd499987e237a01dd63a
Analyze and fix the following issue in the Linux kernel code: rxrpc: Fix recvmsg() unconditional requeue
Problem Details: If rxrpc_recvmsg() fails because MSG_DONTWAIT was specified but the call at the front of the recvmsg queue already has its mutex locked, it requeues the call - whether or not the call is already queued. The call may be on the queue because MSG_PEEK was also passed and so the call was not dequeued or b...
```diff diff --git a/include/trace/events/rxrpc.h b/include/trace/events/rxrpc.h index de6f6d25767c..869f97c9bf73 100644 --- a/include/trace/events/rxrpc.h +++ b/include/trace/events/rxrpc.h @@ -322,6 +322,7 @@ EM(rxrpc_call_put_kernel, "PUT kernel ") \ EM(rxrpc_call_put_poke, "PUT poke ") \ EM(rxrpc_call_...
07a1bc5c14c9ef6401b21c1873c6c087075ff292
Analyze and fix the following issue in the Linux kernel code: block: Fix an error path in disk_update_zone_resources()
Problem Details: Any queue_limits_start_update() call must be followed either by a queue_limits_commit_update() call or by a queue_limits_cancel_update() call. Make sure that the error path near the start of disk_update_zone_resources() follows this requirement. Remove the "goto unfreeze" statement from that error path...
```diff diff --git a/block/blk-zoned.c b/block/blk-zoned.c index 1c54678fae6b..8000c94690ee 100644 --- a/block/blk-zoned.c +++ b/block/blk-zoned.c @@ -1957,6 +1957,7 @@ static int disk_update_zone_resources(struct gendisk *disk, disk->nr_zones = args->nr_zones; if (args->nr_conv_zones >= disk->nr_zones) { + queu...
d3ba32162488283c0a4c5bedd8817aec91748802
Analyze and fix the following issue in the Linux kernel code: ipvlan: Make the addrs_lock be per port
Problem Details: Make the addrs_lock be per port, not per ipvlan dev. Initial code seems to be written in the assumption, that any address change must occur under RTNL. But it is not so for the case of IPv6. So 1) Introduce per-port addrs_lock. 2) It was needed to fix places where it was forgotten to take lock (ipvl...
```diff diff --git a/drivers/net/ipvlan/ipvlan.h b/drivers/net/ipvlan/ipvlan.h index 50de3ee204db..80f84fc87008 100644 --- a/drivers/net/ipvlan/ipvlan.h +++ b/drivers/net/ipvlan/ipvlan.h @@ -69,7 +69,6 @@ struct ipvl_dev { DECLARE_BITMAP(mac_filters, IPVLAN_MAC_FILTER_SIZE); netdev_features_t sfeatures; u32 msg...
7a29f6bf60f2590fe5e9c4decb451e19afad2bcf
Analyze and fix the following issue in the Linux kernel code: l2tp: avoid one data-race in l2tp_tunnel_del_work()
Problem Details: We should read sk->sk_socket only when dealing with kernel sockets. syzbot reported the following data-race: BUG: KCSAN: data-race in l2tp_tunnel_del_work / sk_common_release write to 0xffff88811c182b20 of 8 bytes by task 5365 on cpu 0: sk_set_socket include/net/sock.h:2092 [inline] sock_orphan ...
```diff diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c index 70335667ef03..f9b0f666600f 100644 --- a/net/l2tp/l2tp_core.c +++ b/net/l2tp/l2tp_core.c @@ -1416,8 +1416,6 @@ static void l2tp_tunnel_del_work(struct work_struct *work) { struct l2tp_tunnel *tunnel = container_of(work, struct l2tp_tunnel, ...
962ae6892d8bd208b2d1e2b358f07551ddc8d32f
Analyze and fix the following issue in the Linux kernel code: vfio/pci: Lock upstream bridge for vfio_pci_core_disable()
Problem Details: The commit 7e89efc6e9e4 ("Lock upstream bridge for pci_reset_function()") added locking of the upstream bridge to the reset function. To catch paths that are not properly locked, the commit 920f6468924f ("Warn on missing cfg_access_lock during secondary bus reset") added a warning if the PCI configurat...
```diff diff --git a/drivers/vfio/pci/vfio_pci_core.c b/drivers/vfio/pci/vfio_pci_core.c index 3a11e6f450f7..72c33b399800 100644 --- a/drivers/vfio/pci/vfio_pci_core.c +++ b/drivers/vfio/pci/vfio_pci_core.c @@ -588,6 +588,7 @@ EXPORT_SYMBOL_GPL(vfio_pci_core_enable); void vfio_pci_core_disable(struct vfio_pci_core_d...
63faf32666e03a78cc985bcbae196418cf7d7938
Analyze and fix the following issue in the Linux kernel code: pwm: max7360: Populate missing .sizeof_wfhw in max7360_pwm_ops
Problem Details: The sizeof_wfhw field wasn't populated in max7360_pwm_ops so it was set to 0 by default. While this is ok for now because: sizeof(struct max7360_pwm_waveform) < PWM_WFHWSIZE in the future, if struct max7360_pwm_waveform grows, it could lead to stack corruption. Fixes: d93a75d94b79 ("pwm: max7360: Add ...
```diff diff --git a/drivers/pwm/pwm-max7360.c b/drivers/pwm/pwm-max7360.c index 16261958ce7f..732969303dd7 100644 --- a/drivers/pwm/pwm-max7360.c +++ b/drivers/pwm/pwm-max7360.c @@ -153,6 +153,7 @@ static int max7360_pwm_read_waveform(struct pwm_chip *chip, } static const struct pwm_ops max7360_pwm_ops = { + .size...
83c10e8dd43628d0bf86486616556cd749a3c310
Analyze and fix the following issue in the Linux kernel code: dm-unstripe: fix mapping bug when there are multiple targets in a table
Problem Details: The "unstriped" device-mapper target incorrectly calculates the sector offset on the mapped device when the target's origin is not zero. Take for example this hypothetical concatenation of the members of a two-disk RAID0: linearized: 0 2097152 unstriped 2 128 0 /dev/md/raid0 0 linearized: 20971...
```diff diff --git a/drivers/md/dm-unstripe.c b/drivers/md/dm-unstripe.c index e8a9432057dc..17be48359564 100644 --- a/drivers/md/dm-unstripe.c +++ b/drivers/md/dm-unstripe.c @@ -117,7 +117,7 @@ static void unstripe_dtr(struct dm_target *ti) static sector_t map_to_core(struct dm_target *ti, struct bio *bio) { struc...
a5d8b9d94e1863f3ebb7182c238b2c713f6f4efd
Analyze and fix the following issue in the Linux kernel code: f2fs: fix to unlock folio in f2fs_read_data_large_folio()
Problem Details: We missed to unlock folio in error path of f2fs_read_data_large_folio(), fix it. With below testcase, it can reproduce the bug. touch /mnt/f2fs/file truncate -s $((1024*1024*1024)) /mnt/f2fs/file f2fs_io setflags immutable /mnt/f2fs/file sync echo 3 > /proc/sys/vm/drop_caches time dd if=/mnt/f2fs/fil...
```diff diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index d685c889f7b6..d509172b51df 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -2453,11 +2453,11 @@ static int f2fs_read_data_large_folio(struct inode *inode, int ret = 0; bool folio_in_bio; - if (!IS_IMMUTABLE(inode)) - return -EOPNOTSUPP; - - if (f2fs_...