id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
00cd2d3a1b368685b1302bd45c4783d4c5b907b9
Analyze and fix the following issue in the Linux kernel code: media: i2c: ds90ub960: Fix uninitialized variable in ub960_rxport_bc_ser_config()
Problem Details: The "ret" variable is not initialized on success. Set it to zero. Fixes: e2a3b695bc5f ("media: i2c: ds90ub960: Configure serializer using back-channel") Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-...
```diff diff --git a/drivers/media/i2c/ds90ub960.c b/drivers/media/i2c/ds90ub960.c index 665efd661882..ed9ace1a5476 100644 --- a/drivers/media/i2c/ds90ub960.c +++ b/drivers/media/i2c/ds90ub960.c @@ -2126,7 +2126,7 @@ static int ub960_rxport_bc_ser_config(struct ub960_rxport *rxport) struct ub960_data *priv = rxport->...
d97dfb6c3fb1bc9749baf9a68d90728d33b305f2
Analyze and fix the following issue in the Linux kernel code: media: i2c: ds90ub960: Fix uninitialized variable in ub960_serializer_temp_ramp()
Problem Details: The "ret" variable is not initialized on the success path. Fixes: a05744749600 ("media: i2c: ds90ub9xx: Set serializer temperature ramp") Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com> Signed-off-by: Sakari Ailus...
```diff diff --git a/drivers/media/i2c/ds90ub960.c b/drivers/media/i2c/ds90ub960.c index 1877eb735cc7..665efd661882 100644 --- a/drivers/media/i2c/ds90ub960.c +++ b/drivers/media/i2c/ds90ub960.c @@ -2051,7 +2051,7 @@ static int ub960_serializer_temp_ramp(struct ub960_rxport *rxport) u8 temp_dynamic_cfg; u8 nport = ...
3a9619be0dba738397b888a7674049321184a2f9
Analyze and fix the following issue in the Linux kernel code: media: i2c: imx334: uninitialized variable in imx334_update_exp_gain()
Problem Details: The "ret" variable is not initialized on the success path. Set it to zero. Fixes: 7b19b0fc8ac8 ("media: i2c: imx334: Convert to CCI register access helpers") Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> S...
```diff diff --git a/drivers/media/i2c/imx334.c b/drivers/media/i2c/imx334.c index fc875072f859..846b9928d4e8 100644 --- a/drivers/media/i2c/imx334.c +++ b/drivers/media/i2c/imx334.c @@ -536,7 +536,8 @@ static int imx334_update_controls(struct imx334 *imx334, static int imx334_update_exp_gain(struct imx334 *imx334, u3...
65e52d07f1aada509c85c1bb86ce80dd8a5ce0c8
Analyze and fix the following issue in the Linux kernel code: media: i2c: ov13b10: Support 2 lane mode
Problem Details: 1. Fix pixel rate calculation to consider different lane number 2. Add 2104x1560 60fps 2 data lanes register setting 3. Support 2 lane in check_hwcfg 4. Select correct mode considering lane number used Signed-off-by: Bingbu Cao <bingbu.cao@intel.com> Signed-off-by: Hao Yao <hao.yao@intel.com> Signed-o...
```diff diff --git a/drivers/media/i2c/ov13b10.c b/drivers/media/i2c/ov13b10.c index 2e83fc23f321..e85c7d33a670 100644 --- a/drivers/media/i2c/ov13b10.c +++ b/drivers/media/i2c/ov13b10.c @@ -514,6 +514,52 @@ static const struct ov13b10_reg mode_1364x768_120fps_regs[] = { {0x5001, 0x0d}, }; +static const struct ov1...
24c01de7728673d1a30986aa247d33ca1a0ef322
Analyze and fix the following issue in the Linux kernel code: media: i2c: ov13b10: Improve code readability
Problem Details: Use mode instead of ov13b->cur_mode in set_pad_format. Signed-off-by: Bingbu Cao <bingbu.cao@intel.com> Signed-off-by: Hao Yao <hao.yao@intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> [hverkuil: fix typo: redability -> readability]
```diff diff --git a/drivers/media/i2c/ov13b10.c b/drivers/media/i2c/ov13b10.c index 79c0280e42f3..2e83fc23f321 100644 --- a/drivers/media/i2c/ov13b10.c +++ b/drivers/media/i2c/ov13b10.c @@ -1069,15 +1069,11 @@ ov13b10_set_pad_format(struct v4l2_subdev *sd, __v4l2_ctrl_s_ctrl_int64(ov13b->pixel_rate, pixel_rate); ...
56fa9206d32da1bfc5ea3eb3d5f543973d6ea29f
Analyze and fix the following issue in the Linux kernel code: media: i2c: ov13b10: Fix h_blank calculation
Problem Details: Pixel per line (PPL) is calculated as pixel_rate / (VTS * FPS), which is not decided by MIPI CSI-2 link frequency. PPL can vary while link frequency keeps the same. If PPL is wrong, the h_blank = PPL - width is also wrong then FPS control is inaccurate. This patch fix h_blank by: 1. Move PPL from link...
```diff diff --git a/drivers/media/i2c/ov13b10.c b/drivers/media/i2c/ov13b10.c index 73c844aa5697..79c0280e42f3 100644 --- a/drivers/media/i2c/ov13b10.c +++ b/drivers/media/i2c/ov13b10.c @@ -34,9 +34,6 @@ #define OV13B10_VTS_120FPS 0x0320 #define OV13B10_VTS_MAX 0x7fff -/* HBLANK control - read only */ -#define ...
ac6fb0d8f98810f628e0539f4671d6e71fbf7053
Analyze and fix the following issue in the Linux kernel code: media: ccs-pll: Print a debug message when VT tree calculation fails
Problem Details: When the VT tree calculation fails to find a valid pre-divider, the ccs_pll_calculate_vt_tree() function returns an error silently, and the caller doesn't print any message either. This makes debugging PLL calculation issues more difficult. Add a debug message to report the issue, and amend the corresp...
```diff diff --git a/drivers/media/i2c/ccs-pll.c b/drivers/media/i2c/ccs-pll.c index 8f9a695bd9e5..4eb83636e102 100644 --- a/drivers/media/i2c/ccs-pll.c +++ b/drivers/media/i2c/ccs-pll.c @@ -449,6 +449,7 @@ static int ccs_pll_calculate_vt_tree(struct device *dev, return 0; } + dev_dbg(dev, "unable to compute VT ...
e3d86847fba58cf71f66e81b6a2515e07039ae17
Analyze and fix the following issue in the Linux kernel code: media: ov8856: suppress probe deferral errors
Problem Details: Probe deferral should not be logged as an error: ov8856 24-0010: failed to get HW configuration: -517 Use dev_err_probe() for the clock lookup and drop the (mostly) redundant dev_err() from sensor probe() to suppress it. Note that errors during regulator lookup is already correctly logged using dev...
```diff diff --git a/drivers/media/i2c/ov8856.c b/drivers/media/i2c/ov8856.c index e6704d018248..4b6874d2a104 100644 --- a/drivers/media/i2c/ov8856.c +++ b/drivers/media/i2c/ov8856.c @@ -2276,8 +2276,8 @@ static int ov8856_get_hwcfg(struct ov8856 *ov8856, struct device *dev) if (!is_acpi_node(fwnode)) { ov8856->xv...
8268da3c474a43a79a6540fb06c5d3b730a0d5a5
Analyze and fix the following issue in the Linux kernel code: media: ov5675: suppress probe deferral errors
Problem Details: Probe deferral should not be logged as an error: ov5675 24-0010: failed to get HW configuration: -517 Drop the (mostly) redundant dev_err() from sensor probe() to suppress it. Note that errors during clock and regulator lookup are already correctly logged using dev_err_probe(). Fixes: 49d9ad719e89...
```diff diff --git a/drivers/media/i2c/ov5675.c b/drivers/media/i2c/ov5675.c index c1081deffc2f..e7aec281e9a4 100644 --- a/drivers/media/i2c/ov5675.c +++ b/drivers/media/i2c/ov5675.c @@ -1295,11 +1295,8 @@ static int ov5675_probe(struct i2c_client *client) return -ENOMEM; ret = ov5675_get_hwcfg(ov5675, &client->...
20244cbafbd6c8486347bb82d972f6e2d2d5a201
Analyze and fix the following issue in the Linux kernel code: media: i2c: change lt6911uxe irq_gpio name to "hpd"
Problem Details: Lt6911uxe is used in IPU6 / x86 platform, worked with an out-of-tree int3472 patch and upstream intel/ipu6 before. It is only used on ACPI platforms till now and there are no devicetree bindings for this driver. The upstream int3472 driver uses "hpd" instead of "readystat" now. this patch updates the ...
```diff diff --git a/drivers/media/i2c/lt6911uxe.c b/drivers/media/i2c/lt6911uxe.c index c5b40bb58a37..24857d683fcf 100644 --- a/drivers/media/i2c/lt6911uxe.c +++ b/drivers/media/i2c/lt6911uxe.c @@ -605,10 +605,10 @@ static int lt6911uxe_probe(struct i2c_client *client) return dev_err_probe(dev, PTR_ERR(lt6911uxe->r...
9b9d4ef0cf750c514735bfd77745387b95cbddda
Analyze and fix the following issue in the Linux kernel code: crypto: lib/poly1305 - Build main library on LIB_POLY1305 and split generic code out
Problem Details: Split the lib poly1305 code just as was done with sha256. Make the main library code conditional on LIB_POLY1305 instead of LIB_POLY1305_GENERIC. Reported-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Fixes: 10a6d72ea355 ("crypto: lib/poly1305 - Use block-only interface") Signed-off-by: Herbert X...
```diff diff --git a/lib/crypto/Makefile b/lib/crypto/Makefile index 71d3d05d666a..ff4aa22e5ccc 100644 --- a/lib/crypto/Makefile +++ b/lib/crypto/Makefile @@ -40,11 +40,14 @@ libcurve25519-y += curve25519.o obj-$(CONFIG_CRYPTO_LIB_DES) += libdes.o libdes-y := des.o -obj-$(CONFIG_CRYPTO_LIB_POLY1305_GENERI...
b122c9cfcb39c8ef520d50eddfbe15f3e6551a50
Analyze and fix the following issue in the Linux kernel code: media: imx335: Use correct register width for HNUM
Problem Details: CCI_REG_HNUM should be using CCI_REG16_LE() instead of CCI_REG8() as HNUM spans from 0x302e[0:7] to 0x302f[0:3]. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Fixes: 8f0926dba799 ("media: imx335: Use V4L2 CCI for accessing senso...
```diff diff --git a/drivers/media/i2c/imx335.c b/drivers/media/i2c/imx335.c index 0beb80b8c458..d400a019f6b3 100644 --- a/drivers/media/i2c/imx335.c +++ b/drivers/media/i2c/imx335.c @@ -31,7 +31,7 @@ #define IMX335_REG_CPWAIT_TIME CCI_REG8(0x300d) #define IMX335_REG_WINMODE CCI_REG8(0x3018) #define IMX335_REG_HTR...
363cd2b81cfdf706bbfc9ec78db000c9b1ecc552
Analyze and fix the following issue in the Linux kernel code: arm64: cpufeature: Move arm64_use_ng_mappings to the .data section to prevent wrong idmap generation
Problem Details: The PTE_MAYBE_NG macro sets the nG page table bit according to the value of "arm64_use_ng_mappings". This variable is currently placed in the .bss section. create_init_idmap() is called before the .bss section initialisation which is done in early_map_kernel(). Therefore, data/test_prot in create_init_...
```diff diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index 9c4d6d552b25..4c46d80aa64b 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -114,7 +114,14 @@ static struct arm64_cpu_capabilities const __ro_after_init *cpucap_ptrs[ARM64_NC DECLARE_BITMAP(b...
397f802d06c418efa636e46083edbeb00c91369e
Analyze and fix the following issue in the Linux kernel code: firmware: arm_scmi: quirk: Force perf level get fastchannel
Problem Details: The Qualcomm SCP firmware in X1E machines like the Lenovo ThinkPad T14s does not set the FastChannel supported attribute bit for PERF_LEVEL_GET but crashes when falling back to regular messaging. Use the new SCMI quirk framework to force FastChannel initialisation for this implementation. Note that w...
```diff diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c index e81cbc896f5d..2699c8efef0a 100644 --- a/drivers/firmware/arm_scmi/driver.c +++ b/drivers/firmware/arm_scmi/driver.c @@ -1895,6 +1895,13 @@ struct scmi_msg_resp_desc_fc { __le32 db_preserve_hmask; }; +#define QUIRK_PE...
7b487beab7cd853ab7de58746284898fb9316334
Analyze and fix the following issue in the Linux kernel code: firmware: arm_scmi: quirk: Fix CLOCK_DESCRIBE_RATES triplet
Problem Details: Convert an existing quirk in CLOCK_DESCRIBE_RATES parsing to the new quirk framework. This is a sort of a peculiar quirk since it matches any platform and any firmware. Signed-off-by: Cristian Marussi <cristian.marussi@arm.com> Message-Id: <20250429141108.406045-4-cristian.marussi@arm.com> Signed-off-...
```diff diff --git a/drivers/firmware/arm_scmi/clock.c b/drivers/firmware/arm_scmi/clock.c index 2ed2279388f0..afa7981efe82 100644 --- a/drivers/firmware/arm_scmi/clock.c +++ b/drivers/firmware/arm_scmi/clock.c @@ -11,6 +11,7 @@ #include "protocols.h" #include "notify.h" +#include "quirks.h" /* Updated only afte...
94a263f981a3fa3d93f65c31e0fed0756736be43
Analyze and fix the following issue in the Linux kernel code: firmware: arm_scmi: Ensure that the message-id supports fastchannel
Problem Details: Currently the perf and powercap protocol relies on the protocol domain attributes, which just ensures that one fastchannel per domain, before instantiating fastchannels for all possible message-ids. Fix this by ensuring that each message-id supports fastchannel before initialization. Logs: | scmi: ...
```diff diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c index 520aa5846916..cf2bc8b8d881 100644 --- a/drivers/firmware/arm_scmi/driver.c +++ b/drivers/firmware/arm_scmi/driver.c @@ -1729,6 +1729,39 @@ static int scmi_common_get_max_msg_size(const struct scmi_protocol_handle *ph) r...
ca698ec2f07873a448d53c580795c4e023c75393
Analyze and fix the following issue in the Linux kernel code: x86/insn: Fix opcode map (!REX2) superscript tags
Problem Details: Commit: 159039af8c07 ("x86/insn: x86/insn: Add support for REX2 prefix to the instruction decoder opcode map") added (!REX2) superscript with a space, but the correct format requires ',' for concatination with other superscript tags. Add ',' to generate correct insn attribute tables. I confirmed ...
```diff diff --git a/arch/x86/lib/x86-opcode-map.txt b/arch/x86/lib/x86-opcode-map.txt index f5dd84eb55dc..cd3fd5155f6e 100644 --- a/arch/x86/lib/x86-opcode-map.txt +++ b/arch/x86/lib/x86-opcode-map.txt @@ -35,7 +35,7 @@ # - (!F3) : the last prefix is not 0xF3 (including non-last prefix case) # - (66&F2): Both 0x66...
d8414603b29f25191fcceafb72e74b67ac2e92b1
Analyze and fix the following issue in the Linux kernel code: x86/fpu/xstate: Always preserve non-user xfeatures/flags in __state_perm
Problem Details: When granting userspace or a KVM guest access to an xfeature, preserve the entity's existing supervisor and software-defined permissions as tracked by __state_perm, i.e. use __state_perm to track *all* permissions even though all supported supervisor xfeatures are granted to all FPUs and FPU_GUEST_PERM...
```diff diff --git a/arch/x86/include/asm/fpu/types.h b/arch/x86/include/asm/fpu/types.h index 97310df3ea13..e64db0eb9d27 100644 --- a/arch/x86/include/asm/fpu/types.h +++ b/arch/x86/include/asm/fpu/types.h @@ -416,9 +416,11 @@ struct fpu_state_perm { /* * @__state_perm: * - * This bitmap indicates the permiss...
7f9958230d8a79d474829bee25ec9426397335ce
Analyze and fix the following issue in the Linux kernel code: x86/mm: Fix false positive warning in switch_mm_irqs_off()
Problem Details: Multiple testers reported the following new warning: WARNING: CPU: 0 PID: 0 at arch/x86/mm/tlb.c:795 Which corresponds to: if (IS_ENABLED(CONFIG_DEBUG_VM) && WARN_ON_ONCE(prev != &init_mm && !cpumask_test_cpu(cpu, mm_cpumask(next)))) cpumask_set_cpu(cpu, mm_cpumask(next)); So the problem i...
```diff diff --git a/arch/x86/include/asm/mmu.h b/arch/x86/include/asm/mmu.h index 8b8055a8eb9e..0fe9c569d171 100644 --- a/arch/x86/include/asm/mmu.h +++ b/arch/x86/include/asm/mmu.h @@ -16,6 +16,8 @@ #define MM_CONTEXT_LOCK_LAM 2 /* Allow LAM and SVA coexisting */ #define MM_CONTEXT_FORCE_TAGGED_SVA 3 +/* Tracks m...
fbaeb7b0f0ffb660bcc91dd5f96eaf8d99721656
Analyze and fix the following issue in the Linux kernel code: eth: fbnic: fix `tx_dropped` counting
Problem Details: Fix the tracking of rtnl_link_stats.tx_dropped. The counter `tmi.drop.frames` is being double counted whereas, the counter `tti.cm_drop.frames` is being skipped. Fixes: f2957147ae7a ("eth: fbnic: add support for TTI HW stats") Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Mohsin Bashi...
```diff diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_netdev.c b/drivers/net/ethernet/meta/fbnic/fbnic_netdev.c index d699f58dda21..f994cbf1857d 100644 --- a/drivers/net/ethernet/meta/fbnic/fbnic_netdev.c +++ b/drivers/net/ethernet/meta/fbnic/fbnic_netdev.c @@ -425,9 +425,9 @@ static void fbnic_get_stats64(struct ...
d4ad53adfe21df1464bae5ed916085a69d6ffb3d
Analyze and fix the following issue in the Linux kernel code: drm/ttm: Remove the struct ttm_backup abstraction
Problem Details: The abstraction was previously added to support separate ttm_backup implementations. However with the current implementation casting from a struct file to a struct ttm_backup, we run into trouble since struct file may have randomized the layout and gcc complains. Remove the struct ttm_backup abstract...
```diff diff --git a/drivers/gpu/drm/ttm/ttm_backup.c b/drivers/gpu/drm/ttm/ttm_backup.c index f58e7393888f..9e2d72c447ee 100644 --- a/drivers/gpu/drm/ttm/ttm_backup.c +++ b/drivers/gpu/drm/ttm/ttm_backup.c @@ -7,20 +7,6 @@ #include <linux/page-flags.h> #include <linux/swap.h> -/* - * Casting from randomized struct...
2bb04ea9e5b7a2ef583c042ed5f8111804606e9d
Analyze and fix the following issue in the Linux kernel code: drm/ttm: Fix ttm_backup kerneldoc
Problem Details: The docs were not properly updated from an earlier version of the code. Fixes: e7b5d23e5d47 ("drm/ttm: Provide a shmem backup implementation") Cc: Christian König <christian.koenig@amd.com> Cc: Matthew Brost <matthew.brost@intel.com> Cc: Matthew Auld <matthew.auld@intel.com> Cc: dri-devel@lists.freede...
```diff diff --git a/drivers/gpu/drm/ttm/ttm_backup.c b/drivers/gpu/drm/ttm/ttm_backup.c index 93c007f18855..f58e7393888f 100644 --- a/drivers/gpu/drm/ttm/ttm_backup.c +++ b/drivers/gpu/drm/ttm/ttm_backup.c @@ -55,7 +55,7 @@ void ttm_backup_drop(struct ttm_backup *backup, pgoff_t handle) * @backup: The struct backup ...
6c2d4c319c7db7be883428ae1161502f3f690e60
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Selftest for pKVM transitions
Problem Details: We have recently found a bug [1] in the pKVM memory ownership transitions by code inspection, but it could have been caught with a test. Introduce a boot-time selftest exercising all the known pKVM memory transitions and importantly checks the rejection of illegal transitions. The new test is hidden ...
```diff diff --git a/arch/arm64/kvm/hyp/include/nvhe/mem_protect.h b/arch/arm64/kvm/hyp/include/nvhe/mem_protect.h index ea0a704da9b8..535722cd8417 100644 --- a/arch/arm64/kvm/hyp/include/nvhe/mem_protect.h +++ b/arch/arm64/kvm/hyp/include/nvhe/mem_protect.h @@ -67,4 +67,10 @@ static __always_inline void __load_host_st...
1fe38d2a19950fa6dbc384ee8967c057aef9faf4
Analyze and fix the following issue in the Linux kernel code: arm64: dts: mt6359: Add missing 'compatible' property to regulators node
Problem Details: The 'compatible' property is required by the 'mfd/mediatek,mt6397.yaml' binding. Add it to fix the following dtb-check error: mediatek/mt8395-radxa-nio-12l.dtb: pmic: regulators: 'compatible' is a required property Fixes: 3b7d143be4b7 ("arm64: dts: mt6359: add PMIC MT6359 related nodes") Signed-off-by...
```diff diff --git a/arch/arm64/boot/dts/mediatek/mt6359.dtsi b/arch/arm64/boot/dts/mediatek/mt6359.dtsi index 7b10f9c59819..0c479404b3fe 100644 --- a/arch/arm64/boot/dts/mediatek/mt6359.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt6359.dtsi @@ -20,6 +20,8 @@ }; regulators { + compatible = "mediatek,mt6359-regul...
f9167f15dd4e70b124023a2f7ba2b09401b3b6ff
Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt8390-genio-common: Set ssusb2 default dual role mode to host
Problem Details: On the Mediatek Genio 510-EVK and 700-EVK boards, ssusb2 controller is one but has two ports: one is routed to the M.2 slot, the other is on the RPi header who does support full OTG. Since Mediatek Genio 700-EVK USB support was added, dual role mode property is set to otg for ssusb2. This config preven...
```diff diff --git a/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi b/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi index 127764c4d6be..aa8dd12a84ea 100644 --- a/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi @@ -1333,8 +1333,18 @@ }; ...
d77e89b7b03fb945b4353f2dcc4a70b34baa7bcb
Analyze and fix the following issue in the Linux kernel code: arm64: dts: mediatek: mt6357: Drop regulator-fixed compatibles
Problem Details: Some of the regulators in the MT6357 PMIC dtsi have compatible set to regulator-fixed, even though they don't serve any purpose: all those regulators are handled as a whole by the mt6357-regulator driver. In fact this is the only dtsi in this family of chips where this is the case: mt6359 and mt6358 do...
```diff diff --git a/arch/arm64/boot/dts/mediatek/mt6357.dtsi b/arch/arm64/boot/dts/mediatek/mt6357.dtsi index 5fafa842d312..dca4e5c3d8e2 100644 --- a/arch/arm64/boot/dts/mediatek/mt6357.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt6357.dtsi @@ -60,7 +60,6 @@ }; mt6357_vfe28_reg: ldo-vfe28 { - compatible = "r...
258aebf100540d36aba910f545d4d5ddf4ecaf0b
Analyze and fix the following issue in the Linux kernel code: drm/vkms: Adjust vkms_state->active_planes allocation type
Problem Details: In preparation for making the kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) The assigned t...
```diff diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu/drm/vkms/vkms_crtc.c index 12034ec12029..8c9898b9055d 100644 --- a/drivers/gpu/drm/vkms/vkms_crtc.c +++ b/drivers/gpu/drm/vkms/vkms_crtc.c @@ -194,7 +194,7 @@ static int vkms_crtc_atomic_check(struct drm_crtc *crtc, i++; } - vkms_state->active_p...
cc663ba3fe383a628a812f893cc98aafff39ab04
Analyze and fix the following issue in the Linux kernel code: x86/cpu: Sanitize CPUID(0x80000000) output
Problem Details: CPUID(0x80000000).EAX returns the max extended CPUID leaf available. On x86-32 machines without an extended CPUID range, a CPUID(0x80000000) query will just repeat the output of the last valid standard CPUID leaf on the CPU; i.e., a garbage values. Current tip:x86/cpu code protects against this by do...
```diff diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 4ada55f126ae..e5734df3b4a1 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -1005,17 +1005,18 @@ void get_cpu_cap(struct cpuinfo_x86 *c) c->x86_capability[CPUID_D_1_EAX] = eax; } - /* AMD-defined...
f287a048bccbf7e5a5d1cc55c974ee8ebda83ddc
Analyze and fix the following issue in the Linux kernel code: media: dt-bindings: Add OmniVision OV02C10
Problem Details: Extend the ov02e10 bindings yaml to describe the ov02c10 sensor which has the same bindings with a different compat string and different i2c address only. Other differences in sensor capabilities exist but are not expressed in devicetree. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.o...
```diff diff --git a/Documentation/devicetree/bindings/media/i2c/ovti,ov02e10.yaml b/Documentation/devicetree/bindings/media/i2c/ovti,ov02e10.yaml index 4ac4e11a16c8..03d476bcf805 100644 --- a/Documentation/devicetree/bindings/media/i2c/ovti,ov02e10.yaml +++ b/Documentation/devicetree/bindings/media/i2c/ovti,ov02e10.ya...
5a821e2d69e26b51b7f3740b6b0c3462b8cacaff
Analyze and fix the following issue in the Linux kernel code: powerpc/boot: Fix build with gcc 15
Problem Details: Similar to x86 the ppc boot code does not build with GCC 15. Copy the fix from commit ee2ab467bddf ("x86/boot: Use '-std=gnu11' to fix build with GCC 15") Signed-off-by: Michal Suchanek <msuchanek@suse.de> Tested-by: Amit Machhiwal <amachhiw@linux.ibm.com> Tested-by: Venkat Rao Bagalkote <venkat88@li...
```diff diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 184d0680e661..a7ab087d412c 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -70,6 +70,7 @@ BOOTCPPFLAGS := -nostdinc $(LINUXINCLUDE) BOOTCPPFLAGS += -isystem $(shell $(BOOTCC) -print-file-name=include) BOOT...
8c628207d6d114d16ee4f07ba8ee806b4982b13f
Analyze and fix the following issue in the Linux kernel code: scsi: scsi_debug: Reduce DEF_ATOMIC_WR_MAX_LENGTH
Problem Details: The default atomic write max length in DEF_ATOMIC_WR_MAX_LENGTH is excessively large. For 512B LBS, we would get a 4MB max, but due to block layer atomic write restrictions this is limited to 512KB. Reduce DEF_ATOMIC_WR_MAX_LENGTH to a value which would be more realistic (for a real device supporting...
```diff diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index 8cad54a682d5..aef33d1e346a 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -162,7 +162,7 @@ static const char *sdebug_version_date = "20210520"; #define DEF_VPD_USE_HOSTNO 1 #define DEF_WRITESAME_LENGTH 0xFFFF ...
bf6971a2b3eeb13535c907c03589f82a1adc429e
Analyze and fix the following issue in the Linux kernel code: scsi: dc395x: Remove leftover if statement in reselect()
Problem Details: Clang warns (or errors with CONFIG_WERROR=y): drivers/scsi/dc395x.c:2553:6: error: variable 'id' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] 2553 | if (!(rsel_tar_lun_id & (IDENTIFY_BASE << 8))) | ^~~~~~~~~~~~~~~~~~~~~~~~~...
```diff diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index 95145b9d9ce3..96b335c92603 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c @@ -2550,7 +2550,6 @@ static void reselect(struct AdapterCtlBlk *acb) } } /* Read Reselected Target Id and LUN */ - if (!(rsel_tar_lun_id & (IDENTIFY_...
4720f9707c783f642332dee3d56dccaefa850e42
Analyze and fix the following issue in the Linux kernel code: tools: ynl-gen: validate 0 len strings from kernel
Problem Details: Strings from the kernel are guaranteed to be null terminated and ynl_attr_validate() checks for this. But it doesn't check if the string has a len of 0, which would cause problems when trying to access data[len - 1]. Fix this by checking that len is positive. Signed-off-by: David Wei <dw@davidwei.uk> ...
```diff diff --git a/tools/net/ynl/lib/ynl.c b/tools/net/ynl/lib/ynl.c index ce32cb35007d..c4da34048ef8 100644 --- a/tools/net/ynl/lib/ynl.c +++ b/tools/net/ynl/lib/ynl.c @@ -364,7 +364,7 @@ int ynl_attr_validate(struct ynl_parse_arg *yarg, const struct nlattr *attr) "Invalid attribute (binary %s)", policy->nam...
4a9d494ca24b7fd509b3953fcb43d580cb05097b
Analyze and fix the following issue in the Linux kernel code: selftests: drv: net: add version indicator
Problem Details: Currently, the test result does not differentiate between the cases when either one of the address families are configured or if both the address families are configured. Ideally, the result should report if a particular case was skipped. ./drivers/net/ping.py TAP version 13 1..7 ok 1 ping.test_defaul...
```diff diff --git a/tools/testing/selftests/drivers/net/ping.py b/tools/testing/selftests/drivers/net/ping.py index 16b7d3ab0fc8..af8df2313a3b 100755 --- a/tools/testing/selftests/drivers/net/ping.py +++ b/tools/testing/selftests/drivers/net/ping.py @@ -136,13 +136,23 @@ def set_interface_init(cfg) -> None: cmd(f...
8bb7d8e5cf7f44ea89a445975cbd78888324f234
Analyze and fix the following issue in the Linux kernel code: selftests: drv: net: avoid skipping tests
Problem Details: On a system with either of the ipv4 or ipv6 information missing, tests are currently skipped. Ideally, the test should run as long as at least one address family is present. This patch make test run whenever possible. Before: ./drivers/net/ping.py TAP version 13 1..6 ok 1 ping.test_default # SKIP Test...
```diff diff --git a/tools/testing/selftests/drivers/net/ping.py b/tools/testing/selftests/drivers/net/ping.py index 5272e8b3536d..16b7d3ab0fc8 100755 --- a/tools/testing/selftests/drivers/net/ping.py +++ b/tools/testing/selftests/drivers/net/ping.py @@ -12,7 +12,8 @@ from lib.py import defer, ethtool, ip no_sleep=Fal...
b344a48cbe5fb24697addc6afbb7358b938a7d31
Analyze and fix the following issue in the Linux kernel code: selftests: drv: net: fix test failure on ipv6 sys
Problem Details: The `get_interface_info` call has ip version hard-coded which leads to failures on an IPV6 system. The NetDrvEnv class already gathers information about remote interface, so instead of fixing the local implementation switch to using cfg.remote_ifname. Before: ./drivers/net/ping.py Traceback (most rece...
```diff diff --git a/tools/testing/selftests/drivers/net/ping.py b/tools/testing/selftests/drivers/net/ping.py index 4b6822866066..5272e8b3536d 100755 --- a/tools/testing/selftests/drivers/net/ping.py +++ b/tools/testing/selftests/drivers/net/ping.py @@ -9,7 +9,6 @@ from lib.py import EthtoolFamily, NetDrvEpEnv from l...
c2dbda07662eb84dfe07887775d08eb1536c2d22
Analyze and fix the following issue in the Linux kernel code: ipv4: ip_tunnel: Replace strcpy use with strscpy
Problem Details: Use of strcpy is decpreated, replaces the use of strcpy with strscpy as recommended. strscpy was chosen as it requires a NUL terminated non-padded string, which is the case here. I am aware there is an explicit bounds check above the second instance, however using strscpy protects against buffer over...
```diff diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c index 3913ec89ad20..678b8f96e3e9 100644 --- a/net/ipv4/ip_tunnel.c +++ b/net/ipv4/ip_tunnel.c @@ -243,11 +243,11 @@ static struct net_device *__ip_tunnel_create(struct net *net, if (parms->name[0]) { if (!dev_valid_name(parms->name)) goto failed;...
18b8144a1bd8be5a88cc438c0c9213bae1be1a9d
Analyze and fix the following issue in the Linux kernel code: blk-throttle: Add an additional overflow check to the call calculate_bytes/io_allowed
Problem Details: Now the tg->[bytes/io]_disp type is signed, and calculate_bytes/io_allowed return type is unsigned. Even if the bps/iops limit is not set to max, the return value of the function may still exceed INT_MAX or LLONG_MAX, which can cause overflow in outer variables. In such cases, we can add additional che...
```diff diff --git a/block/blk-throttle.c b/block/blk-throttle.c index 776f5a1b718b..5263609ebd95 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c @@ -571,6 +571,48 @@ static u64 calculate_bytes_allowed(u64 bps_limit, unsigned long jiffy_elapsed) return mul_u64_u64_div_u64(bps_limit, (u64)jiffy_elapsed, (...
f66cf69eb8765341bbeff0e92a7d0d2027f62452
Analyze and fix the following issue in the Linux kernel code: blk-throttle: Fix wrong tg->[bytes/io]_disp update in __tg_update_carryover()
Problem Details: In commit 6cc477c36875 ("blk-throttle: carry over directly"), the carryover bytes/ios was be carried to [bytes/io]_disp. However, its update mechanism has some issues. In __tg_update_carryover(), we calculate "bytes" and "ios" to represent the carryover, but the computation when updating [bytes/io]_di...
```diff diff --git a/block/blk-throttle.c b/block/blk-throttle.c index d6dd2e047874..7437de947120 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c @@ -644,6 +644,18 @@ static void __tg_update_carryover(struct throtl_grp *tg, bool rw, u64 bps_limit = tg_bps_limit(tg, rw); u32 iops_limit = tg_iops_limit(t...
3e6a0243ff002ddbd7ee18a8974ae61d2e6ed00d
Analyze and fix the following issue in the Linux kernel code: gre: Fix again IPv6 link-local address generation.
Problem Details: Use addrconf_addr_gen() to generate IPv6 link-local addresses on GRE devices in most cases and fall back to using add_v4_addrs() only in case the GRE configuration is incompatible with addrconf_addr_gen(). GRE used to use addrconf_addr_gen() until commit e5dd729460ca ("ip/ip6_gre: use the same logic a...
```diff diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 9ba83f0c9928..c6b22170dc49 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -3214,16 +3214,13 @@ static void add_v4_addrs(struct inet6_dev *idev) struct in6_addr addr; struct net_device *dev; struct net *net = dev_net(idev->dev); - ...
0f72027bb9fb77a2b2ea7d73e6d58bb9c0efb1e8
Analyze and fix the following issue in the Linux kernel code: perf record --off-cpu: Parse off-cpu event
Problem Details: Parse the off-cpu event using parse_event(), as bpf-output. Call evlist__enable_evsel() on off-cpu event. This fixes the inability to collect direct off-cpu samples on a workload, as reported by Arnaldo Carvalho de Melo <acme@redhat.com>. The reason being, workload sets enable_on_exec instead of call...
```diff diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 6637a3acb1f1..4194ea5ac729 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -2568,6 +2568,13 @@ static int __cmd_record(struct record *rec, int argc, const char **argv) if (!target__none(&opts->target) &&...
c360eb0c3ccb95306704fd221442283ee82f1f58
Analyze and fix the following issue in the Linux kernel code: dt-bindings: net: ethernet-controller: Add informative text about RGMII delays
Problem Details: Device Tree and Ethernet MAC driver writers often misunderstand RGMII delays. Rewrite the Normative section in terms of the PCB, is the PCB adding the 2ns delay. This meaning was previous implied by the definition, but often wrongly interpreted due to the ambiguous wording and looking at the definition...
```diff diff --git a/Documentation/devicetree/bindings/net/ethernet-controller.yaml b/Documentation/devicetree/bindings/net/ethernet-controller.yaml index 45819b235800..a2d4c626f659 100644 --- a/Documentation/devicetree/bindings/net/ethernet-controller.yaml +++ b/Documentation/devicetree/bindings/net/ethernet-controlle...
23227e71b69af95e421e263302d13f426c548155
Analyze and fix the following issue in the Linux kernel code: workqueue: fix typo in comment
Problem Details: Fix a duplicated word "that that" in the comment describing the @max_active behavior for unbound workqueues. Signed-off-by: Guan-Chun Wu <409411716@gms.tku.edu.tw> Signed-off-by: Tejun Heo <tj@kernel.org>
```diff diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index b0dc957c3e56..a6dacc0eb688 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h @@ -480,7 +480,7 @@ void workqueue_softirq_dead(unsigned int cpu); * executing at most one work item for the workqueue. * * For unbound...
4d4c10f763d7808fbade28d83d237411603bca05
Analyze and fix the following issue in the Linux kernel code: PCI: Explicitly put devices into D0 when initializing
Problem Details: AMD BIOS team has root caused an issue that NVMe storage failed to come back from suspend to a lack of a call to _REG when NVMe device was probed. 112a7f9c8edbf ("PCI/ACPI: Call _REG when transitioning D-states") added support for calling _REG when transitioning D-states, but this only works if the de...
```diff diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index c8bd71a739f7..082918ce03d8 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c @@ -555,12 +555,6 @@ static void pci_pm_default_resume(struct pci_dev *pci_dev) pci_enable_wake(pci_dev, PCI_D0, false); } -static void pci_...
e371b9d3368ccb6b55fe9747be12c3107b2817b3
Analyze and fix the following issue in the Linux kernel code: selftests: ublk: kublk: fix include path
Problem Details: Building kublk currently fails (with a "could not find linux/ublk_cmd.h" error message) if kernel headers are not installed in a system-global location (i.e. somewhere in the compiler's default include search path). This failure is unnecessary, as make kselftest installs kernel headers in the build tre...
```diff diff --git a/tools/testing/selftests/ublk/Makefile b/tools/testing/selftests/ublk/Makefile index d8eb137abacd..e2e7b1e52a06 100644 --- a/tools/testing/selftests/ublk/Makefile +++ b/tools/testing/selftests/ublk/Makefile @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 -CFLAGS += -O3 -Wl,-no-as-needed -Wall ...
6c965d39af98a8b79668898b3a2af40d11179ff4
Analyze and fix the following issue in the Linux kernel code: ASoC: Intel: sof_sdw: Avoid NULL check fail when re-probing
Problem Details: The static platform_component name string is overwritten on card tear down by sof_link_unload(). After this has happened the NULL check on it in asoc_sdw_init_simple_dai_link() will fail when the driver is reprobed, causing the machine driver to fail probe. However, it also turns out that the ASoC core...
```diff diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 29b813943ccc..51b29ebdf405 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -780,13 +780,6 @@ static void sof_sdw_check_ssid_quirk(const struct snd_soc_acpi_mach *mach) sof_sdw_quirk ...
e66b0a8f048bc8590eb1047480f946898a3f80c9
Analyze and fix the following issue in the Linux kernel code: i2c: omap: fix deprecated of_property_read_bool() use
Problem Details: Using of_property_read_bool() for non-boolean properties is deprecated and results in a warning during runtime since commit c141ecc3cecd ("of: Warn when of_property_read_bool() is used on non-boolean properties"). Fixes: b6ef830c60b6 ("i2c: omap: Add support for setting mux") Cc: Jayesh Choudhary <j-c...
```diff diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index 16afb9ca19bb..876791d20ed5 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -1454,7 +1454,7 @@ omap_i2c_probe(struct platform_device *pdev) (1000 * omap->speed / 8); } - if (of_prope...
41d4ce6df3f4945341ec509a840cc002a413b6cc
Analyze and fix the following issue in the Linux kernel code: bpf: Fix uninitialized values in BPF_{CORE,PROBE}_READ
Problem Details: With the latest LLVM bpf selftests build will fail with the following error message: progs/profiler.inc.h:710:31: error: default initialization of an object of type 'typeof ((parent_task)->real_cred->uid.val)' (aka 'const unsigned int') leaves the object uninitialized and is incompatible with C++ ...
```diff diff --git a/tools/lib/bpf/bpf_core_read.h b/tools/lib/bpf/bpf_core_read.h index c0e13cdf9660..b997c68bd945 100644 --- a/tools/lib/bpf/bpf_core_read.h +++ b/tools/lib/bpf/bpf_core_read.h @@ -388,7 +388,13 @@ extern void *bpf_rdonly_cast(const void *obj, __u32 btf_id) __ksym __weak; #define ___arrow10(a, b, c, ...
4397684a292a71fbc1e815c3e283f7490ddce5ae
Analyze and fix the following issue in the Linux kernel code: virtio-net: free xsk_buffs on error in virtnet_xsk_pool_enable()
Problem Details: The selftests added to our CI by Bui Quang Minh recently reveals that there is a mem leak on the error path of virtnet_xsk_pool_enable(): unreferenced object 0xffff88800a68a000 (size 2048): comm "xdp_helper", pid 318, jiffies 4294692778 hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 ...
```diff diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index b5549d542c02..f9e3e628ec4d 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -5890,8 +5890,10 @@ static int virtnet_xsk_pool_enable(struct net_device *dev, hdr_dma = virtqueue_dma_map_single_attrs(sq->vq, &xsk_hdr, ...
1e20324b23f0afba27997434fb978f1e4a1dbcb6
Analyze and fix the following issue in the Linux kernel code: virtio-net: don't re-enable refill work too early when NAPI is disabled
Problem Details: Commit 4bc12818b363 ("virtio-net: disable delayed refill when pausing rx") fixed a deadlock between reconfig paths and refill work trying to disable the same NAPI instance. The refill work can't run in parallel with reconfig because trying to double-disable a NAPI instance causes a stall under the inst...
```diff diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 848fab51dfa1..b5549d542c02 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -3383,12 +3383,15 @@ static void __virtnet_rx_resume(struct virtnet_info *vi, bool refill) { bool running = netif_running(vi->dev); + ...
3769478610135e82b262640252d90f6efb05be71
Analyze and fix the following issue in the Linux kernel code: sch_htb: make htb_deactivate() idempotent
Problem Details: Alan reported a NULL pointer dereference in htb_next_rb_node() after we made htb_qlen_notify() idempotent. It turns out in the following case it introduced some regression: htb_dequeue_tree(): |-> fq_codel_dequeue() |-> qdisc_tree_reduce_backlog() |-> htb_qlen_notify() |-> htb_dea...
```diff diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 4b9a639b642e..14bf71f57057 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c @@ -348,7 +348,8 @@ static void htb_add_to_wait_tree(struct htb_sched *q, */ static inline void htb_next_rb_node(struct rb_node **n) { - *n = rb_next(*n); + if (...
12370bfcc4f0bdf70279ec5b570eb298963422b5
Analyze and fix the following issue in the Linux kernel code: drm/xe/gsc: do not flush the GSC worker from the reset path
Problem Details: The workqueue used for the reset worker is marked as WQ_MEM_RECLAIM, while the GSC one isn't (and can't be as we need to do memory allocations in the gsc worker). Therefore, we can't flush the latter from the former. The reason why we had such a flush was to avoid interrupting either the GSC FW load o...
```diff diff --git a/drivers/gpu/drm/xe/xe_gsc.c b/drivers/gpu/drm/xe/xe_gsc.c index fd41113f8572..0bcf97063ff6 100644 --- a/drivers/gpu/drm/xe/xe_gsc.c +++ b/drivers/gpu/drm/xe/xe_gsc.c @@ -555,6 +555,28 @@ void xe_gsc_wait_for_worker_completion(struct xe_gsc *gsc) flush_work(&gsc->work); } +void xe_gsc_stop_pre...
04e7638dd64af20e4e81b7569abea9673e337098
Analyze and fix the following issue in the Linux kernel code: arm64: tegra: tegra210-p2894: Align GPIO hog node name with preferred style
Problem Details: GPIO hogs device node names can use 'hog' prefix or suffix, but the suffix is preferred. The pattern in DT schema might narrow in the future, so adjust the DTS now. Link: https://lore.kernel.org/r/20250115204603.136997-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski <krzysztof.koz...
```diff diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2894.dtsi b/arch/arm64/boot/dts/nvidia/tegra210-p2894.dtsi index bbd6ff0564da..b84a8e39b404 100644 --- a/arch/arm64/boot/dts/nvidia/tegra210-p2894.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra210-p2894.dtsi @@ -1365,7 +1365,7 @@ }; }; - hog-0 { + ma...
157dbc4a321f5bb6f8b6c724d12ba720a90f1a7c
Analyze and fix the following issue in the Linux kernel code: KVM: arm64: Fix uninitialized memcache pointer in user_mem_abort()
Problem Details: Commit fce886a60207 ("KVM: arm64: Plumb the pKVM MMU in KVM") made the initialization of the local memcache variable in user_mem_abort() conditional, leaving a codepath where it is used uninitialized via kvm_pgtable_stage2_map(). This can fail on any path that requires a stage-2 allocation without tra...
```diff diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c index 754f2fe0cc67..eeda92330ade 100644 --- a/arch/arm64/kvm/mmu.c +++ b/arch/arm64/kvm/mmu.c @@ -1501,6 +1501,11 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa, return -EFAULT; } + if (!is_protected_kvm_enabled()) + mem...
8ecd32b668238a7a79b2f44b66dae8ffb87ac763
Analyze and fix the following issue in the Linux kernel code: docs: backlight: Clarify `actual_brightness`
Problem Details: Currently userspace software systemd treats `brightness` and `actual_brightness` identically due to a bug found in an out of tree driver. This however causes problems for in-tree drivers that use brightness to report user requested `brightness` and `actual_brightness` to report what the hardware actua...
```diff diff --git a/Documentation/ABI/stable/sysfs-class-backlight b/Documentation/ABI/stable/sysfs-class-backlight index 6102d6bebdf9..40b8c46b95b2 100644 --- a/Documentation/ABI/stable/sysfs-class-backlight +++ b/Documentation/ABI/stable/sysfs-class-backlight @@ -26,7 +26,12 @@ Date: March 2006 KernelVersion: 2.6....
f3efb9569b4a21354ef2caf7ab0608a3e14cc6e4
Analyze and fix the following issue in the Linux kernel code: PCI: Fix lock symmetry in pci_slot_unlock()
Problem Details: The commit a4e772898f8b ("PCI: Add missing bridge lock to pci_bus_lock()") made the lock function to call depend on dev->subordinate but left pci_slot_unlock() unmodified creating locking asymmetry compared with pci_slot_lock(). Because of the asymmetric lock handling, the same bridge device is unlock...
```diff diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 4d7c9f64ea24..26507aa906d7 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -5542,7 +5542,8 @@ static void pci_slot_unlock(struct pci_slot *slot) continue; if (dev->subordinate) pci_bus_unlock(dev->subordinate); - pci_dev_unlock(dev);...
aed4ccbf4595e08f3fa80c7faaf1d2188d61bc70
Analyze and fix the following issue in the Linux kernel code: bcachefs: fix hung task timeout in journal read
Problem Details: Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
```diff diff --git a/fs/bcachefs/journal_io.c b/fs/bcachefs/journal_io.c index 63cdf885c9e2..ded18a94ed02 100644 --- a/fs/bcachefs/journal_io.c +++ b/fs/bcachefs/journal_io.c @@ -19,6 +19,7 @@ #include <linux/ioprio.h> #include <linux/string_choices.h> +#include <linux/sched/sysctl.h> void bch2_journal_pos_from_...
c38de9db7493b866731b0ce3f76fcd4c2c63a9c2
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Promote DC to 3.2.331
Problem Details: Summary * Remove redundant NULL check * Fix invalid context error in dml helper * Prepare for Fused I2C-over-AUX * Allow DSCClock disable * Vmax / Vmin update for Vsync * Fix race condition in DPIA AUX transfer * Fix wrong handling for AUX_DEFER case * Only wait for required space in DMUB mailbox Ack...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index eab6222a13e7..2230e36c4f12 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -53,7 +53,7 @@ struct aux_payload; struct set_config_cmd_payload; struct dmub_notification; -#...
3637e457eb0000bc37d8bbbec95964aad2fb29fd
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix wrong handling for AUX_DEFER case
Problem Details: [Why] We incorrectly ack all bytes get written when the reply actually is defer. When it's defer, means sink is not ready for the request. We should retry the request. [How] Only reply all data get written when receive I2C_ACK|AUX_ACK. Otherwise, reply the number of actual written bytes received from ...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c index d8dcfb3efaaa..d19aea595722 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c @@ -5...
9b540e3fe6796fec4fb1344f3be8952fc2f084d4
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Copy AUX read reply data whenever length > 0
Problem Details: [Why] amdgpu_dm_process_dmub_aux_transfer_sync() should return all exact data reply from the sink side. Don't do the analysis job in it. [How] Remove unnecessary check condition AUX_TRANSACTION_REPLY_AUX_ACK. Fixes: ead08b95fa50 ("drm/amd/display: Fix race condition in DPIA AUX transfer") Cc: Mario L...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 7e41f99e9e26..8984e211dd1c 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -12853,8 +12853,7 @@ int amdgpu_dm_process...
81b5c6fa62af62fe89ae9576f41aae37830b94cb
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Remove incorrect checking in dmub aux handler
Problem Details: [Why & How] "Request length != reply length" is expected behavior defined in spec. It's not an invalid reply. Besides, replied data handling logic is not designed to be written in amdgpu_dm_process_dmub_aux_transfer_sync(). Remove the incorrectly handling section. Fixes: ead08b95fa50 ("drm/amd/display...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 2c4cae5e1a20..7e41f99e9e26 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -12854,19 +12854,9 @@ int amdgpu_dm_proces...
1db6c9e9b62e1a8912f0a281c941099fca678da3
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix the checking condition in dmub aux handling
Problem Details: [Why & How] Fix the checking condition for detecting AUX_RET_ERROR_PROTOCOL_ERROR. It was wrongly checking by "not equals to" Reviewed-by: Ray Wu <ray.wu@amd.com> Signed-off-by: Wayne Lin <Wayne.Lin@amd.com> Signed-off-by: Ray Wu <ray.wu@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Sign...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 31894e52f307..2c4cae5e1a20 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -12839,7 +12839,7 @@ int amdgpu_dm_process...
d5c9ade755a9afa210840708a12a8f44c0d532f4
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Shift DMUB AUX reply command if necessary
Problem Details: [Why] Defined value of dmub AUX reply command field get updated but didn't adjust dm receiving side accordingly. [How] Check the received reply command value to see if it's updated version or not. Adjust it if necessary. Fixes: ead08b95fa50 ("drm/amd/display: Fix race condition in DPIA AUX transfer")...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index f531bb3bf3d3..31894e52f307 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -12848,8 +12848,11 @@ int amdgpu_dm_proces...
94da0735b67b3ada90a3e2e017d306f070306f1d
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Remove unnecessary DC_FP_START/DC_FP_END
Problem Details: [WHY & HOW] Remove the unnecessary DC_FP_START/DC_FP_END pair to reduce time in preempt_disable. It also fixes "BUG: sleeping function called from invalid context" error messages because of calling kzalloc with GFP_KERNEL which can sleep. Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c index 2a59cc61ed8c..944650cb13de 100644 --- a/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.c +++ b/drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_reso...
bd3e84bc98f81b44f2c43936bdadc3241d654259
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix invalid context error in dml helper
Problem Details: [Why] "BUG: sleeping function called from invalid context" error. after: "drm/amd/display: Protect FPU in dml2_validate()/dml21_validate()" The populate_dml_plane_cfg_from_plane_state() uses the GFP_KERNEL flag for memory allocation, which shouldn't be used in atomic contexts. The allocation is neede...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c b/drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c index 857ce1695fd5..5de775fd8fce 100644 --- a/drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c +++ b/drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper...
c7e923b8a249e3a810c0d4944520eaa86f1326d8
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Promote DC to 3.2.330
Problem Details: Summary * Update IPS checks to properly include all ASICs. * Refactoring DSC enum dsc_bits_per_comp * Fix ACPI edid parsing issue * Update AUX read interval for LTTPR with old sinks * Correct prefetch calculation Acked-by: Tom Chung <chiahsuan.chung@amd.com> Signed-off-by: Taimur Hassan <Syed.Hassan@...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 4e7423cfe799..a9bd84469821 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -53,7 +53,7 @@ struct aux_payload; struct set_config_cmd_payload; struct dmub_notification; -#...
6ebf1982038af12f3588417e4fd0417d2551da28
Analyze and fix the following issue in the Linux kernel code: fpga: fix potential null pointer deref in fpga_mgr_test_img_load_sgt()
Problem Details: fpga_mgr_test_img_load_sgt() allocates memory for sgt using kunit_kzalloc() however it does not check if the allocation failed. It then passes sgt to sg_alloc_table(), which passes it to __sg_alloc_table(). This function calls memset() on sgt in an attempt to zero it out. If the allocation fails then s...
```diff diff --git a/drivers/fpga/tests/fpga-mgr-test.c b/drivers/fpga/tests/fpga-mgr-test.c index 9cb37aefbac4..1902ebf5a298 100644 --- a/drivers/fpga/tests/fpga-mgr-test.c +++ b/drivers/fpga/tests/fpga-mgr-test.c @@ -263,6 +263,7 @@ static void fpga_mgr_test_img_load_sgt(struct kunit *test) img_buf = init_test_buff...
43c2df7e2b08db6d65ce9707e4090f1f0c61f2f6
Analyze and fix the following issue in the Linux kernel code: x86/alternative: Remove unused header #defines
Problem Details: Remove some unfortunately-named unused macros which could potentially result in weird build failures. Fortunately, they are under an #ifdef __ASSEMBLER__ which has kept them from causing problems so far. [ dhansen: subject and changelog tweaks ] Fixes: 1a6ade825079 ("x86/alternative: Convert the asm ...
```diff diff --git a/arch/x86/include/asm/alternative.h b/arch/x86/include/asm/alternative.h index ef84739a77f5..e18cdaa1573c 100644 --- a/arch/x86/include/asm/alternative.h +++ b/arch/x86/include/asm/alternative.h @@ -341,11 +341,6 @@ void nop_func(void); __ALTERNATIVE(\oldinstr, \newinstr, \ft_flags) .endm -#def...
5d2ea5aebbb2f3ebde4403f9c55b2b057e5dd2d6
Analyze and fix the following issue in the Linux kernel code: RDMA/mlx5: Fix error flow upon firmware failure for RQ destruction
Problem Details: Upon RQ destruction if the firmware command fails which is the last resource to be destroyed some SW resources were already cleaned regardless of the failure. Now properly rollback the object to its original state upon such failure. In order to avoid a use-after free in case someone tries to destroy ...
```diff diff --git a/drivers/infiniband/hw/mlx5/qpc.c b/drivers/infiniband/hw/mlx5/qpc.c index d3dcc272200a..146d03ae40bd 100644 --- a/drivers/infiniband/hw/mlx5/qpc.c +++ b/drivers/infiniband/hw/mlx5/qpc.c @@ -21,8 +21,10 @@ mlx5_get_rsc(struct mlx5_qp_table *table, u32 rsn) spin_lock_irqsave(&table->lock, flags); ...
7590649ee7af381a9d1153143026dec124c5798e
Analyze and fix the following issue in the Linux kernel code: IB/cm: Drop lockdep assert and WARN when freeing old msg
Problem Details: The send completion handler can run after cm_id has advanced to another message. The cm_id lock is not needed in this case, but a recent change re-used cm_free_priv_msg(), which asserts that the lock is held and WARNs if the cm_id's currently outstanding msg is different than the one being freed. Fix...
```diff diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c index effa53dd6800..e64cbd034a2a 100644 --- a/drivers/infiniband/core/cm.c +++ b/drivers/infiniband/core/cm.c @@ -3786,7 +3786,8 @@ static void cm_process_send_error(struct cm_id_private *cm_id_priv, spin_lock_irq(&cm_id_priv->lock); i...
cab63934c33b12c0d1e9f4da7450928057f2c142
Analyze and fix the following issue in the Linux kernel code: xhci: dbc: Avoid event polling busyloop if pending rx transfers are inactive.
Problem Details: Event polling delay is set to 0 if there are any pending requests in either rx or tx requests lists. Checking for pending requests does not work well for "IN" transfers as the tty driver always queues requests to the list and TRBs to the ring, preparing to receive data from the host. This causes unnec...
```diff diff --git a/drivers/usb/host/xhci-dbgcap.c b/drivers/usb/host/xhci-dbgcap.c index fd7895b24367..0d4ce5734165 100644 --- a/drivers/usb/host/xhci-dbgcap.c +++ b/drivers/usb/host/xhci-dbgcap.c @@ -823,6 +823,7 @@ static enum evtreturn xhci_dbc_do_handle_events(struct xhci_dbc *dbc) { dma_addr_t deq; union x...
6328bdc988d23201c700e1e7e04eb05a1149ac1e
Analyze and fix the following issue in the Linux kernel code: usb: xhci: Don't trust the EP Context cycle bit when moving HW dequeue
Problem Details: VIA VL805 doesn't bother updating the EP Context cycle bit when the endpoint halts. This is seen by patching xhci_move_dequeue_past_td() to print the cycle bits of the EP Context and the TRB at hw_dequeue and then disconnecting a flash drive while reading it. Actual cycle state is random as expected, b...
```diff diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index b906bc2eea5f..423bf3649570 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -699,7 +699,7 @@ static int xhci_move_dequeue_past_td(struct xhci_hcd *xhci, int new_cycle; dma_addr_t addr; u64 hw_dequ...
50935044e58e563cdcfd556d62f27bc8744dd64e
Analyze and fix the following issue in the Linux kernel code: drm/bridge: anx7625: change the gpiod_set_value API
Problem Details: Use gpiod_set_value_cansleep() instead of gpiod_set_value() to fix the below call trace in the boot log: [ 5.690534] Call trace: [ 5.690536] gpiod_set_value+0x40/0xa4 [ 5.690540] anx7625_runtime_pm_resume+0xa0/0x324 [anx7625] [ 5.690545] __rpm_callback+0x48/0x1d8 [ 5.690549] rpm_cal...
```diff diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c index ccfddf2d88a6..8a9079c2ed5c 100644 --- a/drivers/gpu/drm/bridge/analogix/anx7625.c +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -1257,10 +1257,10 @@ static void anx7625_power_on(struct anx7625_data *ctx...
366ca0bcc953a4a8a9c9ce2133e6843730210049
Analyze and fix the following issue in the Linux kernel code: drm/bridge: anx7625: fix anx7625_sink_detect() to return correct hpd status
Problem Details: In the anx7625_sink_detect(), the device is checked to see if it is a panel bridge, and it always sends a "connected" status to the connector. When adding the DP port on port 1 of the anx7625, it incorrectly treats it as a panel bridge and sends an always "connected" status. Instead of checking the sta...
```diff diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c index a791a2df951a..ccfddf2d88a6 100644 --- a/drivers/gpu/drm/bridge/analogix/anx7625.c +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -1814,9 +1814,6 @@ static enum drm_connector_status anx7625_sink_detect(st...
71867e8d88fc7f94c2e47b3cfd676710c120cbe3
Analyze and fix the following issue in the Linux kernel code: drm/bridge: anx7625: fix drm_bridge ops flags to support hot-plugging
Problem Details: The anx7625_link_bridge() checks if a device is not a panel bridge and add DRM_BRIDGE_OP_HPD and DRM_BRIDGE_OP_DETECT flags to the drm_bridge->ops. However, on port 1 of the anx7625 bridge, any device added is always treated as a panel bridge, preventing connector_detect() from being called. To resolve...
```diff diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c index 8cfae7f3c9ee..a791a2df951a 100644 --- a/drivers/gpu/drm/bridge/analogix/anx7625.c +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -2603,9 +2603,8 @@ static int anx7625_link_bridge(struct drm_dp_aux *aux) ...
ab8131028710d009ab93d6bffd2a2749ade909b0
Analyze and fix the following issue in the Linux kernel code: x86/CPU/AMD: Print the reason for the last reset
Problem Details: The following register contains bits that indicate the cause for the previous reset. PMx000000C0 (FCH::PM::S5_RESET_STATUS) This is useful for debug. The reasons for reset are broken into 6 high level categories. Decode it by category and print during boot. Specifics within a category are split of...
```diff diff --git a/Documentation/arch/x86/amd-debugging.rst b/Documentation/arch/x86/amd-debugging.rst index d3290f2e4be7..d92bf59d62c7 100644 --- a/Documentation/arch/x86/amd-debugging.rst +++ b/Documentation/arch/x86/amd-debugging.rst @@ -52,6 +52,7 @@ report generated from this script to Spurious s2idle wakeups...
3919600d32b92e67f1d28376bd63152306e99452
Analyze and fix the following issue in the Linux kernel code: s390/mm: Fix potential use-after-free in __crst_table_upgrade()
Problem Details: The pointer to the mm_struct which is passed to __crst_table_upgrade() may only be dereferenced if it is identical to current->active_mm. Otherwise the current task has no reference to the mm_struct and it may already be freed. In such a case this would result in a use-after-free bug. Make sure this u...
```diff diff --git a/arch/s390/mm/pgalloc.c b/arch/s390/mm/pgalloc.c index e33903b419a9..d177bea0bd73 100644 --- a/arch/s390/mm/pgalloc.c +++ b/arch/s390/mm/pgalloc.c @@ -40,9 +40,9 @@ static void __crst_table_upgrade(void *arg) struct mm_struct *mm = arg; struct ctlreg asce; - asce.val = mm->context.asce; /* c...
833542b3e3d23f640aef6569ba1fd641bc195fa0
Analyze and fix the following issue in the Linux kernel code: s390/dcssblk: Fix build error with CONFIG_DAX=m and CONFIG_DCSSBLK=y
Problem Details: After commit 653d7825c149 ("dcssblk: mark DAX broken, remove FS_DAX_LIMITED support") moved the "select DAX" from config DCSSBLK to the new config DCSSBLK_DAX, randconfig tests could result in build errors like this: s390-linux-ld: drivers/s390/block/dcssblk.o: in function `dcssblk_shared_store': driv...
```diff diff --git a/drivers/s390/block/Kconfig b/drivers/s390/block/Kconfig index 4bfe469c04aa..8c1c908d2c6e 100644 --- a/drivers/s390/block/Kconfig +++ b/drivers/s390/block/Kconfig @@ -5,7 +5,7 @@ comment "S/390 block device drivers" config DCSSBLK def_tristate m prompt "DCSSBLK support" - depends on S390 && BLO...
ae952eea6f4a7e2193f8721a5366049946e012e7
Analyze and fix the following issue in the Linux kernel code: s390/entry: Fix last breaking event handling in case of stack corruption
Problem Details: In case of stack corruption stack_invalid() is called and the expectation is that register r10 contains the last breaking event address. This dependency is quite subtle and broke a couple of years ago without that anybody noticed. Fix this by getting rid of the dependency and read the last breaking ev...
```diff diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index dd291c9ad6a6..9980c17ba22d 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S @@ -602,7 +602,8 @@ SYM_CODE_START(stack_invalid) stmg %r0,%r7,__PT_R0(%r11) stmg %r8,%r9,__PT_PSW(%r11) mvc __PT_R8(64,%r11),0(%r14) - stg...
94cff94634e506a4a44684bee1875d2dbf782722
Analyze and fix the following issue in the Linux kernel code: clocksource/i8253: Use raw_spinlock_irqsave() in clockevent_i8253_disable()
Problem Details: On x86 during boot, clockevent_i8253_disable() can be invoked via x86_late_time_init -> hpet_time_init() -> pit_timer_init() which happens with enabled interrupts. If some of the old i8253 hardware is actually used then lockdep will notice that i8253_lock is used in hard interrupt context. This causes...
```diff diff --git a/drivers/clocksource/i8253.c b/drivers/clocksource/i8253.c index 39f7c2d736d1..b603c25f3dfa 100644 --- a/drivers/clocksource/i8253.c +++ b/drivers/clocksource/i8253.c @@ -103,7 +103,7 @@ int __init clocksource_i8253_init(void) #ifdef CONFIG_CLKEVT_I8253 void clockevent_i8253_disable(void) { - raw...
f5c84eff634ba003326aa034c414e2a9dcb7c6a7
Analyze and fix the following issue in the Linux kernel code: loop: Add sanity check for read/write_iter
Problem Details: Some file systems do not support read_iter/write_iter, such as selinuxfs in this issue. So before calling them, first confirm that the interface is supported and then call it. It is releavant in that vfs_iter_read/write have the check, and removal of their used caused szybot to be able to hit this iss...
```diff diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 46cba261075f..b8ba7de08753 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -505,6 +505,17 @@ static void loop_assign_backing_file(struct loop_device *lo, struct file *file) lo->lo_min_dio_size = loop_query_min_dio_size(lo); } +s...
eb16b3727c05ed36420c90eca1e8f0e279514c1c
Analyze and fix the following issue in the Linux kernel code: riscv: misaligned: Add handling for ZCB instructions
Problem Details: Add support for the Zcb extension's compressed half-word instructions (C.LHU, C.LH, and C.SH) in the RISC-V misaligned access trap handler. Signed-off-by: Zong Li <zong.li@sifive.com> Signed-off-by: Nylon Chen <nylon.chen@sifive.com> Fixes: 956d705dd279 ("riscv: Unaligned load/store handling for M_MOD...
```diff diff --git a/arch/riscv/kernel/traps_misaligned.c b/arch/riscv/kernel/traps_misaligned.c index 4354c87c0376..dde5d11dc1b5 100644 --- a/arch/riscv/kernel/traps_misaligned.c +++ b/arch/riscv/kernel/traps_misaligned.c @@ -88,6 +88,13 @@ #define INSN_MATCH_C_FSWSP 0xe002 #define INSN_MASK_C_FSWSP 0xe003 +#def...
64745a9ca890ed60d78162ec511e1983e1946d73
Analyze and fix the following issue in the Linux kernel code: crypto: s390/sha512 - Initialise upper counter to zero for sha384
Problem Details: Initialise the high bit counter to zero in sha384_init. Also change the state initialisation to use ctx->sha512.state instead of ctx->state for consistency. Fixes: 572b5c4682c7 ("crypto: s390/sha512 - Use API partial block handling") Reported-by: Ingo Franzki <ifranzki@linux.ibm.com> Reported-by: Har...
```diff diff --git a/arch/s390/crypto/sha512_s390.c b/arch/s390/crypto/sha512_s390.c index 3c5175e6dda6..33711a29618c 100644 --- a/arch/s390/crypto/sha512_s390.c +++ b/arch/s390/crypto/sha512_s390.c @@ -86,15 +86,16 @@ static int sha384_init(struct shash_desc *desc) { struct s390_sha_ctx *ctx = shash_desc_ctx(desc);...
0f67578587bb9e5a8eecfcdf6b8a501b5bd90526
Analyze and fix the following issue in the Linux kernel code: arm64: dts: amlogic: dreambox: fix missing clkc_audio node
Problem Details: Add the clkc_audio node to fix audio support on Dreambox One/Two. Fixes: 83a6f4c62cb1 ("arm64: dts: meson: add initial support for Dreambox One/Two") CC: stable@vger.kernel.org Suggested-by: Emanuel Strobel <emanuel.strobel@yahoo.com> Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> Review...
```diff diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-dreambox.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-dreambox.dtsi index de35fa2d7a6d..8e3e3354ed67 100644 --- a/arch/arm64/boot/dts/amlogic/meson-g12b-dreambox.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-dreambox.dtsi @@ -116,6 +116,10 @@ status = "...
692a497eb748fa597918f1faa11e77465b23cc00
Analyze and fix the following issue in the Linux kernel code: USB: serial: ti_usb_3410_5052: drop bogus read urb check
Problem Details: The read urb pointer is dereferenced before checking that it is non-NULL during open(), but no check is needed as the existence of a bulk in endpoint is verified during attach() since commit ef079936d3cd ("USB: serial: ti_usb_3410_5052: fix NULL-deref at open"). Drop the bogus read urb sanity check. ...
```diff diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index a0c244bc77c0..d671189ecee2 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c @@ -729,11 +729,6 @@ static int ti_open(struct tty_struct *tty, struct usb_serial_port *port)...
960bc2bcba5987a82530b9756e1f602a894cffa4
Analyze and fix the following issue in the Linux kernel code: x86/fpu: Restore fpu_thread_struct_whitelist() to fix CONFIG_HARDENED_USERCOPY=y crash
Problem Details: Borislav Petkov reported the following boot crash on x86-32, with CONFIG_HARDENED_USERCOPY=y: | usercopy: Kernel memory overwrite attempt detected to SLUB object 'task_struct' (offset 2112, size 160)! | ... | kernel BUG at mm/usercopy.c:102! So the useroffset and usersize arguments are what ...
```diff diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index eaa7214d6953..ad33903dc92a 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h @@ -522,14 +522,12 @@ extern struct fpu *x86_task_fpu(struct task_struct *task); # define x86_task_fpu(task) ((s...
fc91d5e6d948733773af35ef3b95504d8e588e4f
Analyze and fix the following issue in the Linux kernel code: selftests: netfilter: nft_fib.sh: check lo packets bypass fib lookup
Problem Details: With reverted fix: PASS: fib expression did not cause unwanted packet drops [ 37.285169] ns1-KK76Kt nft_rpfilter: IN=lo OUT= MAC=00:00:00:00:00:00:00:00:00:00:00:00:08:00 SRC=127.0.0.1 DST=127.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=32287 DF PROTO=ICMP TYPE=8 CODE=0 ID=1818 SEQ=1 FAIL: rpfilter did...
```diff diff --git a/tools/testing/selftests/net/netfilter/nft_fib.sh b/tools/testing/selftests/net/netfilter/nft_fib.sh index ce1451c275fd..ea47dd246a08 100755 --- a/tools/testing/selftests/net/netfilter/nft_fib.sh +++ b/tools/testing/selftests/net/netfilter/nft_fib.sh @@ -45,6 +45,19 @@ table inet filter { EOF } ...
4c5c6aa9967dbe55bd017bb509885928d0f31206
Analyze and fix the following issue in the Linux kernel code: netfilter: nft_set_pipapo: prevent overflow in lookup table allocation
Problem Details: When calculating the lookup table size, ensure the following multiplication does not overflow: - desc->field_len[] maximum value is U8_MAX multiplied by NFT_PIPAPO_GROUPS_PER_BYTE(f) that can be 2, worst case. - NFT_PIPAPO_BUCKETS(f->bb) is 2^8, worst case. - sizeof(unsigned long), from sizeof(*f->l...
```diff diff --git a/net/netfilter/nft_set_pipapo.c b/net/netfilter/nft_set_pipapo.c index 7be342b495f5..0529e4ef7520 100644 --- a/net/netfilter/nft_set_pipapo.c +++ b/net/netfilter/nft_set_pipapo.c @@ -683,6 +683,30 @@ out_free: return 0; } + +/** + * lt_calculate_size() - Get storage size for lookup table with o...
bfe7cfb65c753952735c3eed703eba9a8b96a18d
Analyze and fix the following issue in the Linux kernel code: netfilter: nft_quota: match correctly when the quota just depleted
Problem Details: The xt_quota compares skb length with remaining quota, but the nft_quota compares it with consumed bytes. The xt_quota can match consumed bytes up to quota at maximum. But the nft_quota break match when consumed bytes equal to quota. i.e., nft_quota match consumed bytes in [0, quota - 1], not [0, quo...
```diff diff --git a/net/netfilter/nft_quota.c b/net/netfilter/nft_quota.c index 9b2d7463d3d3..df0798da2329 100644 --- a/net/netfilter/nft_quota.c +++ b/net/netfilter/nft_quota.c @@ -19,10 +19,16 @@ struct nft_quota { }; static inline bool nft_overquota(struct nft_quota *priv, - const struct sk_buff *skb) + ...
aa04c6f45b9224b949aa35d4fa5f8d0ba07b23d4
Analyze and fix the following issue in the Linux kernel code: netfilter: bridge: Move specific fragmented packet to slow_path instead of dropping it
Problem Details: The config NF_CONNTRACK_BRIDGE will change the bridge forwarding for fragmented packets. The original bridge does not know that it is a fragmented packet and forwards it directly, after NF_CONNTRACK_BRIDGE is enabled, function nf_br_ip_fragment and br_ip6_fragment will check the headroom. In original...
```diff diff --git a/net/bridge/netfilter/nf_conntrack_bridge.c b/net/bridge/netfilter/nf_conntrack_bridge.c index 816bb0fde718..6482de4d8750 100644 --- a/net/bridge/netfilter/nf_conntrack_bridge.c +++ b/net/bridge/netfilter/nf_conntrack_bridge.c @@ -60,19 +60,19 @@ static int nf_br_ip_fragment(struct net *net, struct ...
f0ccc717c6c64b0762f34cd1a2072bff44859423
Analyze and fix the following issue in the Linux kernel code: ALSA: hda/tas2781: select CONFIG_CRC8 for SND_HDA_SCODEC_TAS2781_I2C
Problem Details: The crc8 function is used by the common fmwlib module, so this has to be selected directly to avoid a link failure: ERROR: modpost: "crc8" [sound/soc/codecs/snd-soc-tas2781-fmwlib.ko] undefined! Fixes: 9fa6a693ad8d ("ALSA: hda/tas2781: Remove tas2781_spi_fwlib.c and leverage SND_SOC_TAS2781_FMWLIB") ...
```diff diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 2e5b03be2f20..77fb5944c6b3 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -2002,6 +2002,7 @@ config SND_SOC_TAS2781_COMLIB_I2C config SND_SOC_TAS2781_FMWLIB select SND_SOC_TAS2781_COMLIB + select CRC8 tristate...
15b39ced6247666f616e3b0b8eeb42cd4a8a11f2
Analyze and fix the following issue in the Linux kernel code: ALSA: pcm: Remove unused snd_pcm_rate_range_to_bits
Problem Details: The last use of snd_pcm_rate_range_to_bits() was removed in 2016 by commit b6b6e4d670c9 ("ASoC: topology: Fix setting of stream rates, rate_min and rate_max") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.lin...
```diff diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 8becb4504887..a268de860259 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h @@ -1251,8 +1251,6 @@ unsigned int snd_pcm_rate_to_rate_bit(unsigned int rate); unsigned int snd_pcm_rate_bit_to_rate(unsigned int rate_bit); unsigned int snd_pcm_...
222a87f6b94f6f177e896d6fcdc7881480344e34
Analyze and fix the following issue in the Linux kernel code: spi: cadence-quadspi: Assume device could match via platform
Problem Details: Driver has only of_device_id table, however it also has MODULE_ALIAS() for platform name, thus assume there is a configuration where this can be loaded outside of OF system. In such case of_device_get_match_data() will return NULL, which is already checked in one place of probe() function but not in t...
```diff diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c index c90462783b3f..fe0f122f07b0 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -1949,7 +1949,7 @@ static int cqspi_probe(struct platform_device *pdev) host->num_chipselect = cqspi->...
f4ea37a485e97234af9550b63c52394d029037ee
Analyze and fix the following issue in the Linux kernel code: spi: cs42l43: Make handling missing spk-id GPIOs explicit
Problem Details: gpiod_get_array_optional() for spk-id GPIOs can return NULL, if they are missing, so do not pass the value to PTR_ERR but instead explicitly treat NULL as acceptable condition. The old code was correct, but misleading because PTR_ERR usually is used on errors. Reported by Smatch: drivers/spi/spi-cs...
```diff diff --git a/drivers/spi/spi-cs42l43.c b/drivers/spi/spi-cs42l43.c index ceefc253c549..b28a840b3b04 100644 --- a/drivers/spi/spi-cs42l43.c +++ b/drivers/spi/spi-cs42l43.c @@ -237,7 +237,9 @@ static int cs42l43_get_speaker_id_gpios(struct cs42l43_spi *priv, int *result) int i, ret; descs = gpiod_get_array_...
075812e45e9ef1b882aa66b9d122d8b8739aae59
Analyze and fix the following issue in the Linux kernel code: spi: atmel-quadspi: Fix printed error code during DMA setup
Problem Details: On dma_request_chan() failure driver NULL-ifies the 'rx_chan' and immediately uses it as PTR_ERR() so dev_err_probe() prints incorrect error code. Rework the code so proper error code will be printed and NULL-ifying of 'rx_chan' will happen in common error handling block (failure of DMA setup is not f...
```diff diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c index 244ac0106862..fc3675176388 100644 --- a/drivers/spi/atmel-quadspi.c +++ b/drivers/spi/atmel-quadspi.c @@ -1287,9 +1287,9 @@ static int atmel_qspi_dma_init(struct spi_controller *ctrl) aq->rx_chan = dma_request_chan(&aq->pdev->dev, ...
a73fa3690a1f3014d6677e368dce4e70767a6ba2
Analyze and fix the following issue in the Linux kernel code: spi: loopback-test: Do not split 1024-byte hexdumps
Problem Details: spi_test_print_hex_dump() prints buffers holding less than 1024 bytes in full. Larger buffers are truncated: only the first 512 and the last 512 bytes are printed, separated by a truncation message. The latter is confusing in case the buffer holds exactly 1024 bytes, as all data is printed anyway. F...
```diff diff --git a/drivers/spi/spi-loopback-test.c b/drivers/spi/spi-loopback-test.c index 31a878d9458d..7740f94847a8 100644 --- a/drivers/spi/spi-loopback-test.c +++ b/drivers/spi/spi-loopback-test.c @@ -420,7 +420,7 @@ MODULE_LICENSE("GPL"); static void spi_test_print_hex_dump(char *pre, const void *ptr, size_t le...
b19fa45715ce9cfcc597ed140df31115e969b39d
Analyze and fix the following issue in the Linux kernel code: ASoC: mediatek: mt8188-mt6359: select CONFIG_SND_SOC_MT6359_ACCDET
Problem Details: The driver support was added without selecting the codec, which leads to a link failure: aarch64-linux-ld: sound/soc/mediatek/mt8188/mt8188-mt6359.o: in function `mt8188_mt6359_init': mt8188-mt6359.c:(.text+0x19f0): undefined reference to `mt6359_accdet_enable_jack_detect' Fixes: f35d834d67ad ("ASoC:...
```diff diff --git a/sound/soc/mediatek/Kconfig b/sound/soc/mediatek/Kconfig index 3033e2d3fe16..e148d4d94160 100644 --- a/sound/soc/mediatek/Kconfig +++ b/sound/soc/mediatek/Kconfig @@ -229,6 +229,7 @@ config SND_SOC_MT8188_MT6359 tristate "ASoC Audio driver for MT8188 with MT6359 and I2S codecs" depends on SND_SO...
870c1f0dc2a5e67eb0697ae14365b930684ddfa5
Analyze and fix the following issue in the Linux kernel code: crypto: padlock-sha - Use core import and export for fallback
Problem Details: As padlock-sha is block-only, it needs to use core import and export on the fallback. Also call sha256_block_init instead of sha256_init although this is harmless as sha256_init doesn't write into the partial block area. Fixes: 63dc06cd12f9 ("crypto: padlock-sha - Use API partial block handling") Sig...
```diff diff --git a/drivers/crypto/padlock-sha.c b/drivers/crypto/padlock-sha.c index c89b9c6b5f4c..329f60ad422e 100644 --- a/drivers/crypto/padlock-sha.c +++ b/drivers/crypto/padlock-sha.c @@ -42,27 +42,33 @@ static int padlock_sha1_init(struct shash_desc *desc) static int padlock_sha256_init(struct shash_desc *de...
ecd71c95a60e7298acfabe81189439f350bd0e18
Analyze and fix the following issue in the Linux kernel code: crypto: zynqmp-sha - Fix partial block implementation
Problem Details: The zynqmp-sha partial block was based on an old design of the partial block API where the leftover calculation was done in the Crypto API. As the leftover calculation is now done by the algorithm, fix this by passing the partial blocks to the fallback. Also zero the stack descriptors. Fixes: 201e9e...
```diff diff --git a/drivers/crypto/xilinx/zynqmp-sha.c b/drivers/crypto/xilinx/zynqmp-sha.c index 67cf8d990a1d..5813017b6b79 100644 --- a/drivers/crypto/xilinx/zynqmp-sha.c +++ b/drivers/crypto/xilinx/zynqmp-sha.c @@ -59,7 +59,7 @@ static int zynqmp_sha_init_tfm(struct crypto_shash *hash) return PTR_ERR(fallback_tf...
7c234e138c67c1157b17f1fab8cc95d62f8f4444
Analyze and fix the following issue in the Linux kernel code: crypto: hisilicon/qm - replace devm_kzalloc with devm_kcalloc
Problem Details: Replace devm_kzalloc that has an internal multiplication with devm_kcalloc to improve code readability and safety from overflows. Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
```diff diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c index 80d57f0dbf26..7c41f9593d03 100644 --- a/drivers/crypto/hisilicon/qm.c +++ b/drivers/crypto/hisilicon/qm.c @@ -5224,7 +5224,7 @@ static int qm_pre_store_caps(struct hisi_qm *qm) size_t i, size; size = ARRAY_SIZE(qm_cap_query_i...