id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
d499e9627d70b1269020d59b95ed3e18bee6b8cd | Analyze and fix the following issue in the Linux kernel code: arm64/scs: Fix handling of advance_loc4 | Problem Details:
DW_CFA_advance_loc4 is defined but no handler is implemented. Its
CFA opcode defaults to EDYNSCS_INVALID_CFA_OPCODE triggering an
error which wrongfully prevents modules from loading.
Link: https://bugs.gentoo.org/971060
Signed-off-by: Pepper Gray <hello@peppergray.xyz>
Signed-off-by: Will Deacon <wil... | ```diff
diff --git a/arch/arm64/kernel/pi/patch-scs.c b/arch/arm64/kernel/pi/patch-scs.c
index bbe7d30ed12b..dac568e4a54f 100644
--- a/arch/arm64/kernel/pi/patch-scs.c
+++ b/arch/arm64/kernel/pi/patch-scs.c
@@ -192,6 +192,14 @@ static int scs_handle_fde_frame(const struct eh_frame *frame,
size -= 2;
break;
+ ... |
5ef268cb7a0aac55521fd9881f1939fa94a8988e | Analyze and fix the following issue in the Linux kernel code: kprobes: Remove unneeded warnings from __arm_kprobe_ftrace() | Problem Details:
Remove unneeded warnings for handled errors from __arm_kprobe_ftrace()
because all caller handled the error correctly.
Link: https://lore.kernel.org/all/177261531182.1312989.8737778408503961141.stgit@mhiramat.tok.corp.google.com/
Reported-by: Zw Tang <shicenci@gmail.com>
Closes: https://lore.kernel.o... | ```diff
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index 025af57ad3ed..bfc89083daa9 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -1144,12 +1144,12 @@ static int __arm_kprobe_ftrace(struct kprobe *p, struct ftrace_ops *ops,
lockdep_assert_held(&kprobe_mutex);
ret = ftrace_set_filter_ip(ops, (unsig... |
e113f0b46d19626ec15388bcb91432c9a4fd6261 | Analyze and fix the following issue in the Linux kernel code: kprobes: avoid crash when rmmod/insmod after ftrace killed | Problem Details:
After we hit ftrace is killed by some errors, the kernel crash if
we remove modules in which kprobe probes.
BUG: unable to handle page fault for address: fffffbfff805000d
PGD 817fcc067 P4D 817fcc067 PUD 817fc8067 PMD 101555067 PTE 0
Oops: Oops: 0000 [#1] SMP KASAN PTI
CPU: 4 UID: 0 PID: 2012 Comm: rmm... | ```diff
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index ab25b4aa9095..025af57ad3ed 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -1178,6 +1178,10 @@ static int __disarm_kprobe_ftrace(struct kprobe *p, struct ftrace_ops *ops,
int ret;
lockdep_assert_held(&kprobe_mutex);
+ if (unlikely(kprobe_ftrac... |
d3947aac97c3e57ee2f85fd1bef8e7674e609c45 | Analyze and fix the following issue in the Linux kernel code: wifi: nl80211: reject S1G/60G with HT chantype | Problem Details:
This configuration doesn't make sense, neither S1G nor
60G have 20 or 40 MHz channel width. Reject it to not
run into the new cfg80211_chandef_create() warning.
Fixes: 92d77e06e73c ("wifi: cfg80211: restrict cfg80211_chandef_create() to only HT-based bands")
Signed-off-by: Johannes Berg <johannes.berg... | ```diff
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 3e867930e253..d2ef13ab1a20 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3634,6 +3634,9 @@ static int _nl80211_parse_chandef(struct cfg80211_registered_device *rdev,
case NL80211_CHAN_HT20:
case NL80211_CHAN_HT40PLUS... |
7d73872d949c488a1d7c308031d6a9d89b5e0a8b | Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: check tdls flag in ieee80211_tdls_oper | Problem Details:
When NL80211_TDLS_ENABLE_LINK is called, the code only checks if the
station exists but not whether it is actually a TDLS station. This
allows the operation to proceed for non-TDLS stations, causing
unintended side effects like modifying channel context and HT
protection before failing.
Add a check fo... | ```diff
diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c
index dbbfe2d6842f..1dca2fae05a5 100644
--- a/net/mac80211/tdls.c
+++ b/net/mac80211/tdls.c
@@ -1449,7 +1449,7 @@ int ieee80211_tdls_oper(struct wiphy *wiphy, struct net_device *dev,
}
sta = sta_info_get(sdata, peer);
- if (!sta)
+ if (!sta || !st... |
cb0caadb64ca0894c4a24e1a34841f260d462f90 | Analyze and fix the following issue in the Linux kernel code: wifi: ieee80211: fix definition of EHT-MCS 15 in MRU | Problem Details:
According to the definition in IEEE Std 802.11be-2024, Table 9-417r, each
bit indicates support for the transmission and reception of EHT-MCS 15 in:
- B0: 52+26-tone and 106+26-tone MRUs.
- B1: a 484+242-tone MRU if 80 MHz is supported.
- B2: a 996+484-tone MRU and a 996+484+242-tone MRU if 160 MHz is
... | ```diff
diff --git a/include/linux/ieee80211-eht.h b/include/linux/ieee80211-eht.h
index f8e9f5d36d2a..a97b1d01f3ac 100644
--- a/include/linux/ieee80211-eht.h
+++ b/include/linux/ieee80211-eht.h
@@ -251,8 +251,8 @@ struct ieee80211_eht_operation_info {
#define IEEE80211_EHT_PHY_CAP5_SUPP_EXTRA_EHT_LTF 0x40
#define I... |
e41e992cb6534cac3a21a02d005c714f7f923653 | Analyze and fix the following issue in the Linux kernel code: drm/i915/dp_mst: Fix forced link retrain handling in MST HPD IRQ handler | Problem Details:
Handling of a forced link retraining debugfs request via the DP MST HPD
IRQ handler is incorrectly skipped, if the IRQ handler doesn't see any
HPD IRQs raised by the sink. Fix this by ensuring that the request is
always handled (in the Fixes: commit below by directly calling
intel_dp_check_link_state()... | ```diff
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index fbb5e2f9c241..2ae030eda73e 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -5575,11 +5575,13 @@ static bool
intel_dp_check_mst_status(struct intel_dp *intel... |
fc1cd1f18c34f91e78362f9629ab9fd43b9dcab9 | Analyze and fix the following issue in the Linux kernel code: btrfs: tree-checker: fix misleading root drop_level error message | Problem Details:
Fix tree-checker error message to report "invalid root drop_level"
instead of the misleading "invalid root level".
Fixes: 259ee7754b67 ("btrfs: tree-checker: Add ROOT_ITEM check")
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: ZhengYuan Huang <gality369@gmail.com>
Reviewed-by: David Sterba <dste... | ```diff
diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
index ac4c4573ee39..516ef62c8f43 100644
--- a/fs/btrfs/tree-checker.c
+++ b/fs/btrfs/tree-checker.c
@@ -1284,7 +1284,7 @@ static int check_root_item(struct extent_buffer *leaf, struct btrfs_key *key,
}
if (unlikely(btrfs_root_drop_level(&ri) >= ... |
9573a365ff9ff45da9222d3fe63695ce562beb24 | Analyze and fix the following issue in the Linux kernel code: btrfs: log new dentries when logging parent dir of a conflicting inode | Problem Details:
If we log the parent directory of a conflicting inode, we are not logging
the new dentries of the directory, so when we finish we have the parent
directory's inode marked as logged but we did not log its new dentries.
As a consequence if the parent directory is explicitly fsynced later and
it does not ... | ```diff
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index e1bd03ebfd98..37c272df52b0 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -6195,6 +6195,7 @@ static int log_conflicting_inodes(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
struct btrfs_log_ctx *ctx)
{
+ cons... |
77603ab10429fe713a03345553ca8dbbfb1d91c6 | Analyze and fix the following issue in the Linux kernel code: btrfs: don't take device_list_mutex when querying zone info | Problem Details:
Shin'ichiro reported sporadic hangs when running generic/013 in our CI
system. When enabling lockdep, there is a lockdep splat when calling
btrfs_get_dev_zone_info_all_devices() in the mount path that can be
triggered by i.e. generic/013:
======================================================
WARN... | ```diff
diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c
index ad8621587fd2..92b5ac8fac37 100644
--- a/fs/btrfs/zoned.c
+++ b/fs/btrfs/zoned.c
@@ -337,7 +337,10 @@ int btrfs_get_dev_zone_info_all_devices(struct btrfs_fs_info *fs_info)
if (!btrfs_fs_incompat(fs_info, ZONED))
return 0;
- mutex_lock(&fs_devices->de... |
daf8e3b253aa760ff9e96c7768a464bc1d6b3c90 | Analyze and fix the following issue in the Linux kernel code: xfrm: Fix work re-schedule after cancel in xfrm_nat_keepalive_net_fini() | Problem Details:
After cancel_delayed_work_sync() is called from
xfrm_nat_keepalive_net_fini(), xfrm_state_fini() flushes remaining
states via __xfrm_state_delete(), which calls
xfrm_nat_keepalive_state_updated() to re-schedule nat_keepalive_work.
The following is a simple race scenario:
cpu0 ... | ```diff
diff --git a/net/xfrm/xfrm_nat_keepalive.c b/net/xfrm/xfrm_nat_keepalive.c
index ebf95d48e86c..1856beee0149 100644
--- a/net/xfrm/xfrm_nat_keepalive.c
+++ b/net/xfrm/xfrm_nat_keepalive.c
@@ -261,7 +261,7 @@ int __net_init xfrm_nat_keepalive_net_init(struct net *net)
int xfrm_nat_keepalive_net_fini(struct net... |
606a6b8bca570aa4f838ddd410345a2937bd98eb | Analyze and fix the following issue in the Linux kernel code: dt-bindings: serial: 8250: spacemit: fix clock property for K3 SoC | Problem Details:
The UART of SpacemiT K3 SoC has same clock property as K1 generation which
request two clock sources, fix the binding otherwise will get DT check
warnings.
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/r/20260304-0... | ```diff
diff --git a/Documentation/devicetree/bindings/serial/8250.yaml b/Documentation/devicetree/bindings/serial/8250.yaml
index 73851f19330d..e9e07c2356bc 100644
--- a/Documentation/devicetree/bindings/serial/8250.yaml
+++ b/Documentation/devicetree/bindings/serial/8250.yaml
@@ -63,7 +63,9 @@ allOf:
propertie... |
94645aa41bf9ecb87c2ce78b1c3405bfb6074a37 | Analyze and fix the following issue in the Linux kernel code: mtd: spi-nor: swp: check SR_TB flag when getting tb_mask | Problem Details:
When the chip does not support top/bottom block protect, the tb_mask
must be set to 0, otherwise SR1 bit5 will be unexpectedly modified.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Fixes: 3dd8012a8eeb ("mtd: spi-nor: add TB (Top/Bottom) protect support")
Reviewed-by: Michael Walle <mwalle@kern... | ```diff
diff --git a/drivers/mtd/spi-nor/swp.c b/drivers/mtd/spi-nor/swp.c
index 9b07f83aeac7..e67a81dbb6bf 100644
--- a/drivers/mtd/spi-nor/swp.c
+++ b/drivers/mtd/spi-nor/swp.c
@@ -28,8 +28,10 @@ static u8 spi_nor_get_sr_tb_mask(struct spi_nor *nor)
{
if (nor->flags & SNOR_F_HAS_SR_TB_BIT6)
return SR_TB_BIT6;
-... |
6d660fba6a32a34ad7d746d7f65317831daaf033 | Analyze and fix the following issue in the Linux kernel code: mtd: spi-nor: micron-st: add SNOR_CMD_PP_8_8_8_DTR sfdp fixup for mt35xu512aba | Problem Details:
Find two batches mt35xu512aba has different SFDP but with same
jedec ID. The batch which use the new version of SFDP contain
all the necessary information to support OCT DTR mode. The batch
with old version do not contain the OCT DTR command information,
but in fact it did support OCT DTR mode.
Curren... | ```diff
diff --git a/drivers/mtd/spi-nor/micron-st.c b/drivers/mtd/spi-nor/micron-st.c
index 88033384a71e..b2b473501d02 100644
--- a/drivers/mtd/spi-nor/micron-st.c
+++ b/drivers/mtd/spi-nor/micron-st.c
@@ -167,6 +167,16 @@ static int mt35xu512aba_post_sfdp_fixup(struct spi_nor *nor)
0, 20, SPINOR_OP_MT_DTR_RD,
... |
3620d67b48493c6252bbc873dc88dde81641d56b | Analyze and fix the following issue in the Linux kernel code: mtd: spi-nor: update spi_nor_fixups::post_sfdp() documentation | Problem Details:
After commit 5273cc6df984 ("mtd: spi-nor: core: Call
spi_nor_post_sfdp_fixups() only when SFDP is defined")
spi_nor_post_sfdp_fixups() isn't called anymore if no SFDP is detected.
Update the documentation accordingly.
Fixes: 5273cc6df984 ("mtd: spi-nor: core: Call spi_nor_post_sfdp_fixups() only when... | ```diff
diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h
index 16b382d4f04f..e838c40a2589 100644
--- a/drivers/mtd/spi-nor/core.h
+++ b/drivers/mtd/spi-nor/core.h
@@ -413,7 +413,7 @@ struct spi_nor_flash_parameter {
* number of dummy cycles in read register ops.
* @smpt_map_id:... |
756564a536ecd8c9d33edd89f0647a91a0b03587 | Analyze and fix the following issue in the Linux kernel code: mtd: spi-nor: core: correct the op.dummy.nbytes when check read operations | Problem Details:
When check read operation, need to setting the op.dummy.nbytes based
on current read operation rather than the nor->read_proto.
Fixes: 0e30f47232ab ("mtd: spi-nor: add support for DTR protocol")
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Reviewed-by: Pratyush Yadav <pratyush@kernel.org>
Signed-off... | ```diff
diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
index 8ffeb41c3e08..e6c1fda61f57 100644
--- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c
@@ -2393,7 +2393,7 @@ static int spi_nor_spimem_check_readop(struct spi_nor *nor,
/* convert the dummy cycles to the number of bytes */... |
7dad18a179741dbad9f40799e549fa9111987c0c | Analyze and fix the following issue in the Linux kernel code: soc: fsl: qe_ports_ic: Add missing cleanup on device removal | Problem Details:
Add a devm action handler to properly clean up the irq_domain and
chained handler when the device is removed.
Fixes: f0bcd784e1b7 ("soc: fsl: qe: Add an interrupt controller for QUICC Engine Ports")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Link: https://lore.kernel.org/r/20260310-qe_ports_ic-v1-1-6... | ```diff
diff --git a/drivers/soc/fsl/qe/qe_ports_ic.c b/drivers/soc/fsl/qe/qe_ports_ic.c
index 8e2107e2cde5..5e3fae19f314 100644
--- a/drivers/soc/fsl/qe/qe_ports_ic.c
+++ b/drivers/soc/fsl/qe/qe_ports_ic.c
@@ -17,6 +17,7 @@
struct qepic_data {
void __iomem *reg;
struct irq_domain *host;
+ int irq;
};
static v... |
3962c24f2d14e8a7f8a23f56b7ce320523947342 | Analyze and fix the following issue in the Linux kernel code: pwm: imx-tpm: Count the number of enabled channels in probe | Problem Details:
On a soft reset TPM PWM IP may preserve its internal state from previous
runtime, therefore on a subsequent OS boot and driver probe
"enable_count" value and TPM PWM IP internal channels "enabled" states
may get unaligned. In consequence on a suspend/resume cycle the call "if
(--tpm->enable_count == 0)... | ```diff
diff --git a/drivers/pwm/pwm-imx-tpm.c b/drivers/pwm/pwm-imx-tpm.c
index 5b399de16d60..80fdb3303400 100644
--- a/drivers/pwm/pwm-imx-tpm.c
+++ b/drivers/pwm/pwm-imx-tpm.c
@@ -352,7 +352,7 @@ static int pwm_imx_tpm_probe(struct platform_device *pdev)
struct clk *clk;
void __iomem *base;
int ret;
- unsigned... |
1120a36bb1e9b9e22de75ecb4ef0b998f73a97f1 | Analyze and fix the following issue in the Linux kernel code: lib/bootconfig: fix snprintf truncation check in xbc_node_compose_key_after() | Problem Details:
snprintf() returns the number of characters that would have been
written excluding the NUL terminator. Output is truncated when the
return value is >= the buffer size, not just > the buffer size.
When ret == size, the current code takes the non-truncated path,
advancing buf by ret and reducing size t... | ```diff
diff --git a/lib/bootconfig.c b/lib/bootconfig.c
index 9c3d59fb96ed..2da049216fe0 100644
--- a/lib/bootconfig.c
+++ b/lib/bootconfig.c
@@ -316,7 +316,7 @@ int __init xbc_node_compose_key_after(struct xbc_node *root,
depth ? "." : "");
if (ret < 0)
return ret;
- if (ret > size) {
+ if (ret >=... |
560f763baa0f2c9a44da4294c06af071405ac46f | Analyze and fix the following issue in the Linux kernel code: lib/bootconfig: check bounds before writing in __xbc_open_brace() | Problem Details:
The bounds check for brace_index happens after the array write.
While the current call pattern prevents an actual out-of-bounds
access (the previous call would have returned an error), the
write-before-check pattern is fragile and would become a real
out-of-bounds write if the error return were ever no... | ```diff
diff --git a/lib/bootconfig.c b/lib/bootconfig.c
index ce25714351d5..9c3d59fb96ed 100644
--- a/lib/bootconfig.c
+++ b/lib/bootconfig.c
@@ -532,9 +532,9 @@ static char *skip_spaces_until_newline(char *p)
static int __init __xbc_open_brace(char *p)
{
/* Push the last key as open brace */
- open_brace[brace_in... |
5eb608319bb56464674a71b4a66ea65c6c435d64 | Analyze and fix the following issue in the Linux kernel code: vt: save/restore unicode screen buffer for alternate screen | Problem Details:
The alternate screen support added by commit 23743ba64709 ("vt: add
support for smput/rmput escape codes") only saves and restores the
regular screen buffer (vc_origin), but completely ignores the corresponding
unicode screen buffer (vc_uni_lines) creating a messed-up display.
Add vc_saved_uni_lines t... | ```diff
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index c1f152d8b03b..e2df99e3d458 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -1339,6 +1339,8 @@ struct vc_data *vc_deallocate(unsigned int currcons)
kfree(vc->vc_saved_screen);
vc->vc_saved_screen = NULL;
}
+ vc_uniscr_free(vc-... |
6ee0792d83d5c690205c350825a4c30746c0e0a2 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: ti: k3-am62a7-sk: Fix pin name in comment from M19 to N22 | Problem Details:
The pin for GPMC0_CLK.GPIO0_31 at address 0x000F407C is N22 and not M19.
Hence, fix the pin name in the comment to avoid confusion.
Fixes: 8f023012eb4a ("arm64: dts: ti: k3-am62a: Enable UHS mode support for SD cards")
Cc: stable@vger.kernel.org
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
... | ```diff
diff --git a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
index e99bdbc2e0cb..b1a6f10adf26 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts
@@ -398,7 +398,7 @@
vddshv_sdio_pins_default: vddshv-sdio-default-pins {
pinct... |
cbfea84f820962c3c5394ff06e7e9344c96bf761 | Analyze and fix the following issue in the Linux kernel code: soundwire: cadence: Clear message complete before signaling waiting thread | Problem Details:
Clear the CDNS_MCP_INT_RX_WL interrupt before signaling completion.
This is to prevent the potential race where:
- The main thread is scheduled immediately the completion is signaled,
and starts a new message
- The RX_WL IRQ for this new message happens before sdw_cdns_irq() has
been re-scheduled... | ```diff
diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c
index f245c3ffb9e9..b8b62735c893 100644
--- a/drivers/soundwire/cadence_master.c
+++ b/drivers/soundwire/cadence_master.c
@@ -933,6 +933,14 @@ irqreturn_t sdw_cdns_irq(int irq, void *dev_id)
cdns_read_response(cdns);
+ ... |
82f73ef9c41e0623e0a8bdce4fa44a7237709f0c | Analyze and fix the following issue in the Linux kernel code: powerpc/iommu: fix lockdep warning during PCI enumeration | Problem Details:
Commit a75b2be249d6 ("iommu: Add iommu_driver_get_domain_for_dev()
helper") introduced iommu_driver_get_domain_for_dev() for driver
code paths that hold iommu_group->mutex while attaching a device
to an IOMMU domain.
The same commit also added a lockdep assertion in
iommu_get_domain_for_dev() to ensur... | ```diff
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index 0ce71310b7d9..d122e8447831 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -1159,7 +1159,7 @@ spapr_tce_platform_iommu_attach_dev(struct iommu_domain *platform_domain,
struct device *dev,
... |
341a2c99c87ce6f62c6f4423fa641a39f0966bff | Analyze and fix the following issue in the Linux kernel code: drm/xe/uapi: Fix kernel-doc for DRM_XE_VM_BIND_FLAG_DECOMPRESS | Problem Details:
There is kernel-doc warning for DRM_XE_VM_BIND_FLAG_DECOMPRESS:
./include/uapi/drm/xe_drm.h:1060: WARNING: Block quote ends without
a blank line; unexpected unindent.
Fix the warning by adding the missing '%' prefix to
DRM_XE_VM_BIND_FLAG_DECOMPRESS in the kernel-doc list entry for
struct drm_xe_... | ```diff
diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
index 0497b85fa12a..f8b2afb20540 100644
--- a/include/uapi/drm/xe_drm.h
+++ b/include/uapi/drm/xe_drm.h
@@ -1057,7 +1057,7 @@ struct drm_xe_vm_destroy {
* not invoke autoreset. Neither will stack variables going out of scope.
* Therefo... |
ba9d121f85771cce38012d1bee59d7399250e4a5 | Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: refactor chandef tracing macros | Problem Details:
We don't need to duplicate the macros, just make a generic
one that gets the name prefix to be used, and use that to
create the others. While at it, add the puncturing bitmap
to the trace and simplify the ternary expressions.
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Lin... | ```diff
diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
index c04d4547e8f4..1f0c07eaad1b 100644
--- a/net/mac80211/trace.h
+++ b/net/mac80211/trace.h
@@ -2,7 +2,7 @@
/*
* Portions of this file
* Copyright(c) 2016-2017 Intel Deutschland GmbH
- * Copyright (C) 2018 - 2024 Intel Corporation
+ * Copyright (C)... |
99600f79b28c83c68bae199a3d8e95049a758308 | Analyze and fix the following issue in the Linux kernel code: mpls: add missing unregister_netdevice_notifier to mpls_init | Problem Details:
If mpls_init() fails after registering mpls_dev_notifier, it never
gets removed. Add the missing unregister_netdevice_notifier() call to
the error handling path.
Fixes: 5be2062e3080 ("mpls: Handle error of rtnl_register_module().")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Link: https://patc... | ```diff
diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c
index ef9e749d5e08..d5417688f69e 100644
--- a/net/mpls/af_mpls.c
+++ b/net/mpls/af_mpls.c
@@ -2854,6 +2854,7 @@ out_unregister_rtnl_af:
rtnl_af_unregister(&mpls_af_ops);
out_unregister_dev_type:
dev_remove_pack(&mpls_packet_type);
+ unregister_netdevice_... |
8431c602f551549f082bbfa67f3003f2d8e3e132 | Analyze and fix the following issue in the Linux kernel code: ip_tunnel: adapt iptunnel_xmit_stats() to NETDEV_PCPU_STAT_DSTATS | Problem Details:
Blamed commits forgot that vxlan/geneve use udp_tunnel[6]_xmit_skb() which
call iptunnel_xmit_stats().
iptunnel_xmit_stats() was assuming tunnels were only using
NETDEV_PCPU_STAT_TSTATS.
@syncp offset in pcpu_sw_netstats and pcpu_dstats is different.
32bit kernels would either have corruptions or fr... | ```diff
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index ae269a2e7f4d..d7aac6f185bc 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2155,6 +2155,7 @@ struct net_device {
unsigned long state;
unsigned int flags;
unsigned short hard_header_len;
+ enum netdev_sta... |
e1f0a18c9564cdb16523c802e2c6fe5874e3d944 | Analyze and fix the following issue in the Linux kernel code: net/rose: fix NULL pointer dereference in rose_transmit_link on reconnect | Problem Details:
syzkaller reported a bug [1], and the reproducer is available at [2].
ROSE sockets use four sk->sk_state values: TCP_CLOSE, TCP_LISTEN,
TCP_SYN_SENT, and TCP_ESTABLISHED. rose_connect() already rejects
calls for TCP_ESTABLISHED (-EISCONN) and TCP_CLOSE with SS_CONNECTING
(-ECONNREFUSED), but lacks a c... | ```diff
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c
index 841d62481048..ba56213e0a2a 100644
--- a/net/rose/af_rose.c
+++ b/net/rose/af_rose.c
@@ -811,6 +811,11 @@ static int rose_connect(struct socket *sock, struct sockaddr_unsized *uaddr, int
goto out_release;
}
+ if (sk->sk_state == TCP_SYN_SENT) {
+ ... |
3715a00855316066cdda69d43648336367422127 | Analyze and fix the following issue in the Linux kernel code: bridge: cfm: Fix race condition in peer_mep deletion | Problem Details:
When a peer MEP is being deleted, cancel_delayed_work_sync() is called
on ccm_rx_dwork before freeing. However, br_cfm_frame_rx() runs in
softirq context under rcu_read_lock (without RTNL) and can re-schedule
ccm_rx_dwork via ccm_rx_timer_start() between cancel_delayed_work_sync()
returning and kfree_r... | ```diff
diff --git a/net/bridge/br_cfm.c b/net/bridge/br_cfm.c
index 2c70fe47de38..118c7ea48c35 100644
--- a/net/bridge/br_cfm.c
+++ b/net/bridge/br_cfm.c
@@ -576,7 +576,7 @@ static void mep_delete_implementation(struct net_bridge *br,
/* Empty and free peer MEP list */
hlist_for_each_entry_safe(peer_mep, n_store... |
39ebc8d7f561e1b64eca87353ef9b18e2825e591 | Analyze and fix the following issue in the Linux kernel code: lib/bootconfig: fix off-by-one in xbc_verify_tree() unclosed brace error | Problem Details:
__xbc_open_brace() pushes entries with post-increment
(open_brace[brace_index++]), so brace_index always points one past
the last valid entry. xbc_verify_tree() reads open_brace[brace_index]
to report which brace is unclosed, but this is one past the last
pushed entry and contains stale/zero data, cau... | ```diff
diff --git a/lib/bootconfig.c b/lib/bootconfig.c
index 449369a60846..ce25714351d5 100644
--- a/lib/bootconfig.c
+++ b/lib/bootconfig.c
@@ -802,7 +802,7 @@ static int __init xbc_verify_tree(void)
/* Brace closing */
if (brace_index) {
- n = &xbc_nodes[open_brace[brace_index]];
+ n = &xbc_nodes[open_brace... |
e3a5b7f8ef2abe7b119c1806ee214d648289faf6 | Analyze and fix the following issue in the Linux kernel code: genetlink: apply reject policy for split ops on the dispatch path | Problem Details:
Commit 4fa86555d1cd ("genetlink: piggy back on resv_op to default to
a reject policy") added genl_policy_reject_all to ensure that ops
without an explicit policy reject all attributes rather than silently
accepting them. This change was applied to net.
When split ops were later introduced in net-next ... | ```diff
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index c00f0586c8d6..d251d894afd4 100644
--- a/net/netlink/genetlink.c
+++ b/net/netlink/genetlink.c
@@ -244,6 +244,7 @@ genl_get_cmd_split(u32 cmd, u8 flag, const struct genl_family *family,
if (family->split_ops[i].cmd == cmd &&
family->s... |
6e263aadbaf231bbb73e1fed048b3e3591f06264 | Analyze and fix the following issue in the Linux kernel code: net: phy: vitesse: add inband caps and configuration | Problem Details:
Add support for VSC8662 reporting its inband capabilities, and also
hook to configure the PHY's inband mode.
This fixes a regression in the macb driver caused by commit
1338cfef1ff1 ("net: macb: fix SGMII with inband aneg disabled")
Cc: stable+noautosel@kernel.org # neither this nor commit under fixe... | ```diff
diff --git a/drivers/net/phy/vitesse.c b/drivers/net/phy/vitesse.c
index b1b7bbba284e..1a430e832f66 100644
--- a/drivers/net/phy/vitesse.c
+++ b/drivers/net/phy/vitesse.c
@@ -62,6 +62,13 @@
/* Vitesse Extended Page Access Register */
#define MII_VSC82X4_EXT_PAGE_ACCESS 0x1f
+/* Vitesse VSC8662 extended cont... |
00699d944836576d2789eb0cf02d989b975375d7 | Analyze and fix the following issue in the Linux kernel code: docs: octeontx2: fix typo in documentation | Problem Details:
Fix spelling mistake "Crate" to "Create" in the documentation.
Signed-off-by: ShravyaPanchagiri <shravy112@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260311030450.8461-1-shravy112@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org> | ```diff
diff --git a/Documentation/networking/device_drivers/ethernet/marvell/octeontx2.rst b/Documentation/networking/device_drivers/ethernet/marvell/octeontx2.rst
index a52850602cd8..c31c6c197cdb 100644
--- a/Documentation/networking/device_drivers/ethernet/marvell/octeontx2.rst
+++ b/Documentation/networking/device_... |
158ecce9c32abf860d8d76ddc206fb34c2530ac8 | Analyze and fix the following issue in the Linux kernel code: ARM: dts: omap: dm816x: Correct pinctrl register | Problem Details:
The declaration in the pinmux device for the pinctrl registers is not
correct. These registers are actually 32 bits wide, not 16. Also the
mask for functional bits is also wrong. Functional bits are 0-4, not
0-3. So the mask needs to changed to 0x1f.
This information is taken from the TMS320DM816x DaV... | ```diff
diff --git a/arch/arm/boot/dts/ti/omap/dm816x.dtsi b/arch/arm/boot/dts/ti/omap/dm816x.dtsi
index 407d7bc5b13a..a1e0e904e0f0 100644
--- a/arch/arm/boot/dts/ti/omap/dm816x.dtsi
+++ b/arch/arm/boot/dts/ti/omap/dm816x.dtsi
@@ -94,8 +94,8 @@
#address-cells = <1>;
#size-cells = <0>;
#pinctrl-cells = <1... |
2f34c2e609540c6bf806261e2f9a9d8f77b388ef | Analyze and fix the following issue in the Linux kernel code: s390/pgtable: Use set_pmd_bit() to invalidate PMD entry | Problem Details:
Commit 3a5a8d343e1c ("mm: fix race between __split_huge_pmd_locked()
and GUP-fast") failed to follow the convention and used direct PMD
entry modification instead of set_pmd_bit().
Reviewed-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Li... | ```diff
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index 1c3c3be93be9..04ec9fee6498 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -1744,10 +1744,10 @@ static inline pmd_t pmdp_huge_clear_flush(struct vm_area_struct *vma,
static inline pmd_t pm... |
e5b31d988a41549037b8d8721a3c3cae893d8670 | Analyze and fix the following issue in the Linux kernel code: af_unix: Give up GC if MSG_PEEK intervened. | Problem Details:
Igor Ushakov reported that GC purged the receive queue of
an alive socket due to a race with MSG_PEEK with a nice repro.
This is the exact same issue previously fixed by commit
cbcf01128d0a ("af_unix: fix garbage collect vs MSG_PEEK").
After GC was replaced with the current algorithm, the cited
commi... | ```diff
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 7eaa5b187fef..b23c33df8b46 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -1958,6 +1958,8 @@ static void unix_detach_fds(struct scm_cookie *scm, struct sk_buff *skb)
static void unix_peek_fds(struct scm_cookie *scm, struct sk_buff *skb)
{... |
9f49e185ee31d5d5fc8ea1a23aaaba5a4374a949 | Analyze and fix the following issue in the Linux kernel code: drm/xe/wa: Drop redundant entries for Wa_16021867713 & Wa_14019449301 | Problem Details:
The Xe2_HPM-specific RTP table entries for Wa_16021867713 and
Wa_14019449301 were removed by commit 941f538b0af8 ("drm/xe: Consolidate
workaround entries for Wa_16021867713") and commit aa0f0a678370
("drm/xe: Consolidate workaround entries for Wa_14019449301") in favor
of alternate entries earlier in t... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_wa.c b/drivers/gpu/drm/xe/xe_wa.c
index 0eb96abc27df..d2fc1f50c508 100644
--- a/drivers/gpu/drm/xe/xe_wa.c
+++ b/drivers/gpu/drm/xe/xe_wa.c
@@ -263,20 +263,6 @@ static const struct xe_rtp_entry_sr gt_was[] = {
LSN_DIM_Z_WGT(1)))
},
- /* Xe2_HPM */
-
- { XE_RTP_NAME... |
99b2c531e0e797119ae1b9195a8764ee98b00e65 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: qca: fix ROM version reading on WCN3998 chips | Problem Details:
WCN3998 uses a bit different format for rom version:
[ 5.479978] Bluetooth: hci0: setting up wcn399x
[ 5.633763] Bluetooth: hci0: QCA Product ID :0x0000000a
[ 5.645350] Bluetooth: hci0: QCA SOC Version :0x40010224
[ 5.650906] Bluetooth: hci0: QCA ROM Version :0x00001001
[ 5.665173] ... | ```diff
diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c
index 74f820e89655..3b0626920193 100644
--- a/drivers/bluetooth/btqca.c
+++ b/drivers/bluetooth/btqca.c
@@ -787,6 +787,8 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate,
*/
if (soc_type == QCA_WCN3988)
rom_ver = ((soc_ver & ... |
dd815e6e3918dc75a49aaabac36e4f024d675101 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: L2CAP: Validate L2CAP_INFO_RSP payload length before access | Problem Details:
l2cap_information_rsp() checks that cmd_len covers the fixed
l2cap_info_rsp header (type + result, 4 bytes) but then reads
rsp->data without verifying that the payload is present:
- L2CAP_IT_FEAT_MASK calls get_unaligned_le32(rsp->data), which reads
4 bytes past the header (needs cmd_len >= 8).
... | ```diff
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 08a12515bfed..5deb6c4f1e41 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -4612,7 +4612,8 @@ static inline int l2cap_information_rsp(struct l2cap_conn *conn,
switch (type) {
case L2CAP_IT_FEAT_MASK:
- ... |
15145675690cab2de1056e7ed68e59cbd0452529 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: L2CAP: Fix type confusion in l2cap_ecred_reconf_rsp() | Problem Details:
l2cap_ecred_reconf_rsp() casts the incoming data to struct
l2cap_ecred_conn_rsp (the ECRED *connection* response, 8 bytes with
result at offset 6) instead of struct l2cap_ecred_reconf_rsp (2 bytes
with result at offset 0).
This causes two problems:
- The sizeof(*rsp) length check requires 8 bytes in... | ```diff
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 9d5b8d4d375a..08a12515bfed 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -5428,7 +5428,7 @@ static inline int l2cap_ecred_reconf_rsp(struct l2cap_conn *conn,
u8 *data)
{
struct l2cap_chan *chan, *t... |
5b3e2052334f2ff6d5200e952f4aa66994d09899 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: L2CAP: Fix accepting multiple L2CAP_ECRED_CONN_REQ | Problem Details:
Currently the code attempts to accept requests regardless of the
command identifier which may cause multiple requests to be marked
as pending (FLAG_DEFER_SETUP) which can cause more than
L2CAP_ECRED_MAX_CID(5) to be allocated in l2cap_ecred_rsp_defer
causing an overflow.
The spec is quite clear that t... | ```diff
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 780136e18aae..9d5b8d4d375a 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -5055,7 +5055,7 @@ static inline int l2cap_ecred_conn_req(struct l2cap_conn *conn,
u16 mtu, mps;
__le16 psm;
u8 result, rsp_len ... |
752a6c9596dd25efd6978a73ff21f3b592668f4a | Analyze and fix the following issue in the Linux kernel code: Bluetooth: L2CAP: Fix use-after-free in l2cap_unregister_user | Problem Details:
After commit ab4eedb790ca ("Bluetooth: L2CAP: Fix corrupted list in
hci_chan_del"), l2cap_conn_del() uses conn->lock to protect access to
conn->users. However, l2cap_register_user() and l2cap_unregister_user()
don't use conn->lock, creating a race condition where these functions can
access conn->users ... | ```diff
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 0f400051f093..780136e18aae 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -1678,17 +1678,15 @@ static void l2cap_info_timeout(struct work_struct *work)
int l2cap_register_user(struct l2cap_conn *conn, stru... |
dbf666e4fc9bdd975a61bf682b3f75cb0145eedd | Analyze and fix the following issue in the Linux kernel code: Bluetooth: HIDP: Fix possible UAF | Problem Details:
This fixes the following trace caused by not dropping l2cap_conn
reference when user->remove callback is called:
[ 97.809249] l2cap_conn_free: freeing conn ffff88810a171c00
[ 97.809907] CPU: 1 UID: 0 PID: 1419 Comm: repro_standalon Not tainted 7.0.0-rc1-dirty #14 PREEMPT(lazy)
[ 97.809935] Hardw... | ```diff
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
index 6fe815241b01..7bcf8c5ceaee 100644
--- a/net/bluetooth/hidp/core.c
+++ b/net/bluetooth/hidp/core.c
@@ -986,7 +986,8 @@ static void session_free(struct kref *ref)
skb_queue_purge(&session->intr_transmit);
fput(session->intr_sock->file);
... |
17f89341cb4281d1da0e2fb0de5406ab7c4e25ef | Analyze and fix the following issue in the Linux kernel code: Bluetooth: MGMT: Fix list corruption and UAF in command complete handlers | Problem Details:
Commit 302a1f674c00 ("Bluetooth: MGMT: Fix possible UAFs") introduced
mgmt_pending_valid(), which not only validates the pending command but
also unlinks it from the pending list if it is valid. This change in
semantics requires updates to several completion handlers to avoid list
corruption and memory... | ```diff
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index a7238fd3b03b..d52238ce6a9a 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -2195,10 +2195,7 @@ static void set_mesh_complete(struct hci_dev *hdev, void *data, int err)
sk = cmd->sk;
if (status) {
- mgmt_cmd_status(cmd->sk, hde... |
2cabe7ff1001b7a197009cf50ba71701f9cbd354 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_sync: Fix hci_le_create_conn_sync | Problem Details:
While introducing hci_le_create_conn_sync the functionality
of hci_connect_le was ported to hci_le_create_conn_sync including
the disable of the scan before starting the connection.
When this code was run non synchronously the immediate call that was
setting the flag HCI_LE_SCAN_INTERRUPTED had an imp... | ```diff
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index 121dbc8208ec..3166914b0d6c 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -6627,8 +6627,8 @@ static int hci_le_create_conn_sync(struct hci_dev *hdev, void *data)
* state.
*/
if (hci_dev_test_flag(hdev, HCI_LE... |
62bcaa6b351b6dc400f6c6b83762001fd9f5c12d | Analyze and fix the following issue in the Linux kernel code: Bluetooth: ISO: Fix defer tests being unstable | Problem Details:
iso-tester defer tests seem to fail with hci_conn_hash_lookup_cig
being unable to resolve a cig in set_cig_params_sync due a race
where it is run immediatelly before hci_bind_cis is able to set
the QoS settings into the hci_conn object.
So this moves the assigning of the QoS settings to be done direct... | ```diff
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 4719dac07190..6eb59e9f2aa8 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -1944,6 +1944,8 @@ static bool hci_le_set_cig_params(struct hci_conn *conn, struct bt_iso_qos *qos)
return false;
done:
+ conn->iso_qos ... |
0e4d4dcc1a6e82cc6f9abf32193558efa7e1613d | Analyze and fix the following issue in the Linux kernel code: Bluetooth: SMP: make SM/PER/KDU/BI-04-C happy | Problem Details:
The last test step ("Test with Invalid public key X and Y, all set to
0") expects to get an "DHKEY check failed" instead of "unspecified".
Fixes: 6d19628f539f ("Bluetooth: SMP: Fail if remote and local public keys are identical")
Signed-off-by: Christian Eggers <ceggers@arri.de>
Signed-off-by: Luiz Au... | ```diff
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index e67bf7b34ea7..485e3468bd26 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -2743,7 +2743,7 @@ static int smp_cmd_public_key(struct l2cap_conn *conn, struct sk_buff *skb)
if (!test_bit(SMP_FLAG_DEBUG_KEY, &smp->flags) &&
!crypto_m... |
b6a2bf43aa37670432843bc73ae2a6288ba4d6f8 | Analyze and fix the following issue in the Linux kernel code: Bluetooth: LE L2CAP: Disconnect if sum of payload sizes exceed SDU | Problem Details:
Core 6.0, Vol 3, Part A, 3.4.3:
"... If the sum of the payload sizes for the K-frames exceeds the
specified SDU length, the receiver shall disconnect the channel."
This fixes L2CAP/LE/CFC/BV-27-C (running together with 'l2test -r -P
0x0027 -V le_public').
Fixes: aac23bf63659 ("Bluetooth: Implement LE... | ```diff
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 3056dcd5fa2f..0f400051f093 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -6729,6 +6729,7 @@ static int l2cap_ecred_data_rcv(struct l2cap_chan *chan, struct sk_buff *skb)
if (chan->sdu->len + skb->len > c... |
e1d9a66889867c232657a9b6f25d451d7c3ab96f | Analyze and fix the following issue in the Linux kernel code: Bluetooth: LE L2CAP: Disconnect if received packet's SDU exceeds IMTU | Problem Details:
Core 6.0, Vol 3, Part A, 3.4.3:
"If the SDU length field value exceeds the receiver's MTU, the receiver
shall disconnect the channel..."
This fixes L2CAP/LE/CFC/BV-26-C (running together with 'l2test -r -P
0x0027 -V le_public -I 100').
Fixes: aac23bf63659 ("Bluetooth: Implement LE L2CAP reassembly")
... | ```diff
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index ad98db9632fd..3056dcd5fa2f 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -6662,8 +6662,10 @@ static int l2cap_ecred_data_rcv(struct l2cap_chan *chan, struct sk_buff *skb)
return -ENOBUFS;
}
- if (chan... |
2619da73bb2f10d88f7e1087125c40144fdf0987 | Analyze and fix the following issue in the Linux kernel code: KVM: x86: Use __DECLARE_FLEX_ARRAY() for UAPI structures with VLAs | Problem Details:
Commit 94dfc73e7cf4 ("treewide: uapi: Replace zero-length arrays with
flexible-array members") broke the userspace API for C++.
These structures ending in VLAs are typically a *header*, which can be
followed by an arbitrary number of entries. Userspace typically creates
a larger structure with some no... | ```diff
diff --git a/arch/x86/include/uapi/asm/kvm.h b/arch/x86/include/uapi/asm/kvm.h
index 0d4538fa6c31..5f2b30d0405c 100644
--- a/arch/x86/include/uapi/asm/kvm.h
+++ b/arch/x86/include/uapi/asm/kvm.h
@@ -197,13 +197,13 @@ struct kvm_msrs {
__u32 nmsrs; /* number of msrs in entries */
__u32 pad;
- struct kvm_ms... |
00d572d4cd7d23f9a7a498d2d824b68ba3ea5b88 | Analyze and fix the following issue in the Linux kernel code: KVM: X86: Fix array_index_nospec protection in __pv_send_ipi | Problem Details:
The __pv_send_ipi() function iterates over up to BITS_PER_LONG vCPUs
starting from the APIC ID specified in its 'min' argument, which is
provided by the guest.
Commit c87bd4dd43a6 used array_index_nospec() to clamp the value of 'min'
but then the for_each_set_bit() loop dereferences higher indices wit... | ```diff
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 02f2039d5f99..e3ec4d8607c1 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -840,16 +840,16 @@ static int __pv_send_ipi(unsigned long *ipi_bitmap, struct kvm_apic_map *map,
{
int i, count = 0;
struct kvm_vcpu *vcpu;
+ size_t map_... |
26c9bfc0fac240540581cfbe58031b412f98aaf8 | Analyze and fix the following issue in the Linux kernel code: KVM: x86: Add LAPIC guard in kvm_apic_write_nodecode() | Problem Details:
kvm_apic_write_nodecode() dereferences vcpu->arch.apic without first
checking whether the in-kernel LAPIC has been initialized. If it has
not (e.g. the vCPU was created without an in-kernel LAPIC), the
dereference results in a NULL pointer access.
While APIC-write VM-Exits are not expected to occur o... | ```diff
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 9381c58d4c85..02f2039d5f99 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -2657,6 +2657,9 @@ void kvm_apic_write_nodecode(struct kvm_vcpu *vcpu, u32 offset)
{
struct kvm_lapic *apic = vcpu->arch.apic;
+ if (KVM_BUG_ON(!lapic_in... |
9e5dd49de5d82401e92098c03e0a0e978ddd515a | Analyze and fix the following issue in the Linux kernel code: KVM: arm64: tracing: add ftrace dependency | Problem Details:
Selecting CONFIG_TRACE_REMOTE causes a build time warning when FTRACE
is disabled:
WARNING: unmet direct dependencies detected for TRACE_REMOTE
Depends on [n]: FTRACE [=n]
Selected by [y]:
- NVHE_EL2_TRACING [=y] && VIRTUALIZATION [=y] && KVM [=y] && NVHE_EL2_DEBUG [=y] && TRACING [=y]
Add this... | ```diff
diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig
index 17edfe3ae615..449154f9a485 100644
--- a/arch/arm64/kvm/Kconfig
+++ b/arch/arm64/kvm/Kconfig
@@ -74,7 +74,7 @@ if NVHE_EL2_DEBUG
config NVHE_EL2_TRACING
bool
- depends on TRACING
+ depends on TRACING && FTRACE
select TRACE_REMOTE
default... |
7e4b6c94300e355a72670c5b896ccc26ac312c63 | Analyze and fix the following issue in the Linux kernel code: tracing: add more symbols to whitelist | Problem Details:
Randconfig builds show a number of cryptic build errors from
hitting undefined symbols in simple_ring_buffer.o:
make[7]: *** [/home/arnd/arm-soc/kernel/trace/Makefile:147: kernel/trace/simple_ring_buffer.o.checked] Error 1
These happen with CONFIG_TRACE_BRANCH_PROFILING, CONFIG_KASAN_HW_TAGS,
CONFIG_... | ```diff
diff --git a/kernel/trace/Makefile b/kernel/trace/Makefile
index 3cc490aadc99..beb15936829d 100644
--- a/kernel/trace/Makefile
+++ b/kernel/trace/Makefile
@@ -1,4 +1,4 @@
-# SPDX-License-Identifier: GPL-2.0
+
# Do not instrument the tracer itself:
@@ -139,6 +139,8 @@ obj-$(CONFIG_TRACE_REMOTE_TEST) += remo... |
5f2f83047126f1cb2986d142d2e76e1fa3cef3f0 | Analyze and fix the following issue in the Linux kernel code: tracing: Update undefined symbols allow list for simple_ring_buffer | Problem Details:
Undefined symbols are not allowed for simple_ring_buffer.c. But some
compiler emitted symbols are missing in the allowlist. Update it.
Reported-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
Fixes: a717943d8ecc ("tracing: Check for undefined symbols ... | ```diff
diff --git a/kernel/trace/Makefile b/kernel/trace/Makefile
index 3182e1bc1cf7..3cc490aadc99 100644
--- a/kernel/trace/Makefile
+++ b/kernel/trace/Makefile
@@ -137,7 +137,8 @@ obj-$(CONFIG_TRACE_REMOTE_TEST) += remote_test.o
# to all kernel symbols. Fail the build if forbidden symbols are found.
#
UNDEFINED_A... |
15cfc8984defc17e5e4de1f58db7b993240fcbda | Analyze and fix the following issue in the Linux kernel code: dt-bindings: interrupt-controller: arm,gic-v3: Fix EPPI range | Problem Details:
According to the "Arm Generic Interrupt Controller (GIC) Architecture
Specification, v3 and v4", revision H.b[1], there can be only 64
Extended PPI interrupts.
[1] https://developer.arm.com/documentation/ihi0069/hb/
Fixes: 4b049063e0bcbfd3 ("dt-bindings: interrupt-controller: arm,gic-v3: Describe EPP... | ```diff
diff --git a/Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml b/Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml
index bfd30aae682b..360a0643a0b5 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml
+++ b/Documentation/devicetree/binding... |
c38b8f5f791ecce13ab77e2257f8fd2444ba80f6 | Analyze and fix the following issue in the Linux kernel code: net: prevent NULL deref in ip[6]tunnel_xmit() | Problem Details:
Blamed commit missed that both functions can be called with dev == NULL.
Also add unlikely() hints for these conditions that only fuzzers can hit.
Fixes: 6f1a9140ecda ("net: add xmit recursion limit to tunnel xmit functions")
Signed-off-by: Eric Dumazet <edumazet@google.com>
CC: Weiming Shi <bestswng... | ```diff
diff --git a/include/net/ip6_tunnel.h b/include/net/ip6_tunnel.h
index 1253cbb4b0a4..359b595f1df9 100644
--- a/include/net/ip6_tunnel.h
+++ b/include/net/ip6_tunnel.h
@@ -156,10 +156,12 @@ static inline void ip6tunnel_xmit(struct sock *sk, struct sk_buff *skb,
{
int pkt_len, err;
- if (dev_recursion_level(... |
c2c185be5c85d37215397c8e8781abf0a69bec1f | Analyze and fix the following issue in the Linux kernel code: io_uring/kbuf: check if target buffer list is still legacy on recycle | Problem Details:
There's a gap between when the buffer was grabbed and when it
potentially gets recycled, where if the list is empty, someone could've
upgraded it to a ring provided type. This can happen if the request
is forced via io-wq. The legacy recycling is missing checking if the
buffer_list still exists, and if... | ```diff
diff --git a/io_uring/kbuf.c b/io_uring/kbuf.c
index dae5b4ab3819..e7f444953dfb 100644
--- a/io_uring/kbuf.c
+++ b/io_uring/kbuf.c
@@ -111,9 +111,18 @@ bool io_kbuf_recycle_legacy(struct io_kiocb *req, unsigned issue_flags)
buf = req->kbuf;
bl = io_buffer_get_list(ctx, buf->bgid);
- list_add(&buf->list, &... |
2de27980e1d46e5dac586b1785edee7849a6e705 | Analyze and fix the following issue in the Linux kernel code: selftests: memcg: Add tests for IN_DELETE_SELF and IN_IGNORED | Problem Details:
Add two new tests that verify inotify events are sent when memcg files
or directories are removed with rmdir.
Signed-off-by: T.J. Mercier <tjmercier@google.com>
Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: Amir Goldstein <amir73il@gmail.com>
Tested-by: syzbot@syzkaller.appspotmail.com
Link: https://p... | ```diff
diff --git a/tools/testing/selftests/cgroup/test_memcontrol.c b/tools/testing/selftests/cgroup/test_memcontrol.c
index 2fb096a2a9f9..ea05a2524d0f 100644
--- a/tools/testing/selftests/cgroup/test_memcontrol.c
+++ b/tools/testing/selftests/cgroup/test_memcontrol.c
@@ -10,6 +10,7 @@
#include <sys/stat.h>
#includ... |
eea5d2bb34ba11dccd9c53f392dc50cf060150a9 | Analyze and fix the following issue in the Linux kernel code: kernfs: Send IN_DELETE_SELF and IN_IGNORED | Problem Details:
Currently some kernfs files (e.g. cgroup.events, memory.events) support
inotify watches for IN_MODIFY, but unlike with regular filesystems, they
do not receive IN_DELETE_SELF or IN_IGNORED events when they are
removed. This means inotify watches persist after file deletion until
the process exits and t... | ```diff
diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c
index d9a1707b2148..715b651e35a0 100644
--- a/fs/kernfs/dir.c
+++ b/fs/kernfs/dir.c
@@ -486,7 +486,7 @@ void kernfs_put_active(struct kernfs_node *kn)
* removers may invoke this function concurrently on @kn and all will
* return after draining is complete.
*/... |
507d8ce13f5b91d5b4dca7bd4b4e4249e8021cca | Analyze and fix the following issue in the Linux kernel code: kernfs: Don't set_nlink for directories being removed | Problem Details:
If a directory is already in the process of removal its i_nlink count
becomes irrelevant because its contents are also about to be removed and
any pending filesystem operations on it or its contents will soon start
to fail. So we can avoid setting it for directories already flagged for
removal.
This a... | ```diff
diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c
index 8d40c4b1db9f..d9a1707b2148 100644
--- a/fs/kernfs/dir.c
+++ b/fs/kernfs/dir.c
@@ -1491,12 +1491,14 @@ static void __kernfs_remove(struct kernfs_node *kn)
pr_debug("kernfs %s: removing\n", kernfs_rcu_name(kn));
/* prevent new usage by marking all nodes r... |
f917dc56060a10f401dd8ca46a1c5df237b35d84 | Analyze and fix the following issue in the Linux kernel code: device core: Fix kernel-doc warnings in base.h | Problem Details:
In preparation for adding new fields to 'struct device_private' fix up
existing kernel-doc warnings in this header file of the form:
Warning: drivers/base/base.h:59 struct member 'subsys' not described in
'subsys_private'
Warning: drivers/base/base.h:59 struct member 'devices_kset' not described
in 's... | ```diff
diff --git a/drivers/base/base.h b/drivers/base/base.h
index 1af95ac68b77..3bc8e6fd06a8 100644
--- a/drivers/base/base.h
+++ b/drivers/base/base.h
@@ -13,27 +13,28 @@
#include <linux/notifier.h>
/**
- * struct subsys_private - structure to hold the private to the driver core portions of the bus_type/class s... |
a7b9ce39fbe4ae2919fe4f7ac16c293cb6632d30 | Analyze and fix the following issue in the Linux kernel code: serial: 8250_dw: Ensure BUSY is deasserted | Problem Details:
DW UART cannot write to LCR, DLL, and DLH while BUSY is asserted.
Existance of BUSY depends on uart_16550_compatible, if UART HW is
configured with it those registers can always be written.
There currently is dw8250_force_idle() which attempts to achieve
non-BUSY state by disabling FIFO, however, the ... | ```diff
diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h
index 8caecfc85d93..77fe0588fd6b 100644
--- a/drivers/tty/serial/8250/8250.h
+++ b/drivers/tty/serial/8250/8250.h
@@ -175,7 +175,9 @@ static unsigned int __maybe_unused serial_icr_read(struct uart_8250_port *up,
return value;
}
+v... |
e0a368ae79531ff92105a2692f10d83052055856 | Analyze and fix the following issue in the Linux kernel code: serial: 8250: Add late synchronize_irq() to shutdown to handle DW UART BUSY | Problem Details:
When DW UART is !uart_16550_compatible, it can indicate BUSY at any
point (when under constant Rx pressure) unless a complex sequence of
steps is performed. Any LCR write can run a foul with the condition
that prevents writing LCR while the UART is BUSY, which triggers
BUSY_DETECT interrupt that seems ... | ```diff
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index 14d6aca44551..94a64b3dd1f7 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -2399,6 +2399,12 @@ void serial8250_do_shutdown(struct uart_port *port)
* the IRQ chain.
*/
... |
73a4ed8f9efaaaf8207614ccc1c9d5ca1888f23a | Analyze and fix the following issue in the Linux kernel code: serial: 8250_dw: Rework IIR_NO_INT handling to stop interrupt storm | Problem Details:
INTC10EE UART can end up into an interrupt storm where it reports
IIR_NO_INT (0x1). If the storm happens during active UART operation, it
is promptly stopped by IIR value change due to Rx or Tx events.
However, when there is no activity, either due to idle serial line or
due to specific circumstances s... | ```diff
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index abf0814086a5..3d8032f752b8 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -61,6 +61,13 @@
#define DW_UART_QUIRK_IS_DMA_FC BIT(3)
#define DW_UART_QUIRK_APMC0D08 BIT(4)
#define ... |
455ce986fa356ff43a43c0d363ba95fa152f21d5 | Analyze and fix the following issue in the Linux kernel code: serial: core: fix infinite loop in handle_tx() for PORT_UNKNOWN | Problem Details:
uart_write_room() and uart_write() behave inconsistently when
xmit_buf is NULL (which happens for PORT_UNKNOWN ports that were
never properly initialized):
- uart_write_room() returns kfifo_avail() which can be > 0
- uart_write() checks xmit_buf and returns 0 if NULL
This inconsistency causes an infi... | ```diff
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 487756947a96..89cebdd27841 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -643,7 +643,10 @@ static unsigned int uart_write_room(struct tty_struct *tty)
unsigned int ret;
port = u... |
d54801cd509515f674a5aac1d3ea1401d2a05863 | Analyze and fix the following issue in the Linux kernel code: serial: uartlite: fix PM runtime usage count underflow on probe | Problem Details:
ulite_probe() calls pm_runtime_put_autosuspend() at the end of probe
without holding a corresponding PM runtime reference for non-console
ports.
During ulite_assign(), uart_add_one_port() triggers uart_configure_port()
which calls ulite_pm() via uart_change_pm(). For non-console ports, the
UART core p... | ```diff
diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c
index 39c1fd1ff9ce..6240c3d4dfd7 100644
--- a/drivers/tty/serial/uartlite.c
+++ b/drivers/tty/serial/uartlite.c
@@ -878,6 +878,7 @@ of_err:
pm_runtime_use_autosuspend(&pdev->dev);
pm_runtime_set_autosuspend_delay(&pdev->dev, UART_AUT... |
24b98e8664e157aff0814a0f49895ee8223f382f | Analyze and fix the following issue in the Linux kernel code: serial: 8250: always disable IRQ during THRE test | Problem Details:
commit 039d4926379b ("serial: 8250: Toggle IER bits on only after irq
has been set up") moved IRQ setup before the THRE test, in combination
with commit 205d300aea75 ("serial: 8250: change lock order in
serial8250_do_startup()") the interrupt handler can run during the
test and race with its IIR reads.... | ```diff
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index cc94af2d578a..a743964c9d22 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -2147,8 +2147,7 @@ static void serial8250_THRE_test(struct uart_port *port)
if (up->port.flags &... |
a424a34b8faddf97b5af41689087e7a230f79ba7 | Analyze and fix the following issue in the Linux kernel code: serial: 8250: Fix TX deadlock when using DMA | Problem Details:
`dmaengine_terminate_async` does not guarantee that the
`__dma_tx_complete` callback will run. The callback is currently the
only place where `dma->tx_running` gets cleared. If the transaction is
canceled and the callback never runs, then `dma->tx_running` will never
get cleared and we will never sched... | ```diff
diff --git a/drivers/tty/serial/8250/8250_dma.c b/drivers/tty/serial/8250/8250_dma.c
index bdd26c9f34bd..3b6452e759d5 100644
--- a/drivers/tty/serial/8250/8250_dma.c
+++ b/drivers/tty/serial/8250/8250_dma.c
@@ -162,7 +162,22 @@ void serial8250_tx_dma_flush(struct uart_8250_port *p)
*/
dma->tx_size = 0;
+... |
eb3b0d92c9c39890592cca6647601fe5c631efea | Analyze and fix the following issue in the Linux kernel code: tty: tty_port: add workqueue to flip TTY buffer | Problem Details:
On the embedded platform, certain critical data, such as IMU data, is
transmitted through UART. The tty_flip_buffer_push() interface in the TTY
layer uses system_dfl_wq to handle the flipping of the TTY buffer.
Although the unbound workqueue can create new threads on demand and wake
up the kworker thre... | ```diff
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index cb427e93372d..cc7f7091ed9a 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
@@ -532,14 +532,16 @@ static void __init legacy_pty_init(void)
pty_driver = tty_alloc_driver(legacy_count,
TTY_DRIVER_RESET_TERMIOS |
TTY_DRIVER_REAL_RAW |
- TTY... |
0b1837c04d2335ec50b9a55b0282dcde7bc12439 | Analyze and fix the following issue in the Linux kernel code: serial: qcom-geni: Fix RTS behavior with flow control | Problem Details:
When userspace enables flow control (CRTSCTS), the driver
deasserts RTS even when the receive buffer has space. This prevents the
peer device from transmitting, causing communication to stall.
The root cause is that the driver unconditionally uses manual RTS control
regardless of flow control mode. Wh... | ```diff
diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
index e6b0a55f0cfb..9854bb2406e3 100644
--- a/drivers/tty/serial/qcom_geni_serial.c
+++ b/drivers/tty/serial/qcom_geni_serial.c
@@ -146,6 +146,7 @@ struct qcom_geni_serial_port {
int wakeup_irq;
bool rx_tx_swap;
boo... |
635e3eba1ebcd5b92856e975e1d3859b487dc88b | Analyze and fix the following issue in the Linux kernel code: drm/xe: Fix overflow in guc_ct_snapshot_capture | Problem Details:
snapshot->ctb is u32*, so pointer arithmetic on it scales
the byte offset from xe_bo_size() by 4, overshooting the
intended start of the g2h portion and writing past the
allocated buffer.
Fix this by using void * to get the arithmetic right and
prevent future mishaps.
v2: s/u8/void for memcpy and ios... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_guc_ct_types.h b/drivers/gpu/drm/xe/xe_guc_ct_types.h
index 46ad1402347d..5da1ce5dc372 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct_types.h
+++ b/drivers/gpu/drm/xe/xe_guc_ct_types.h
@@ -74,7 +74,7 @@ struct xe_guc_ct_snapshot {
/** @ctb_size: size of the snapshot of the CTB */... |
f2a880e802ad12d1e38039d1334fb1475d0f5241 | Analyze and fix the following issue in the Linux kernel code: tty: hvc_iucv: fix off-by-one in number of supported devices | Problem Details:
MAX_HVC_IUCV_LINES == HVC_ALLOC_TTY_ADAPTERS == 8.
This is the number of entries in:
static struct hvc_iucv_private *hvc_iucv_table[MAX_HVC_IUCV_LINES];
Sometimes hvc_iucv_table[] is limited by:
(a) if (num > hvc_iucv_devices) // for error detection
or
(b) for (i = 0; i < hvc_iucv_devices; i++) // i... | ```diff
diff --git a/drivers/tty/hvc/hvc_iucv.c b/drivers/tty/hvc/hvc_iucv.c
index 1dcdb9e99bd8..37db8a3e5158 100644
--- a/drivers/tty/hvc/hvc_iucv.c
+++ b/drivers/tty/hvc/hvc_iucv.c
@@ -130,7 +130,7 @@ static struct iucv_handler hvc_iucv_handler = {
*/
static struct hvc_iucv_private *hvc_iucv_get_private(uint32_t n... |
43c2b86ff633c34831c8430925ba73d7c20da1ad | Analyze and fix the following issue in the Linux kernel code: tty: serial: samsung_tty: avoid dev_dbg deadlock | Problem Details:
commit a05025d0ce72 ("tty: serial: samsung_tty: use standard
debugging macros") changed the debug prints to dev_dbg, which can
result in deadlocks:
s3c24xx_serial_set_termios can be called with the port lock, and then
calls dev_dbg, which needs the console mutex. At the same time,
s3c24xx_serial_conso... | ```diff
diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
index c1fabad6ba1f..e27806bf2cf3 100644
--- a/drivers/tty/serial/samsung_tty.c
+++ b/drivers/tty/serial/samsung_tty.c
@@ -1562,12 +1562,12 @@ static void s3c24xx_serial_set_termios(struct uart_port *port,
ulcon |= S3C2410_LCON_P... |
b22c526569e6af84008b674e66378e771bfbdd94 | Analyze and fix the following issue in the Linux kernel code: pmdomain: mediatek: Fix power domain count | Problem Details:
The wrong value of the number of domains is wrong which leads to
failures when trying to enumerate nested power domains.
PM: genpd_xlate_onecell: invalid domain index 0
PM: genpd_xlate_onecell: invalid domain index 1
PM: genpd_xlate_onecell: invalid domain index 3
PM: genpd_xlate_onecell: invalid ... | ```diff
diff --git a/drivers/pmdomain/mediatek/mtk-pm-domains.c b/drivers/pmdomain/mediatek/mtk-pm-domains.c
index f64f24d520dd..e2800aa1bc59 100644
--- a/drivers/pmdomain/mediatek/mtk-pm-domains.c
+++ b/drivers/pmdomain/mediatek/mtk-pm-domains.c
@@ -1203,7 +1203,7 @@ static int scpsys_probe(struct platform_device *pde... |
9bd35baa37226a76888516edfbe290709d3ffac2 | Analyze and fix the following issue in the Linux kernel code: HID: pl: eliminate private debug macro | Problem Details:
Use proper dynamic debugging.
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com> | ```diff
diff --git a/drivers/hid/hid-pl.c b/drivers/hid/hid-pl.c
index c6c2961dd574..8bba29ef6c7a 100644
--- a/drivers/hid/hid-pl.c
+++ b/drivers/hid/hid-pl.c
@@ -24,10 +24,6 @@
*/
-/* #define DEBUG */
-
-#define debug(format, arg...) pr_debug("hid-plff: " format "\n" , ## arg)
-
#include <linux/input.h>
#inclu... |
820ed0c1a13c5fafb36232538d793f99a0986ef3 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt7986a: Fix gpio-ranges pin count | Problem Details:
The gpio-ranges in the MT7986A pinctrl node were incorrectly defined,
therefore, pin 100 cannot be used.
Correct the range count to match the driver.
Fixes: c3a064a32ed9 ("arm64: dts: mediatek: add pinctrl support for mt7986a")
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
Signed-off-by: Ang... | ```diff
diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
index 9693f62fd013..9ebc196107e5 100644
--- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
@@ -187,7 +187,7 @@
"iocfg_lb", "iocfg_tr", "iocfg_tl", "eint";
... |
b62a927f4a46a7f58d88ba3d5fb6e88e1a4b4603 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt7981b: Fix gpio-ranges pin count | Problem Details:
The gpio-ranges in the MT7981B pinctrl node were incorrectly defined,
therefore, pin 56 cannot be used.
Correct the range count to match the driver.
Fixes: 62b24c7fdf0a ("arm64: dts: mediatek: mt7981: add pinctrl")
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
Signed-off-by: AngeloGioacchino... | ```diff
diff --git a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi b/arch/arm64/boot/dts/mediatek/mt7981b.dtsi
index 4084f4dfa3e5..1bbe219380f9 100644
--- a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7981b.dtsi
@@ -332,7 +332,7 @@
interrupt-controller;
interrupts = <GIC_SPI 225 I... |
c4c4823c8a5baa10b8100b01f49d7c3f4a871689 | Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt6795: Fix gpio-ranges pin count | Problem Details:
The gpio-ranges in the MT6795 pinctrl node were incorrectly defined,
therefore, GPIO196 cannot be used.
Correct the range count to match the driver.
Fixes: b888886a4536 ("arm64: dts: mediatek: mt6795: Add pinctrl controller node")
Signed-off-by: Akari Tsuyukusa <akkun11.open@gmail.com>
Signed-off-by: ... | ```diff
diff --git a/arch/arm64/boot/dts/mediatek/mt6795.dtsi b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
index ae2aaa51c9ad..134cfa77e3b1 100644
--- a/arch/arm64/boot/dts/mediatek/mt6795.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt6795.dtsi
@@ -371,7 +371,7 @@
<GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>;
gpio-control... |
8e7adcf81564a3fe886a6270eea7558f063e5538 | Analyze and fix the following issue in the Linux kernel code: net: ti: icssg: Fix wrong macro used in RX classifier configuration | Problem Details:
The RX_CLASS_OR_REG macro is being used with RX_CLASS_OR_EN parameter
when writing to the AND enable register. This should use RX_CLASS_AND_EN
instead to properly configure the classifier AND enable register.
Fix this by using the correct RX_CLASS_AND_EN macro parameter for
RX_CLASS_OR_REG when config... | ```diff
diff --git a/drivers/net/ethernet/ti/icssg/icssg_classifier.c b/drivers/net/ethernet/ti/icssg/icssg_classifier.c
index cde53d9aaa7b..87a8577093db 100644
--- a/drivers/net/ethernet/ti/icssg/icssg_classifier.c
+++ b/drivers/net/ethernet/ti/icssg/icssg_classifier.c
@@ -517,7 +517,7 @@ void icssg_ft3_hsr_configurat... |
0d3fccf68d9873a3c824fb70be0dbb2c4642aa90 | Analyze and fix the following issue in the Linux kernel code: kbuild: Use '-fms-anonymous-structs' if it is available | Problem Details:
Clang recently added '-fms-anonymous-structs' [1] to specifically enable
the Microsoft tagged anonymous structure / union extension, for which
the kernel added '-fms-extensions' in commit c4781dc3d1cf ("Kbuild:
enable -fms-extensions"). Switch to this more narrow option if it is
available, which would ... | ```diff
diff --git a/Makefile b/Makefile
index 06ff3032a6bc..1d5c0ab9ed5c 100644
--- a/Makefile
+++ b/Makefile
@@ -791,7 +791,7 @@ endif
CC_FLAGS_DIALECT := -std=gnu11
# Allow including a tagged struct or union anonymously in another struct/union.
-CC_FLAGS_DIALECT += -fms-extensions
+CC_FLAGS_DIALECT += $(CONFIG_C... |
47bca1cbf692b89defbf4db27495813f82d5e3ff | Analyze and fix the following issue in the Linux kernel code: hexagon: uapi: Fix structure alignment attribute | Problem Details:
__aligned() is a kernel macro, which is not available in UAPI headers.
Use the compiler-provided alignment attribute directly.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Nico... | ```diff
diff --git a/arch/hexagon/include/uapi/asm/sigcontext.h b/arch/hexagon/include/uapi/asm/sigcontext.h
index 7171edb1b8b7..179a97041b59 100644
--- a/arch/hexagon/include/uapi/asm/sigcontext.h
+++ b/arch/hexagon/include/uapi/asm/sigcontext.h
@@ -29,6 +29,6 @@
*/
struct sigcontext {
struct user_regs_struct sc_... |
869d5b4b2a8012f6ef6058a1055cac6922c2cb55 | Analyze and fix the following issue in the Linux kernel code: spi: atcspi200: fix mutex initialization order | Problem Details:
The atcspi_exec_mem_op() function may call mutex_lock() on the
driver's mutex before it is properly initialized if a SPI memory
operation is initiated immediately after devm_spi_register_controller()
is called. The mutex initialization currently occurs after the
controller registration, which leaves a ... | ```diff
diff --git a/drivers/spi/spi-atcspi200.c b/drivers/spi/spi-atcspi200.c
index 257db4e529e2..8f283dffe3ca 100644
--- a/drivers/spi/spi-atcspi200.c
+++ b/drivers/spi/spi-atcspi200.c
@@ -565,6 +565,8 @@ static int atcspi_probe(struct platform_device *pdev)
spi->dev = &pdev->dev;
dev_set_drvdata(&pdev->dev, host... |
5aa9383813aca45b914d4a7481ca417ef13114df | Analyze and fix the following issue in the Linux kernel code: scripts/gdb: timerlist: Adapt to move of tk_core | Problem Details:
tk_core is a macro today which cannot be resolved by gdb.
Use the correct symbol expression to reference tk_core.
Fixes: 22c62b9a84b8 ("timekeeping: Introduce auxiliary timekeepers")
Signed-off-by: Thomas Weißschuh (Schneider Electric) <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner ... | ```diff
diff --git a/scripts/gdb/linux/timerlist.py b/scripts/gdb/linux/timerlist.py
index ccc24d30de80..9fb3436a217c 100644
--- a/scripts/gdb/linux/timerlist.py
+++ b/scripts/gdb/linux/timerlist.py
@@ -20,7 +20,7 @@ def ktime_get():
We can't read the hardware timer itself to add any nanoseconds
that need to ... |
d11ac9043435cf1ddf1abc59fa774eb6c0ca4e51 | Analyze and fix the following issue in the Linux kernel code: drm/ttm/tests: add a test to exercise ttm_bo_swapout | Problem Details:
Currently, ttm_bo_swapout is not exercised by the TTM KUnit tests.
It used to be exercised until commit 76689eb52667 ("drm/ttm: remove
ttm_bo_validate_swapout test"), but that test was removed as it was
unreliable due to requiring to allocate half of the system memory.
Calling ttm_bo_swapout directly... | ```diff
diff --git a/drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.c b/drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.c
index e32f3c8d7b84..2db221f6fc3a 100644
--- a/drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.c
+++ b/drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.c
@@ -759,6 +759,46 @@ static void ttm_bo_validate_... |
e7fcc54524f04e42641de99028edd9c69dc19f8c | Analyze and fix the following issue in the Linux kernel code: perf/x86/intel: Fix OMR snoop information parsing issues | Problem Details:
When omr_source is 0x2, the omr_snoop (bit[6]) and omr_promoted (bit[7])
fields are combined to represent the snoop information. However, the
omr_promoted field was not left-shifted by 1 bit, resulting in incorrect
snoop information.
Besides, the snoop information parsing is not accurate for some OMR
... | ```diff
diff --git a/arch/x86/events/intel/ds.c b/arch/x86/events/intel/ds.c
index 5027afc97b65..7f0d515c07c5 100644
--- a/arch/x86/events/intel/ds.c
+++ b/arch/x86/events/intel/ds.c
@@ -345,12 +345,12 @@ static u64 parse_omr_data_source(u8 dse)
if (omr.omr_remote)
val |= REM;
- val |= omr.omr_hitm ? P(SNOOP, HI... |
1d07bbd7ea36ea0b8dfa8068dbe67eb3a32d9590 | Analyze and fix the following issue in the Linux kernel code: perf/x86/intel: Add missing branch counters constraint apply | Problem Details:
When running the command:
'perf record -e "{instructions,instructions:p}" -j any,counter sleep 1',
a "shift-out-of-bounds" warning is reported on CWF.
UBSAN: shift-out-of-bounds in /kbuild/src/consumer/arch/x86/events/intel/lbr.c:970:15
shift exponent 64 is too large for 64-bit type 'long long uns... | ```diff
diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
index cf3a4fe06ff2..36c68210d4d2 100644
--- a/arch/x86/events/intel/core.c
+++ b/arch/x86/events/intel/core.c
@@ -4628,6 +4628,19 @@ static inline void intel_pmu_set_acr_caused_constr(struct perf_event *event,
event->hw.dyn_constraint &... |
4b9ce671960627b2505b3f64742544ae9801df97 | Analyze and fix the following issue in the Linux kernel code: perf: Make sure to use pmu_ctx->pmu for groups | Problem Details:
Oliver reported that x86_pmu_del() ended up doing an out-of-bound memory access
when group_sched_in() fails and needs to roll back.
This *should* be handled by the transaction callbacks, but he found that when
the group leader is a software event, the transaction handlers of the wrong PMU
are used. De... | ```diff
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 1f5699b339ec..89b40e439717 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -4813,7 +4813,7 @@ static void __perf_event_read(void *info)
struct perf_event *sub, *event = data->event;
struct perf_event_context *ctx = event->ctx;
... |
f1cac6ac62d28a9a57b17f51ac5795bf250c12d3 | Analyze and fix the following issue in the Linux kernel code: x86/perf: Make sure to program the counter value for stopped events on migration | Problem Details:
Both Mi Dapeng and Ian Rogers noted that not everything that sets HES_STOPPED
is required to EF_UPDATE. Specifically the 'step 1' loop of rescheduling
explicitly does EF_UPDATE to ensure the counter value is read.
However, then 'step 2' simply leaves the new counter uninitialized when
HES_STOPPED, eve... | ```diff
diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c
index 54b4c315d927..810ab21ffd99 100644
--- a/arch/x86/events/core.c
+++ b/arch/x86/events/core.c
@@ -1374,8 +1374,10 @@ static void x86_pmu_enable(struct pmu *pmu)
cpuc->events[hwc->idx] = event;
- if (hwc->state & PERF_HES_ARCH)
+ if (hw... |
8d5fae6011260de209aaf231120e8146b14bc8e0 | Analyze and fix the following issue in the Linux kernel code: perf/x86: Move event pointer setup earlier in x86_pmu_enable() | Problem Details:
A production AMD EPYC system crashed with a NULL pointer dereference
in the PMU NMI handler:
BUG: kernel NULL pointer dereference, address: 0000000000000198
RIP: x86_perf_event_update+0xc/0xa0
Call Trace:
<NMI>
amd_pmu_v2_handle_irq+0x1a6/0x390
perf_event_nmi_handler+0x24/0x40
The faul... | ```diff
diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c
index 03ce1bc7ef2e..54b4c315d927 100644
--- a/arch/x86/events/core.c
+++ b/arch/x86/events/core.c
@@ -1372,6 +1372,8 @@ static void x86_pmu_enable(struct pmu *pmu)
else if (i < n_running)
continue;
+ cpuc->events[hwc->idx] = event;
+
... |
14de1552a4e3fece78bb20314887e70888c9d448 | Analyze and fix the following issue in the Linux kernel code: include/linux/local_lock_internal.h: Make this header file again compatible with sparse | Problem Details:
There are two versions of the __this_cpu_local_lock() definitions in
include/linux/local_lock_internal.h: one version that relies on the
Clang overloading functionality and another version that does not.
Select the latter version when using sparse. This patch fixes the
following errors reported by spar... | ```diff
diff --git a/include/linux/local_lock_internal.h b/include/linux/local_lock_internal.h
index eff711bf973f..234be7f12c15 100644
--- a/include/linux/local_lock_internal.h
+++ b/include/linux/local_lock_internal.h
@@ -315,7 +315,7 @@ do { \
#endif /* CONFIG_PREEMPT_RT */
-#if defined(WARN_CONTEXT_ANALY... |
0de607dc4fd80ede3b2a35e8a72f99c7a0bbc321 | Analyze and fix the following issue in the Linux kernel code: vsock: add G2H fallback for CIDs not owned by H2G transport | Problem Details:
When no H2G transport is loaded, vsock currently routes all CIDs to the
G2H transport (commit 65b422d9b61b ("vsock: forward all packets to the
host when no H2G is registered"). Extend that existing behavior: when
an H2G transport is loaded but does not claim a given CID, the
connection falls back to G2... | ```diff
diff --git a/Documentation/admin-guide/sysctl/net.rst b/Documentation/admin-guide/sysctl/net.rst
index 3b2ad61995d4..0724a793798f 100644
--- a/Documentation/admin-guide/sysctl/net.rst
+++ b/Documentation/admin-guide/sysctl/net.rst
@@ -602,3 +602,31 @@ it does not modify the current namespace or any existing chi... |
be97fd06458d66a53aefb6d9429db0df734c81c0 | Analyze and fix the following issue in the Linux kernel code: drm/xe: add xe_migrate_resolve wrapper and is_vram_resolve support | Problem Details:
Introduce an internal __xe_migrate_copy(..., is_vram_resolve) path and
expose a small wrapper xe_migrate_resolve() that calls it with
is_vram_resolve=true.
For resolve/decompression operations we must ensure the copy code uses
the compression PAT index when appropriate; this change centralizes that
be... | ```diff
diff --git a/drivers/gpu/drm/xe/xe_migrate.c b/drivers/gpu/drm/xe/xe_migrate.c
index 283d55fef6b8..bcd9aa595bcf 100644
--- a/drivers/gpu/drm/xe/xe_migrate.c
+++ b/drivers/gpu/drm/xe/xe_migrate.c
@@ -860,31 +860,13 @@ static u32 xe_migrate_ccs_copy(struct xe_migrate *m,
return flush_flags;
}
-/**
- * xe_mig... |
fdbaa9d2b78e0da9e1aeb303bbdc3adfe6d8e749 | Analyze and fix the following issue in the Linux kernel code: rust: pin-init: replace shadowed return token by `unsafe`-to-create token | Problem Details:
We use a unit struct `__InitOk` in the closure generated by the
initializer macros as the return value. We shadow it by creating a
struct with the same name again inside of the closure, preventing early
returns of `Ok` in the initializer (before all fields have been
initialized).
In the face of Type A... | ```diff
diff --git a/rust/pin-init/internal/src/init.rs b/rust/pin-init/internal/src/init.rs
index 738f62c8105c..2fe918f4d82a 100644
--- a/rust/pin-init/internal/src/init.rs
+++ b/rust/pin-init/internal/src/init.rs
@@ -148,11 +148,6 @@ pub(crate) fn expand(
let init_fields = init_fields(&fields, pinned, &data, &sl... |
8d16e3c6f844823812f872df5ef1d3d2ed11b956 | Analyze and fix the following issue in the Linux kernel code: sched/fair: Fix comma operator misuse in NUMA fault accounting | Problem Details:
Replace the comma operator with separate statements when assigning
NUMA fault statistics. This improves readability and follows kernel
coding style.
Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260309... | ```diff
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index d57c02e82f3a..c1e5c8298fd1 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -14226,7 +14226,7 @@ void show_numa_stats(struct task_struct *p, struct seq_file *m)
tpf = p->numa_faults[task_faults_idx(NUMA_MEM, node, 1)];
}
if (ng)... |
b1f9c67781efd8a0ebd5019f14fbbac981cff7c1 | Analyze and fix the following issue in the Linux kernel code: xfrm: policy: fix sparse warnings in xfrm_policy_{init,fini} | Problem Details:
In xfrm_policy_init:
add rcu_assign_pointer to fix warning:
net/xfrm/xfrm_policy.c:4238:29: warning: incorrect type in assignment (different address spaces)
net/xfrm/xfrm_policy.c:4238:29: expected struct hlist_head [noderef] __rcu *table
net/xfrm/xfrm_policy.c:4238:29: got struct hlist_head *
a... | ```diff
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 5428185196a1..49de5a6f4b85 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -4242,7 +4242,7 @@ static int __net_init xfrm_policy_init(struct net *net)
net->xfrm.policy_count[XFRM_POLICY_MAX + dir] = 0;
htab = &net->xfr... |
55b5bc03148b26ce8156bc47b637a7337aa7d257 | Analyze and fix the following issue in the Linux kernel code: xfrm: state: fix sparse warnings around XFRM_STATE_INSERT | Problem Details:
We're under xfrm_state_lock in all those cases, use
xfrm_state_deref_prot(state_by*) to avoid sparse warnings:
net/xfrm/xfrm_state.c:2597:25: warning: cast removes address space '__rcu' of expression
net/xfrm/xfrm_state.c:2597:25: warning: incorrect type in argument 2 (different address spaces)
net/xf... | ```diff
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index b81303cccc5e..34cf9f361683 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -1563,23 +1563,23 @@ found:
list_add(&x->km.all, &net->xfrm.state_all);
h = xfrm_dst_hash(net, daddr, saddr, tmpl->reqid, encap_family);
XFRM_... |
e2f845f672782b2522062cf1c9aad774276250d7 | Analyze and fix the following issue in the Linux kernel code: xfrm: state: fix sparse warnings in xfrm_state_init | Problem Details:
Use rcu_assign_pointer, and tmp variables for freeing on the error
path without accessing net->xfrm.state_by*.
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> | ```diff
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index ad32085267a5..b81303cccc5e 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -3259,6 +3259,7 @@ EXPORT_SYMBOL(xfrm_init_state);
int __net_init xfrm_state_init(struct net *net)
{
+ struct hlist_head *ndst, *nsrc, *nspi, *nseq;
... |
9f455aac17db0aa1486c94dd2c231353ebc9d8bc | Analyze and fix the following issue in the Linux kernel code: xfrm: state: fix sparse warnings on xfrm_state_hold_rcu | Problem Details:
In all callers, x is not an __rcu pointer. We can drop the annotation to
avoid sparse warnings:
net/xfrm/xfrm_state.c:58:39: warning: incorrect type in argument 1 (different address spaces)
net/xfrm/xfrm_state.c:58:39: expected struct refcount_struct [usertype] *r
net/xfrm/xfrm_state.c:58:39: go... | ```diff
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index a00c4fe1ab0c..ad32085267a5 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -53,7 +53,7 @@ static DECLARE_WORK(xfrm_state_gc_work, xfrm_state_gc_task);
static HLIST_HEAD(xfrm_state_gc_list);
static HLIST_HEAD(xfrm_state_dev_gc_l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.