id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
2b7eb2c5dc72f0fc954ac4aa155f9e285e937f7c
Analyze and fix the following issue in the Linux kernel code: staging: media: atomisp: Disallow all private IOCTLs
Problem Details: Disallow all private IOCTLs. These aren't quite as safe as one could assume of IOCTL handlers; disable them for now. Instead of removing the code, return in the beginning of the function if cmd is non-zero in order to keep static checkers happy. Reported-by: Soufiane Dani <soufianeda@tutanota.com> Clo...
```diff diff --git a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c index a7f22de1c889..50366bf10f32 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c +++ b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c @@ -1356,6 +1356,10 @@ static int atomisp_s_p...
4369a7d34d649d71be4984e7484178f3287932bc
Analyze and fix the following issue in the Linux kernel code: media: i2c: og01a1b: Add support of 8-bit media bus format
Problem Details: Omnivision OG01A1B monochrome image sensor supports 8-bit and 10-bit output formats, add support of 8-bit Y8 format to the driver. Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> [Sakari Ailus: Fix error handling for enable_streams callback.] Signed-off-by: Sakari Ailus <sakari.ailus...
```diff diff --git a/drivers/media/i2c/og01a1b.c b/drivers/media/i2c/og01a1b.c index 34d23413522d..1675f0460969 100644 --- a/drivers/media/i2c/og01a1b.c +++ b/drivers/media/i2c/og01a1b.c @@ -18,7 +18,6 @@ #define OG01A1B_SCLK 120000000LL #define OG01A1B_MCLK 19200000 #define OG01A1B_DATA_LANES 2 -#define OG01A1...
3a594bb454ba1ecb005f753007fa1bb5c5e68bae
Analyze and fix the following issue in the Linux kernel code: media: i2c: og01a1b: Switch from .s_stream to .enable_streams/.disable_streams
Problem Details: The change allows to simplify the driver code, in particular the explicit locking scheme for stream on/off or format update serialization can be dropped in favour to the one provided by the V4L2 core internals. Signed-off-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> [Sakari Ailus: Fix error ...
```diff diff --git a/drivers/media/i2c/og01a1b.c b/drivers/media/i2c/og01a1b.c index 7b892b26203c..4b6b9ac24594 100644 --- a/drivers/media/i2c/og01a1b.c +++ b/drivers/media/i2c/og01a1b.c @@ -442,9 +442,6 @@ struct og01a1b { /* Current mode */ const struct og01a1b_mode *cur_mode; - - /* To serialize asynchronus ca...
535b7f106991c7d8f0e5b8e1769bfb8b1ce9d3d6
Analyze and fix the following issue in the Linux kernel code: media: i2c: og01a1b: Fix V4L2 subdevice data initialization on probe
Problem Details: It's necessary to finalize the camera sensor subdevice initialization on driver probe and clean V4L2 subdevice data up on error paths and driver removal. The change fixes a previously reported by v4l2-compliance issue of the failed VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT test: fail: v4l2-test-controls.c...
```diff diff --git a/drivers/media/i2c/og01a1b.c b/drivers/media/i2c/og01a1b.c index c7184de6251a..7b892b26203c 100644 --- a/drivers/media/i2c/og01a1b.c +++ b/drivers/media/i2c/og01a1b.c @@ -1042,6 +1042,7 @@ static void og01a1b_remove(struct i2c_client *client) struct og01a1b *og01a1b = to_og01a1b(sd); v4l2_asyn...
9206359b2c396ff594adf39bc7daaadab0fcb367
Analyze and fix the following issue in the Linux kernel code: media: i2c: imx283: Fix hang when going from large to small resolution
Problem Details: When switching between modes (e.g. full resolution to binned), standby_cancel() previously cleared XMSTA (starting master mode data output) before the new mode's MDSEL, crop, and timing registers were programmed in start_streaming(). This caused the sensor to briefly output MIPI data using the previous...
```diff diff --git a/drivers/media/i2c/imx283.c b/drivers/media/i2c/imx283.c index 9b3094a57873..1be6164c2d15 100644 --- a/drivers/media/i2c/imx283.c +++ b/drivers/media/i2c/imx283.c @@ -129,7 +129,8 @@ /* Master Mode Operation Control */ #define IMX283_REG_XMSTA CCI_REG8(0x3105) -#define IMX283_XMSTA BIT(0) +...
bce1349dbf6348ddee47308e2ed08878356de317
Analyze and fix the following issue in the Linux kernel code: media: i2c: imx283: Enter full standby when stopping streaming
Problem Details: Use IMX283_STANDBY (bit 0) instead of IMX283_STBLOGIC (bit 1) when stopping streaming. STBLOGIC only puts the sensor logic into standby but leaves the MIPI interface (along with other components) in an indeterminate state. This (presumably) causes the CSI receiver (e.g. Raspberry Pi's CFE) to miss the...
```diff diff --git a/drivers/media/i2c/imx283.c b/drivers/media/i2c/imx283.c index 8ab63ad8f385..9b3094a57873 100644 --- a/drivers/media/i2c/imx283.c +++ b/drivers/media/i2c/imx283.c @@ -1158,7 +1158,7 @@ static int imx283_disable_streams(struct v4l2_subdev *sd, if (pad != IMAGE_PAD) return -EINVAL; - ret = cci_...
2c10400e4a233200046d023ab2377bc56fd48dea
Analyze and fix the following issue in the Linux kernel code: media: ipu-bridge: Add upside-down sensor DMI quirk for Dell XPS 13 9340 and XPS 14 9440
Problem Details: The Dell XPS 13 9340 and XPS 14 9440 have an upside-down mounted OV02C10 sensor, just like the XPS 13 9350 and XPS 16 9640 models. Extend the existing DMI matches for handling these laptops with DMI matches for these 2 models Reported-by: Heimir Thor Sverrisson <heimir.sverrisson@gmail.com> # XPS 14 ...
```diff diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c index 32cc95a766b7..3028293eeb75 100644 --- a/drivers/media/pci/intel/ipu-bridge.c +++ b/drivers/media/pci/intel/ipu-bridge.c @@ -104,6 +104,13 @@ static const struct ipu_sensor_config ipu_supported_sensors[] = { * withou...
f11ae9c04f8368a3b5a0280ef595198dace1c983
Analyze and fix the following issue in the Linux kernel code: media: i2c: ov5647: Fix runtime PM refcount leak in s_ctrl
Problem Details: Three control cases (AUTOGAIN, EXPOSURE_AUTO, ANALOGUE_GAIN) directly return without calling pm_runtime_put(), causing runtime PM reference count leaks. Change these cases from 'return' to 'ret = ... break' pattern to ensure pm_runtime_put() is always called before function exit. Fixes: 4f66f36388d5 ...
```diff diff --git a/drivers/media/i2c/ov5647.c b/drivers/media/i2c/ov5647.c index 6a46ef7233ac..db9bd2892140 100644 --- a/drivers/media/i2c/ov5647.c +++ b/drivers/media/i2c/ov5647.c @@ -967,21 +967,21 @@ static int ov5647_s_ctrl(struct v4l2_ctrl *ctrl) break; case V4L2_CID_AUTOGAIN: /* Non-zero turns on AGC by...
8dd088b8b106f7b119664f965b691785998edcfb
Analyze and fix the following issue in the Linux kernel code: media: intel/ipu6: fix error pointer dereference
Problem Details: In a error path isp->psys is confirmed to be an error pointer not NULL so this condition is true and the error pointer is dereferenced. So isp-psys should be set to NULL before going to out_ipu6_bus_del_devices. Detected by Smatch: drivers/media/pci/intel/ipu6/ipu6.c:690 ipu6_pci_probe() error: 'isp->...
```diff diff --git a/drivers/media/pci/intel/ipu6/ipu6.c b/drivers/media/pci/intel/ipu6/ipu6.c index 34f67f4f1bb5..d033d4618169 100644 --- a/drivers/media/pci/intel/ipu6/ipu6.c +++ b/drivers/media/pci/intel/ipu6/ipu6.c @@ -686,7 +686,7 @@ out_free_irq: out_ipu6_rpm_put: pm_runtime_put_sync(&isp->psys->auxdev.dev); ...
b7ef8bbb9fbd43d33ecb92e23aa7c5a55dab5513
Analyze and fix the following issue in the Linux kernel code: media: ccs-pll: Fix pre-PLL divider calculation for EXT_IP_PLL_DIVIDER flag
Problem Details: When the CCS_PLL_FLAG_EXT_IP_PLL_DIVIDER flag is set, odd pre-PLL divider values are allowed. However, in the operational timing branch the calculation of the minimum pre-PLL divider incorrectly uses clk_div_even_up, forcing the minimum value to be even, even if the flag is set. This prevents selecting...
```diff diff --git a/drivers/media/i2c/ccs-pll.c b/drivers/media/i2c/ccs-pll.c index 4eb83636e102..1605cfa5db19 100644 --- a/drivers/media/i2c/ccs-pll.c +++ b/drivers/media/i2c/ccs-pll.c @@ -824,9 +824,8 @@ int ccs_pll_calculate(struct device *dev, const struct ccs_pll_limits *lim, op_lim_fr->min_pll_ip_clk_fre...
2fb0481fe0d7891420c1a3df2e4f9a70b1f77dbd
Analyze and fix the following issue in the Linux kernel code: media: synopsys: hdmirx: support use with sleeping GPIOs
Problem Details: The recent change in commit 20cf2aed89ac ("gpio: rockchip: mark the GPIO controller as sleeping") to mark the rockchip GPIO driver as sleeping has started triggering the warning at drivers/gpio/gpiolib.c:3523 indicating that a sleepable GPIO was called via the non-sleeping APIs on the Rock 5B: <4>[ ...
```diff diff --git a/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c b/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c index 9cceffa4ce25..61ad20b18b8d 100644 --- a/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c +++ b/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c @@ -232,7 +232,7 @@ static bool t...
8e3c751259dc2d1325838eff26f41032523c7b57
Analyze and fix the following issue in the Linux kernel code: media: rockchip: rkcif: Add missing MUST_CONNECT flag to pads
Problem Details: The pads missed checks for connected devices which may a null dereference when the stream is enabled. Unable to handle kernel NULL pointer dereference at virtual address 0000000000000020 pc : rkcif_interface_enable_streams+0x48/0xf0 lr : rkcif_interface_enable_streams+0x44/0xf0 Call trace: rkcif_inte...
```diff diff --git a/drivers/media/platform/rockchip/rkcif/rkcif-interface.c b/drivers/media/platform/rockchip/rkcif/rkcif-interface.c index 523103872b7a..414a9980cf2e 100644 --- a/drivers/media/platform/rockchip/rkcif/rkcif-interface.c +++ b/drivers/media/platform/rockchip/rkcif/rkcif-interface.c @@ -378,7 +378,8 @@ i...
48c8292d4445088d8b3c9d639c7982744a94d819
Analyze and fix the following issue in the Linux kernel code: media: rockchip: rkcif: comply with minimum number of buffers requirement
Problem Details: Each stream requires CIF_REQ_BUFS_MIN=1 buffers to enable streaming. However, it failed with only one buffer provided. Comply with the minimum number of buffers requirement and accept exactly one buffer. Fixes: 501802e2ad51 ("media: rockchip: rkcif: add abstraction for dma blocks") Cc: stable@kernel....
```diff diff --git a/drivers/media/platform/rockchip/rkcif/rkcif-stream.c b/drivers/media/platform/rockchip/rkcif/rkcif-stream.c index e00010a91e8b..f15bee4f7cd7 100644 --- a/drivers/media/platform/rockchip/rkcif/rkcif-stream.c +++ b/drivers/media/platform/rockchip/rkcif/rkcif-stream.c @@ -106,42 +106,42 @@ static int ...
e4056b84af0fc18c84b4e5741df04ecd8ca17973
Analyze and fix the following issue in the Linux kernel code: media: rockchip: rkcif: fix off by one bugs
Problem Details: Change these comparisons from > vs >= to avoid accessing one element beyond the end of the arrays. While at it, use ARRAY_SIZE instead of the _MAX enum values. Fixes: 1f2353f5a1af ("media: rockchip: rkcif: add support for rk3568 vicap mipi capture") Cc: stable@kernel.org Signed-off-by: Dan Carpenter <...
```diff diff --git a/drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.c b/drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.c index 1b81bcc067ef..9e67160a16e4 100644 --- a/drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.c +++ b/drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.c @@ -489,8...
8467c5ff5acae28513bc1e0af535e06b41b04344
Analyze and fix the following issue in the Linux kernel code: media: i2c: imx412: Assert reset GPIO during probe
Problem Details: Assert the reset GPIO before first power up. This avoids a mismatch where the first power up (when the reset GPIO defaults deasserted) differs from subsequent cycles. Signed-off-by: Wenmeng Liu <wenmeng.liu@oss.qualcomm.com> Fixes: 9214e86c0cc1 ("media: i2c: Add imx412 camera sensor driver") Cc: stabl...
```diff diff --git a/drivers/media/i2c/imx412.c b/drivers/media/i2c/imx412.c index b3826f803547..aa63dfc34918 100644 --- a/drivers/media/i2c/imx412.c +++ b/drivers/media/i2c/imx412.c @@ -925,7 +925,7 @@ static int imx412_parse_hw_config(struct imx412 *imx412) /* Request optional reset pin */ imx412->reset_gpio = ...
939080834fef3ce42fdbcfef33fd29c9ffe5bbed
Analyze and fix the following issue in the Linux kernel code: mm/huge_memory: fix early failure try_to_migrate() when split huge pmd for shared THP
Problem Details: Commit 60fbb14396d5 ("mm/huge_memory: adjust try_to_migrate_one() and split_huge_pmd_locked()") return false unconditionally after split_huge_pmd_locked(). This may fail try_to_migrate() early when TTU_SPLIT_HUGE_PMD is specified. The reason is the above commit adjusted try_to_migrate_one() to, when ...
```diff diff --git a/mm/rmap.c b/mm/rmap.c index b1ba1236ffba..391337282e3f 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -2450,11 +2450,17 @@ static bool try_to_migrate_one(struct folio *folio, struct vm_area_struct *vma, __maybe_unused pmd_t pmdval; if (flags & TTU_SPLIT_HUGE_PMD) { + /* + * split_huge_p...
29f40594a28114b9a9bc87f6cf7bbee9609628f2
Analyze and fix the following issue in the Linux kernel code: mm/rmap: fix incorrect pte restoration for lazyfree folios
Problem Details: We batch unmap anonymous lazyfree folios by folio_unmap_pte_batch. If the batch has a mix of writable and non-writable bits, we may end up setting the entire batch writable. Fix this by respecting writable bit during batching. Although on a successful unmap of a lazyfree folio, the soft-dirty bit is...
```diff diff --git a/mm/rmap.c b/mm/rmap.c index 0f00570d1b9e..b1ba1236ffba 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -1955,7 +1955,14 @@ static inline unsigned int folio_unmap_pte_batch(struct folio *folio, if (userfaultfd_wp(vma)) return 1; - return folio_pte_batch(folio, pvmw->pte, pte, max_nr); + /* + * If ...
fae654083bfa409bb2244f390232e2be47f05bfc
Analyze and fix the following issue in the Linux kernel code: mm/huge_memory: fix use of NULL folio in move_pages_huge_pmd()
Problem Details: move_pages_huge_pmd() handles UFFDIO_MOVE for both normal THPs and huge zero pages. For the huge zero page path, src_folio is explicitly set to NULL, and is used as a sentinel to skip folio operations like lock and rmap. In the huge zero page branch, src_folio is NULL, so folio_mk_pmd(NULL, pgprot) p...
```diff diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 912c248a3f7e..b298cba853ab 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2797,7 +2797,8 @@ int move_pages_huge_pmd(struct mm_struct *mm, pmd_t *dst_pmd, pmd_t *src_pmd, pm _dst_pmd = pmd_mkwrite(pmd_mkdirty(_dst_pmd), dst_vma); } else { s...
6ffd853b0b10e1e292cef0bfd0997986471254de
Analyze and fix the following issue in the Linux kernel code: build_bug.h: correct function parameters names in kernel-doc
Problem Details: Use the correct function (or macro) names to avoid kernel-doc warnings: Warning: include/linux/build_bug.h:38 function parameter 'cond' not described in 'BUILD_BUG_ON_MSG' Warning: include/linux/build_bug.h:38 function parameter 'msg' not described in 'BUILD_BUG_ON_MSG' Warning: include/linux/build_...
```diff diff --git a/include/linux/build_bug.h b/include/linux/build_bug.h index 2cfbb4c65c78..d3dc5dc5f916 100644 --- a/include/linux/build_bug.h +++ b/include/linux/build_bug.h @@ -32,7 +32,8 @@ /** * BUILD_BUG_ON_MSG - break compile if a condition is true & emit supplied * error message. - * @condition: ...
36f46b0e36892eba08978eef7502ff3c94ddba77
Analyze and fix the following issue in the Linux kernel code: crash_dump: don't log dm-crypt key bytes in read_key_from_user_keying
Problem Details: When debug logging is enabled, read_key_from_user_keying() logs the first 8 bytes of the key payload and partially exposes the dm-crypt key. Stop logging any key bytes. Link: https://lkml.kernel.org/r/20260227230008.858641-2-thorsten.blum@linux.dev Fixes: 479e58549b0f ("crash_dump: store dm crypt key...
```diff diff --git a/kernel/crash_dump_dm_crypt.c b/kernel/crash_dump_dm_crypt.c index 1f4067fbdb94..a20d4097744a 100644 --- a/kernel/crash_dump_dm_crypt.c +++ b/kernel/crash_dump_dm_crypt.c @@ -168,8 +168,8 @@ static int read_key_from_user_keying(struct dm_crypt_key *dm_key) memcpy(dm_key->data, ukp->data, ukp->da...
1a933719e70787f462d6126230a403c15f95598e
Analyze and fix the following issue in the Linux kernel code: rust: task: use `as_char_ptr` instead of `as_ptr().cast()`
Problem Details: `as_char_ptr` would provide the correct (unsigned char) type without needing to convert to an intermediate type and cast the pointer. The `as_ptr()` function is going to be disallowed by clippy warning, so fix this usage. This is used only if CONFIG_DEBUG_ATOMIC_SLEEP=y. Instead of conditionally impo...
```diff diff --git a/rust/kernel/task.rs b/rust/kernel/task.rs index cc907fb531bc..049c8a4d45d8 100644 --- a/rust/kernel/task.rs +++ b/rust/kernel/task.rs @@ -6,16 +6,15 @@ use crate::{ bindings, - ffi::{c_int, c_long, c_uint}, mm::MmWithUser, pid_namespace::PidNamespace, + prelude::*, sync...
88d37abb366be95d772ceb4c7f26772e78447252
Analyze and fix the following issue in the Linux kernel code: smb/client: only export symbol for 'smb2maperror-test' module
Problem Details: Only export smb2_get_err_map_test smb2_error_map_table_test and smb2_error_map_num symbol for 'smb2maperror-test' module. Fixes: 7d0bf050a587 ("smb/client: make SMB2 maperror KUnit tests a separate module") Signed-off-by: Ye Bin <yebin10@huawei.com> Reviewed-by: ChenXiaoSong <chenxiaosong@kylinos.cn> ...
```diff diff --git a/fs/smb/client/smb2maperror.c b/fs/smb/client/smb2maperror.c index f4cff44e2796..2b8782c4f684 100644 --- a/fs/smb/client/smb2maperror.c +++ b/fs/smb/client/smb2maperror.c @@ -109,6 +109,9 @@ int __init smb2_init_maperror(void) } #if IS_ENABLED(CONFIG_SMB_KUNIT_TESTS) +#define EXPORT_SYMBOL_FOR_S...
d78840a6a38d312dc1a51a65317bb67e46f0b929
Analyze and fix the following issue in the Linux kernel code: smb: client: fix in-place encryption corruption in SMB2_write()
Problem Details: SMB2_write() places write payload in iov[1..n] as part of rq_iov. smb3_init_transform_rq() pointer-shares rq_iov, so crypt_message() encrypts iov[1] in-place, replacing the original plaintext with ciphertext. On a replayable error, the retry sends the same iov[1] which now contains ciphertext instead o...
```diff diff --git a/fs/smb/client/smb2pdu.c b/fs/smb/client/smb2pdu.c index c43ca74e8704..5188218c25be 100644 --- a/fs/smb/client/smb2pdu.c +++ b/fs/smb/client/smb2pdu.c @@ -5307,7 +5307,10 @@ replay_again: memset(&rqst, 0, sizeof(struct smb_rqst)); rqst.rq_iov = iov; - rqst.rq_nvec = n_vec + 1; + /* iov[0] is t...
fae11330dc0642065568d6c0045322293fe59bc6
Analyze and fix the following issue in the Linux kernel code: smb: client: fix sbflags initialization
Problem Details: The newly introduced variable is initialized in an #ifdef block but used outside of it, leading to undefined behavior when CONFIG_CIFS_ALLOW_INSECURE_LEGACY is disabled: fs/smb/client/dir.c:417:9: error: variable 'sbflags' is uninitialized when used here [-Werror,-Wuninitialized] 417 | ...
```diff diff --git a/fs/smb/client/dir.c b/fs/smb/client/dir.c index 4bc217e9a727..6d2378eeb7f6 100644 --- a/fs/smb/client/dir.c +++ b/fs/smb/client/dir.c @@ -187,7 +187,7 @@ static int cifs_do_create(struct inode *inode, struct dentry *direntry, unsigned const char *full_path; void *page = alloc_dentry_path(); s...
4a7d2729dc99437dbb880a64c47828c0d191b308
Analyze and fix the following issue in the Linux kernel code: smb: client: fix atomic open with O_DIRECT & O_SYNC
Problem Details: When user application requests O_DIRECT|O_SYNC along with O_CREAT on open(2), CREATE_NO_BUFFER and CREATE_WRITE_THROUGH bits were missed in CREATE request when performing an atomic open, thus leading to potentially data integrity issues. Fix this by setting those missing bits in CREATE request when O_...
```diff diff --git a/fs/smb/client/cifsglob.h b/fs/smb/client/cifsglob.h index 6f9b6c72962b..bb0fe4b60240 100644 --- a/fs/smb/client/cifsglob.h +++ b/fs/smb/client/cifsglob.h @@ -20,6 +20,7 @@ #include <linux/utsname.h> #include <linux/sched/mm.h> #include <linux/netfs.h> +#include <linux/fcntl.h> #include "cifs_fs...
ce517adff59c50a54a33ae90e2947eff9698dc86
Analyze and fix the following issue in the Linux kernel code: drm/xe: Drop unused IS_PLATFORM_STEP() and IS_SUBPLATFORM_STEP()
Problem Details: The macros IS_PLATFORM_STEP() and IS_SUBPLATFORM_STEP() are unused since commit 87c299fa3a97 ("drm/xe/guc: Port Wa_14014475959 to xe_wa and fix it") and commit 63bbd800ff01 ("drm/xe/guc: Port Wa_22012727170/Wa_22012727685 to xe_wa"), respectively, and we can drop them now. Furthermore, in upcoming cha...
```diff diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h index 3e04e80e0815..615218d775b1 100644 --- a/drivers/gpu/drm/xe/xe_device_types.h +++ b/drivers/gpu/drm/xe/xe_device_types.h @@ -82,16 +82,6 @@ enum xe_wedged_mode { #define XE_MAX_ASID (BIT(20)) -#define IS_PLATFORM_...
e94eaef11142b01f77bf8ba4d0b59720b7858109
Analyze and fix the following issue in the Linux kernel code: e1000/e1000e: Fix leak in DMA error cleanup
Problem Details: If an error is encountered while mapping TX buffers, the driver should unmap any buffers already mapped for that skb. Because count is incremented after a successful mapping, it will always match the correct number of unmappings needed when dma_error is reached. Decrementing count before the while loo...
```diff diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c index 3d7648a119e5..9b09eb144b81 100644 --- a/drivers/net/ethernet/intel/e1000/e1000_main.c +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c @@ -2952,8 +2952,6 @@ static int e1000_tx_map(struct e1000_ad...
e809085f492842ce7a519c9ef72d40f4bca89c13
Analyze and fix the following issue in the Linux kernel code: i40e: fix src IP mask checks and memcpy argument names in cloud filter
Problem Details: Fix following issues in the IPv4 and IPv6 cloud filter handling logic in both the add and delete paths: - The source-IP mask check incorrectly compares mask.src_ip[0] against tcf.dst_ip[0]. Update it to compare against tcf.src_ip[0]. This likely goes unnoticed because the check is in an "else if" ...
```diff diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c index fdf40f8fb239..a26c3d47ec15 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c @@ -3833,10 +3833,10 @@ static int i40e_v...
d1008a8e29b09ea57c77ddf82d688f8c2ea6cbe8
Analyze and fix the following issue in the Linux kernel code: spi: tegra210-quad: Remove redundant pm_runtime_mark_last_busy() calls
Problem Details: pm_runtime_put_autosuspend() already internally updates the last_busy timestamp before scheduling the autosuspend, making explicit pm_runtime_mark_last_busy() calls immediately before it redundant. Fixes: 7c12f6ead467 ("spi: tegra210-quad: Add runtime autosuspend support") Signed-off-by: Felix Gu <ust...
```diff diff --git a/drivers/spi/spi-tegra210-quad.c b/drivers/spi/spi-tegra210-quad.c index 7fac695b5142..7cca5578eba3 100644 --- a/drivers/spi/spi-tegra210-quad.c +++ b/drivers/spi/spi-tegra210-quad.c @@ -1000,7 +1000,6 @@ static int tegra_qspi_setup(struct spi_device *spi) spin_unlock_irqrestore(&tqspi->lock, fl...
ec6c2e15a42fc8fb63baadee0e8a3257e37fa90c
Analyze and fix the following issue in the Linux kernel code: spi: axiado: Remove redundant pm_runtime_mark_last_busy() call
Problem Details: The pm_runtime_mark_last_busy() call is redundant in the probe function as pm_runtime_put_autosuspend() already calls pm_runtime_mark_last_busy() internally to update the last access time of the device before queuing autosuspend. Fixes: e75a6b00ad79 ("spi: axiado: Add driver for Axiado SPI DB controll...
```diff diff --git a/drivers/spi/spi-axiado.c b/drivers/spi/spi-axiado.c index 8cea81432c5b..bd5f67acc4f6 100644 --- a/drivers/spi/spi-axiado.c +++ b/drivers/spi/spi-axiado.c @@ -850,7 +850,6 @@ static int ax_spi_probe(struct platform_device *pdev) ctlr->bits_per_word_mask = SPI_BPW_MASK(8); - pm_runtime_mark_las...
30e4b2290cc2a8d1b9ddb9dcb9c981df1f2a7399
Analyze and fix the following issue in the Linux kernel code: ASoC: codecs: rt1011: Use component to get the dapm context in spk_mode_put
Problem Details: The correct helper to use in rt1011_recv_spk_mode_put() to retrieve the DAPM context is snd_soc_component_to_dapm(), from kcontrol we will receive NULL pointer. Closes: https://github.com/thesofproject/linux/issues/5691 Fixes: 5b35bb517f27 ("ASoC: codecs: rt1011: convert to snd_soc_dapm_xxx()") Signed...
```diff diff --git a/sound/soc/codecs/rt1011.c b/sound/soc/codecs/rt1011.c index 9f34a6a35487..03f31d9d916e 100644 --- a/sound/soc/codecs/rt1011.c +++ b/sound/soc/codecs/rt1011.c @@ -1047,7 +1047,7 @@ static int rt1011_recv_spk_mode_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct ...
360160f75592bdc85edba8fe78fb20d90924c7e8
Analyze and fix the following issue in the Linux kernel code: audit: handle unknown status requests in audit_receive_msg()
Problem Details: Currently, audit_receive_msg() ignores unknown status bits in AUDIT_SET requests, incorrectly returning success to newer user space tools querying unsupported features. This breaks forward compatibility. Fix this by defining AUDIT_STATUS_ALL and returning -EINVAL if any unrecognized bits are set (s.ma...
```diff diff --git a/include/linux/audit.h b/include/linux/audit.h index b642b5faca65..d79218bf075a 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h @@ -15,6 +15,15 @@ #include <uapi/linux/audit.h> #include <uapi/linux/fanotify.h> +#define AUDIT_STATUS_ALL (AUDIT_STATUS_ENABLED | \ + AUDIT_STATUS_...
e06e6b8001233241eb5b2e2791162f0585f50f4b
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Fix pkg-config call on static builds
Problem Details: For commit b0dcdcb9ae75 ("resolve_btfids: Fix linker flags detection"), I suggested setting HOSTPKG_CONFIG to $PKG_CONFIG when compiling resolve_btfids, but I forgot the quotes around that variable. As a result, when running vmtest.sh with static linking, it fails as follows: $ LDLIBS=-static PKG...
```diff diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index d5acbeba0383..65485967c968 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -409,7 +409,7 @@ $(RESOLVE_BTFIDS): $(HOST_BPFOBJ) | $(HOST_BUILD_DIR)/resolve_btfids \ CC=...
57d2371d52be1d574b33382bfbf8052485b99d8b
Analyze and fix the following issue in the Linux kernel code: tools/power turbostat: Fix illegal memory access when SMT is present and disabled
Problem Details: When SMT is present and disabled, turbostat may under-size the thread_data array. This can corrupt results or cause turbostat to exit with a segmentation fault. [lenb: commit message] Fixes: a2b4d0f8bf07 ("tools/power turbostat: Favor cpu# over core#") Signed-off-by: Zhang Rui <rui.zhang@intel.com> S...
```diff diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index 1a2671c28209..ae827485950d 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c @@ -9702,13 +9702,12 @@ void allocate_counters(struct counters *counters) { int i; int n...
2321a9596d2260310267622e0ad8fbfa6f95378f
Analyze and fix the following issue in the Linux kernel code: bpf: Fix constant blinding for PROBE_MEM32 stores
Problem Details: BPF_ST | BPF_PROBE_MEM32 immediate stores are not handled by bpf_jit_blind_insn(), allowing user-controlled 32-bit immediates to survive unblinded into JIT-compiled native code when bpf_jit_harden >= 1. The root cause is that convert_ctx_accesses() rewrites BPF_ST|BPF_MEM to BPF_ST|BPF_PROBE_MEM32 for...
```diff diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c index 3ece2da55625..9e126be33755 100644 --- a/kernel/bpf/core.c +++ b/kernel/bpf/core.c @@ -1422,6 +1422,27 @@ static int bpf_jit_blind_insn(const struct bpf_insn *from, *to++ = BPF_ALU64_IMM(BPF_XOR, BPF_REG_AX, imm_rnd); *to++ = BPF_STX_MEM(from->code, ...
2f4cb53eed448c1aeb6f4b40cf9c810716d8218c
Analyze and fix the following issue in the Linux kernel code: bpf: detect non null pointer with register operand in JEQ/JNE.
Problem Details: This patch adds support to validate a pointer as not null when its value is compared to a register whose value the verifier knows to be null. Initial pattern only verifies against an immediate operand. Signed-off-by: Cupertino Miranda <cupertino.miranda@oracle.com> Cc: David Faust <david.faust@oracle...
```diff diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 8e4f69918693..4fbacd2149cd 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -17678,12 +17678,15 @@ static int check_cond_jmp_op(struct bpf_verifier_env *env, } /* detect if R == 0 where R is returned from bpf_map_lookup_elem...
6b13cb8f48a42ddf6dd98865b673a82e37ff238b
Analyze and fix the following issue in the Linux kernel code: accel/amdxdna: Fix runtime suspend deadlock when there is pending job
Problem Details: The runtime suspend callback drains the running job workqueue before suspending the device. If a job is still executing and calls pm_runtime_resume_and_get(), it can deadlock with the runtime suspend path. Fix this by moving pm_runtime_resume_and_get() from the job execution routine to the job submiss...
```diff diff --git a/drivers/accel/amdxdna/aie2_ctx.c b/drivers/accel/amdxdna/aie2_ctx.c index afee5e667f77..c0d348884f74 100644 --- a/drivers/accel/amdxdna/aie2_ctx.c +++ b/drivers/accel/amdxdna/aie2_ctx.c @@ -165,7 +165,6 @@ aie2_sched_notify(struct amdxdna_sched_job *job) trace_xdna_job(&job->base, job->hwctx->n...
ea1989746b77c3f63bce43af247e1de29ed6bf4a
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Add test for BPF_END register ID reset
Problem Details: Add a test case to ensure that BPF_END operations correctly break register's scalar ID ties. The test creates a scenario where r1 is a copy of r0, r0 undergoes a byte swap, and then r0 is checked against a constant. - Without the fix in the verifier, the bounds learned from r0 are incorrectly propa...
```diff diff --git a/tools/testing/selftests/bpf/progs/verifier_bswap.c b/tools/testing/selftests/bpf/progs/verifier_bswap.c index 4b779deee767..cffaf36192bc 100644 --- a/tools/testing/selftests/bpf/progs/verifier_bswap.c +++ b/tools/testing/selftests/bpf/progs/verifier_bswap.c @@ -91,6 +91,28 @@ BSWAP_RANGE_TEST(le32_...
a3125bc01884431d30d731461634c8295b6f0529
Analyze and fix the following issue in the Linux kernel code: bpf: Reset register ID for BPF_END value tracking
Problem Details: When a register undergoes a BPF_END (byte swap) operation, its scalar value is mutated in-place. If this register previously shared a scalar ID with another register (e.g., after an `r1 = r0` assignment), this tie must be broken. Currently, the verifier misses resetting `dst_reg->id` to 0 for BPF_END....
```diff diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 159b25f8269d..df22bfc572e2 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -15910,6 +15910,13 @@ static void scalar_byte_swap(struct bpf_reg_state *dst_reg, struct bpf_insn *ins /* Apply bswap if alu64 or switch between big-end...
bcf92fbca6055b7b717c3706e4e5f92a4e63ef45
Analyze and fix the following issue in the Linux kernel code: x86/64/defconfig: Add CONFIG_IRQ_REMAP
Problem Details: x2apic is enabled in the defconfig, and interrupt remapping is an architectural dependency of x2apic as per the Intel SDM: Routing of device interrupts to local APIC units operating in x2APIC mode requires use of the interrupt-remapping architecture specified in the Intel® Virtualization Technol...
```diff diff --git a/arch/x86/configs/x86_64_defconfig b/arch/x86/configs/x86_64_defconfig index 7d7310cdf8b0..269f7d808be4 100644 --- a/arch/x86/configs/x86_64_defconfig +++ b/arch/x86/configs/x86_64_defconfig @@ -230,6 +230,7 @@ CONFIG_EEEPC_LAPTOP=y CONFIG_AMD_IOMMU=y CONFIG_INTEL_IOMMU=y # CONFIG_INTEL_IOMMU_DEF...
f183963891b4b0126f19aa0993ed931f3f3f9520
Analyze and fix the following issue in the Linux kernel code: vfio: selftests: fix crash in vfio_dma_mapping_mmio_test
Problem Details: Remove the __iommu_unmap() call on a region that was never mapped. When __iommu_map() fails (expected for MMIO vaddrs in non-VFIO modes), the region is not added to the dma_regions list, leaving its list_head zero-initialized. If the unmap ioctl returns success, __iommu_unmap() calls list_del_init() on...
```diff diff --git a/tools/testing/selftests/vfio/vfio_dma_mapping_mmio_test.c b/tools/testing/selftests/vfio/vfio_dma_mapping_mmio_test.c index 957a89ce7b3a..d7f25ef77671 100644 --- a/tools/testing/selftests/vfio/vfio_dma_mapping_mmio_test.c +++ b/tools/testing/selftests/vfio/vfio_dma_mapping_mmio_test.c @@ -100,7 +10...
b330fbfd34d7624bec62b99ad88dba2614326a19
Analyze and fix the following issue in the Linux kernel code: irqchip/riscv-aplic: Register syscore operations only once
Problem Details: Since commit 95a8ddde3660 ("irqchip/riscv-aplic: Preserve APLIC states across suspend/resume"), when multiple NUMA nodes exist and AIA is not configured as "none", aplic_probe() is called multiple times. This leads to register_syscore(&aplic_syscore) being invoked repeatedly, causing the following Oops...
```diff diff --git a/drivers/irqchip/irq-riscv-aplic-main.c b/drivers/irqchip/irq-riscv-aplic-main.c index 8775f188ea4f..9f53979b6962 100644 --- a/drivers/irqchip/irq-riscv-aplic-main.c +++ b/drivers/irqchip/irq-riscv-aplic-main.c @@ -116,6 +116,16 @@ static struct syscore aplic_syscore = { .ops = &aplic_syscore_ops,...
620b6ded72a7f0f77be6ec44d0462bb85729ab7a
Analyze and fix the following issue in the Linux kernel code: irqchip/riscv-aplic: Do not clear ACPI dependencies on probe failure
Problem Details: aplic_probe() calls acpi_dev_clear_dependencies() unconditionally at the end, even when the preceding setup (MSI or direct mode) has failed. This is incorrect because if the device failed to probe, it should not be considered as active and should not clear dependencies for other devices waiting on it. ...
```diff diff --git a/drivers/irqchip/irq-riscv-aplic-main.c b/drivers/irqchip/irq-riscv-aplic-main.c index 4495ca26abf5..8775f188ea4f 100644 --- a/drivers/irqchip/irq-riscv-aplic-main.c +++ b/drivers/irqchip/irq-riscv-aplic-main.c @@ -372,18 +372,21 @@ static int aplic_probe(struct platform_device *pdev) rc = aplic_...
d3da7f00e21c2ff274b991167c69e96501746f28
Analyze and fix the following issue in the Linux kernel code: fbdev: omapfb: Add missing error check for clk_get()
Problem Details: The hwa742_init() function did not check the return value of clk_get(). This could lead to dereferencing an error pointer in subsequent clock operations, potentially causing a kernel crash. Fix this by adding a missing error check and ensuring proper clock resource cleanup on failure and driver remova...
```diff diff --git a/drivers/video/fbdev/omap/hwa742.c b/drivers/video/fbdev/omap/hwa742.c index 64e76e1f5388..68a677f824e9 100644 --- a/drivers/video/fbdev/omap/hwa742.c +++ b/drivers/video/fbdev/omap/hwa742.c @@ -950,6 +950,8 @@ static int hwa742_init(struct omapfb_device *fbdev, int ext_mode, omapfb_conf = dev_get...
c7940c8bf215b9dc6211781c77ce80e76982a723
Analyze and fix the following issue in the Linux kernel code: gpu: nova-core: fix stack overflow in GSP memory allocation
Problem Details: The `Cmdq::new` function was allocating a `PteArray` struct on the stack and was causing a stack overflow with 8216 bytes. Modify the `PteArray` to calculate and write the Page Table Entries directly into the coherent DMA buffer one-by-one. This reduces the stack usage quite a lot. Reported-by: Gary ...
```diff diff --git a/drivers/gpu/nova-core/gsp.rs b/drivers/gpu/nova-core/gsp.rs index 25cd48514c77..c69adaa92bbe 100644 --- a/drivers/gpu/nova-core/gsp.rs +++ b/drivers/gpu/nova-core/gsp.rs @@ -47,16 +47,12 @@ struct PteArray<const NUM_ENTRIES: usize>([u64; NUM_ENTRIES]); unsafe impl<const NUM_ENTRIES: usize> AsBytes...
697f514ad9dbe600a808326d80b02caab03b7f90
Analyze and fix the following issue in the Linux kernel code: landlock: Clean up interrupted thread logic in TSYNC
Problem Details: In landlock_restrict_sibling_threads(), when the calling thread is interrupted while waiting for sibling threads to prepare, it executes a recovery path. Previously, this path included a wait_for_completion() call on all_prepared to prevent a Use-After-Free of the local shared_ctx. However, this wait ...
```diff diff --git a/security/landlock/tsync.c b/security/landlock/tsync.c index f0e5f8102001..4d4427ba8d93 100644 --- a/security/landlock/tsync.c +++ b/security/landlock/tsync.c @@ -575,24 +575,30 @@ int landlock_restrict_sibling_threads(const struct cred *old_cred, -ERESTARTNOINTR); /* - * Cancel ...
ff88df67dbf78b5eb909f8a3da4115b1cfd998ab
Analyze and fix the following issue in the Linux kernel code: landlock: Serialize TSYNC thread restriction
Problem Details: syzbot found a deadlock in landlock_restrict_sibling_threads(). When multiple threads concurrently call landlock_restrict_self() with sibling thread restriction enabled, they can deadlock by mutually queueing task_works on each other and then blocking in kernel space (waiting for the other to finish). ...
```diff diff --git a/security/landlock/tsync.c b/security/landlock/tsync.c index 1e738ef2cff5..f0e5f8102001 100644 --- a/security/landlock/tsync.c +++ b/security/landlock/tsync.c @@ -485,6 +485,16 @@ int landlock_restrict_sibling_threads(const struct cred *old_cred, shared_ctx.new_cred = new_cred; shared_ctx.set_no...
fd7df93013c5118812e63a52635dc6c3a805a1de
Analyze and fix the following issue in the Linux kernel code: ALSA: aoa: Skip devices with no codecs in i2sbus_resume()
Problem Details: In i2sbus_resume(), skip devices with an empty codec list, which avoids using an uninitialized 'sysclock_factor' in the 32-bit format path in i2sbus_pcm_prepare(). In i2sbus_pcm_prepare(), replace two list_for_each_entry() loops with a single list_first_entry() now that the codec list is guaranteed to...
```diff diff --git a/sound/aoa/soundbus/i2sbus/core.c b/sound/aoa/soundbus/i2sbus/core.c index f974b96e98cd..22c956267f4e 100644 --- a/sound/aoa/soundbus/i2sbus/core.c +++ b/sound/aoa/soundbus/i2sbus/core.c @@ -405,6 +405,9 @@ static int i2sbus_resume(struct macio_dev* dev) int err, ret = 0; list_for_each_entry(i...
6b4576b09714def33890e04ef49621bca3614bbf
Analyze and fix the following issue in the Linux kernel code: sched_ext: Reject sub-sched attachment to a disabled parent
Problem Details: scx_claim_exit() propagates exits to descendants under scx_sched_lock. A sub-sched being attached concurrently could be missed if it links after the propagation. Check the parent's exit_kind in scx_link_sched() under scx_sched_lock to interlock against scx_claim_exit() - either the parent sees the chil...
```diff diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index efba05725139..e7ab3647e35f 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -5247,6 +5247,17 @@ static s32 scx_link_sched(struct scx_sched *sch) s32 ret; if (parent) { + /* + * scx_claim_exit() propagates exit_kind transition to ...
6b36c4c2935c54d6a103389fad2a2a9d25591501
Analyze and fix the following issue in the Linux kernel code: sched_ext: Fix scx_sched_lock / rq lock ordering
Problem Details: There are two sites that nest rq lock inside scx_sched_lock: - scx_bypass() takes scx_sched_lock then rq lock per CPU to propagate per-cpu bypass flags and re-enqueue tasks. - sysrq_handle_sched_ext_dump() takes scx_sched_lock to iterate all scheds, scx_dump_state() then takes rq lock per CPU for...
```diff diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index bc6ce05bb98e..efba05725139 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -5097,8 +5097,8 @@ static void scx_bypass(struct scx_sched *sch, bool bypass) struct rq *rq = cpu_rq(cpu); struct task_struct *p, *n; - raw_spin_lock(&scx_sc...
b5bc043505fed4198158037938ead78557eb79ab
Analyze and fix the following issue in the Linux kernel code: sched_ext: Add scx_dump_lock and dump_disabled
Problem Details: Add a dedicated scx_dump_lock and per-sched dump_disabled flag so that debug dumping can be safely disabled during sched teardown without relying on scx_sched_lock. This is a prep for the next patch which decouples the sysrq dump path from scx_sched_lock to resolve a lock ordering issue. Signed-off-by...
```diff diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index 4fa0be4980d4..5cfac2c97bf3 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -136,6 +136,8 @@ static DEFINE_RAW_SPINLOCK(scx_exit_bstr_buf_lock); static struct scx_bstr_buf scx_exit_bstr_buf; /* ops debug dump */ +static DEFINE_RAW_SPINLOC...
7e92cf4354e9803cc7b8ed01f38371e0e89d2a0a
Analyze and fix the following issue in the Linux kernel code: sched_ext: Fix sub_detach op check to test the parent's ops
Problem Details: sub_detach is the parent's op called to notify the parent that a child is detaching. Test parent->ops.sub_detach instead of sch->ops.sub_detach. Fixes: ebeca1f930ea ("sched_ext: Introduce cgroup sub-sched support") Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: Andrea Righi <arighi@nvidia.com>
```diff diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c index 93a230859dd7..4fa0be4980d4 100644 --- a/kernel/sched/ext.c +++ b/kernel/sched/ext.c @@ -5438,7 +5438,7 @@ static void scx_sub_disable(struct scx_sched *sch) */ wake_up_all(&scx_unlink_waitq); - if (sch->ops.sub_detach && sch->sub_attached) { + if...
1dfc9d60a69ec148e1cb709256617d86e5f0e8f8
Analyze and fix the following issue in the Linux kernel code: workqueue: devres: Add device-managed allocate workqueue
Problem Details: Add a Resource-managed version of alloc_workqueue() to fix common problem of drivers mixing devm() calls with destroy_workqueue. Such naive and discouraged driver approach leads to difficult to debug bugs when the driver: 1. Allocates workqueue in standard way and destroys it in driver remove() ca...
```diff diff --git a/Documentation/driver-api/driver-model/devres.rst b/Documentation/driver-api/driver-model/devres.rst index 7d2b897d66fa..017fb155a5bc 100644 --- a/Documentation/driver-api/driver-model/devres.rst +++ b/Documentation/driver-api/driver-model/devres.rst @@ -464,3 +464,7 @@ SPI WATCHDOG devm_watch...
c89046d57d534348b41ca28f5c1c5443743dbe04
Analyze and fix the following issue in the Linux kernel code: HID: asus: do not try to initialize the backlight if the enpoint doesn't support it
Problem Details: Avoid possibly printing a warning about the inability to initialize the backlight if the hid endpoint doesn't support it. Also fix and move an incorrect check in asus_kbd_register_leds(): that same check is now used as a precondition to call that function. Fixes: 0919db9f3583 ("HID: asus: always full...
```diff diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c index 26047ccc8e7d..9fccfbe187cd 100644 --- a/drivers/hid/hid-asus.c +++ b/drivers/hid/hid-asus.c @@ -738,10 +738,6 @@ static int asus_kbd_register_leds(struct hid_device *hdev) unsigned char kbd_func; int ret; - /* Laptops keyboard backlight is...
7253091766ded0fd81fe8d8be9b8b835495b06e8
Analyze and fix the following issue in the Linux kernel code: HID: asus: do not abort probe when not necessary
Problem Details: In order to avoid dereferencing a NULL pointer asus_probe is aborted early and control of some asus devices is transferred over hid-generic after erroring out even when such NULL dereference cannot happen: only early abort when the NULL dereference can happen. Also make the code shorter and more adher...
```diff diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c index fa9a24f279f4..26047ccc8e7d 100644 --- a/drivers/hid/hid-asus.c +++ b/drivers/hid/hid-asus.c @@ -1324,22 +1324,17 @@ static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id) * were freed during registration due to no usag...
43b3d1a95a587d32f3d441033d0aa108515a8c27
Analyze and fix the following issue in the Linux kernel code: HID: asus: simplify and improve asus_kbd_set_report()
Problem Details: Make the function shorter and easier to read using __free, and also fix a misaligned comment closing tag. The __free macro from cleanup.h is already used in the driver, but its include is missing: add it. Signed-off-by: Denis Benato <denis.benato@linux.dev> Signed-off-by: Jiri Kosina <jkosina@suse.co...
```diff diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c index 7513a0b3e155..fa9a24f279f4 100644 --- a/drivers/hid/hid-asus.c +++ b/drivers/hid/hid-asus.c @@ -21,6 +21,7 @@ */ #include <linux/acpi.h> +#include <linux/cleanup.h> #include <linux/dmi.h> #include <linux/hid.h> #include <linux/module.h> ...
51d33b42b8ae23da92819d28439fdd5636c45186
Analyze and fix the following issue in the Linux kernel code: HID: asus: make asus_resume adhere to linux kernel coding standards
Problem Details: Linux kernel coding standars requires functions opening brackets to be in a newline: move the opening bracket of asus_resume in its own line. Fixes: 546edbd26cff ("HID: hid-asus: reset the backlight brightness level on resume") Signed-off-by: Denis Benato <denis.benato@linux.dev> Signed-off-by: Jiri K...
```diff diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c index ba00726b48bb..7513a0b3e155 100644 --- a/drivers/hid/hid-asus.c +++ b/drivers/hid/hid-asus.c @@ -1172,7 +1172,8 @@ static int asus_start_multitouch(struct hid_device *hdev) return 0; } -static int __maybe_unused asus_resume(struct hid_device...
a593671545475dd78c7ba939155efb6c272b161e
Analyze and fix the following issue in the Linux kernel code: HID: asus: fix code style of comments and brackets
Problem Details: In asus_raw_event there is code that would violate checkpatch script such as unaligned closing comments and superfluous graph parenthesis: fix these stylistic issues. Also remove an empty comment spanning two lines. This commit does not change runtime behavior. Signed-off-by: Denis Benato <denis.ben...
```diff diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c index e5dee5b6d856..ba00726b48bb 100644 --- a/drivers/hid/hid-asus.c +++ b/drivers/hid/hid-asus.c @@ -20,9 +20,6 @@ * Copyright (c) 2016 Frederik Wenigwieser <frederik.wenigwieser@gmail.com> */ -/* - */ - #include <linux/acpi.h> #include <lin...
dd800099c26d9cb16d688c23aa469dc677b0b735
Analyze and fix the following issue in the Linux kernel code: HID: hid-lenovo-go-s: Fix spelling mistake "configuratiion" -> "configuration"
Problem Details: There is a spelling mistake in a dev_err_probe message. Fix it. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Derek J. Clark <derekjohn.clark@gmail.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com> Signed-off-by: ...
```diff diff --git a/drivers/hid/hid-lenovo-go-s.c b/drivers/hid/hid-lenovo-go-s.c index 8ffa25b20f9c..01c7bdd4fbe0 100644 --- a/drivers/hid/hid-lenovo-go-s.c +++ b/drivers/hid/hid-lenovo-go-s.c @@ -1396,7 +1396,7 @@ static int hid_gos_cfg_probe(struct hid_device *hdev, ret = devm_device_add_group(gos_cdev_rgb.led_cd...
d69ccfcbc9551988190895bc125a8bf709aa5931
Analyze and fix the following issue in the Linux kernel code: HID: hid-lenovo-go: Add Lenovo Legion Go Series HID Driver
Problem Details: Adds initial framework for a new HID driver, hid-lenovo-go, along with attributes that report the firmware and hardware version for each component of the HID device, of which there are 4 parts: The MCU, the transmission dongle, the left "handle" controller half, and the right "handle" controller half. ...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index 7b277d5bf3d1..c4987c39d9da 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14467,6 +14467,14 @@ L: platform-driver-x86@vger.kernel.org S: Maintained F: drivers/platform/x86/lenovo/wmi-hotkey-utilities.c +LENOVO HID drivers +M: Derek J. Clark <derekjohn.clark@gmail...
f044788088ef55e9855b17b7984ffe522c40c093
Analyze and fix the following issue in the Linux kernel code: fbdev: viafb: check ioremap return value in viafb_lcd_get_mobile_state
Problem Details: The function viafb_lcd_get_mobile_state() calls ioremap() without checking the return value. If ioremap() fails (returns NULL), the subsequent readw() will cause a NULL pointer dereference. Signed-off-by: Wang Jun <1742789905@qq.com> Signed-off-by: Helge Deller <deller@gmx.de>
```diff diff --git a/drivers/video/fbdev/via/lcd.c b/drivers/video/fbdev/via/lcd.c index 8673fced8749..3fa2304fbda7 100644 --- a/drivers/video/fbdev/via/lcd.c +++ b/drivers/video/fbdev/via/lcd.c @@ -954,6 +954,9 @@ bool viafb_lcd_get_mobile_state(bool *mobile) u16 start_pattern; biosptr = ioremap(romaddr, 0x10000...
22fd7f7fed2ae3702f90d1985c326354e86b9c75
Analyze and fix the following issue in the Linux kernel code: firmware: stratix10-svc: Add Multi SVC clients support
Problem Details: In the current implementation, SVC client drivers such as socfpga-hwmon, intel_fcs, stratix10-soc, stratix10-rsu each send an SMC command that triggers a single thread in the stratix10-svc driver. Upon receiving a callback, the initiating client driver sends a stratix10-svc-done signal, terminating the...
```diff diff --git a/drivers/firmware/stratix10-svc.c b/drivers/firmware/stratix10-svc.c index 6f5c298582ab..e9e35d67ef96 100644 --- a/drivers/firmware/stratix10-svc.c +++ b/drivers/firmware/stratix10-svc.c @@ -37,15 +37,14 @@ * service layer will return error to FPGA manager when timeout occurs, * timeout is set t...
fdadbf6e84c44df8dbb85cfdd38bc10e4431501d
Analyze and fix the following issue in the Linux kernel code: iavf: fix incorrect reset handling in callbacks
Problem Details: Three driver callbacks schedule a reset and wait for its completion: ndo_change_mtu(), ethtool set_ringparam(), and ethtool set_channels(). Waiting for reset in ndo_change_mtu() and set_ringparam() was added by commit c2ed2403f12c ("iavf: Wait for reset in callbacks which trigger it") to fix a race co...
```diff diff --git a/drivers/net/ethernet/intel/iavf/iavf.h b/drivers/net/ethernet/intel/iavf/iavf.h index a87e0c6d4017..e9fb0a0919e3 100644 --- a/drivers/net/ethernet/intel/iavf/iavf.h +++ b/drivers/net/ethernet/intel/iavf/iavf.h @@ -260,7 +260,6 @@ struct iavf_adapter { struct work_struct adminq_task; struct work...
efc54fb13d79117a825fef17364315a58682c7ec
Analyze and fix the following issue in the Linux kernel code: iavf: fix PTP use-after-free during reset
Problem Details: Commit 7c01dbfc8a1c5f ("iavf: periodically cache PHC time") introduced a worker to cache PHC time, but failed to stop it during reset or disable. This creates a race condition where `iavf_reset_task()` or `iavf_disable_vf()` free adapter resources (AQ) while the worker is still running. If the worker ...
```diff diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c index 86c1964f42e1..c7abd3331e03 100644 --- a/drivers/net/ethernet/intel/iavf/iavf_main.c +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c @@ -3036,6 +3036,8 @@ static void iavf_disable_vf(struct iavf_adapter...
bd98c6204d1195973b1760fe45860863deb6200c
Analyze and fix the following issue in the Linux kernel code: drivers: net: ice: fix devlink parameters get without irdma
Problem Details: If CONFIG_IRDMA isn't enabled but there are ice NICs in the system, the driver will prevent full devlink dev param show dump because its rdma get callbacks return ENODEV and stop the dump. For example: $ devlink dev param show pci/0000:82:00.0: name msix_vec_per_pf_max type generic values: ...
```diff diff --git a/drivers/net/ethernet/intel/ice/devlink/devlink.c b/drivers/net/ethernet/intel/ice/devlink/devlink.c index 6c72bd15db6d..6144cee8034d 100644 --- a/drivers/net/ethernet/intel/ice/devlink/devlink.c +++ b/drivers/net/ethernet/intel/ice/devlink/devlink.c @@ -1360,7 +1360,7 @@ ice_devlink_enable_roce_get...
9095f233c0258e9a05e958c7d822eb38681e7a5a
Analyze and fix the following issue in the Linux kernel code: printk: Fix _DESCS_COUNT type for 64-bit systems
Problem Details: The _DESCS_COUNT macro currently uses 1U (32-bit unsigned) instead of 1UL (unsigned long), which breaks the intended overflow testing design on 64-bit systems. Problem Analysis: ---------------- The printk_ringbuffer uses a deliberate design choice to initialize descriptor IDs near the maximum 62-bit ...
```diff diff --git a/kernel/printk/printk_ringbuffer.h b/kernel/printk/printk_ringbuffer.h index 4ef81349d9fb..4f4949700676 100644 --- a/kernel/printk/printk_ringbuffer.h +++ b/kernel/printk/printk_ringbuffer.h @@ -122,7 +122,7 @@ enum desc_state { }; #define _DATA_SIZE(sz_bits) (1UL << (sz_bits)) -#define _DESCS_C...
c880c0794076f04b0058dd5cbc1f94c33d7bff44
Analyze and fix the following issue in the Linux kernel code: wifi: ath10k: drop redundant device reference
Problem Details: Driver core holds a reference to the USB interface and its parent USB device while the interface is bound to a driver and there is no need to take additional references unless the structures are needed after disconnect. Drop the redundant device reference to reduce cargo culting, make it easier to spo...
```diff diff --git a/drivers/net/wireless/ath/ath10k/usb.c b/drivers/net/wireless/ath/ath10k/usb.c index 6661fff326e0..ad1cf0681b19 100644 --- a/drivers/net/wireless/ath/ath10k/usb.c +++ b/drivers/net/wireless/ath/ath10k/usb.c @@ -1016,7 +1016,6 @@ static int ath10k_usb_probe(struct usb_interface *interface, netif_...
2ddbec82e1650d57ea0f63d284b5da01d2f21293
Analyze and fix the following issue in the Linux kernel code: wifi: ath9k: drop redundant device reference
Problem Details: Driver core holds a reference to the USB interface and its parent USB device while the interface is bound to a driver and there is no need to take additional references unless the structures are needed after disconnect. Drop the redundant device reference to reduce cargo culting, make it easier to spo...
```diff diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index 8533b88974b2..821909b81ea9 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c @@ -1382,8 +1382,6 @@ static int ath9k_hif_usb_probe(struct usb_interface *interf...
86581adf05f526f53b90ebcbbc2fd4d9f9fd4c96
Analyze and fix the following issue in the Linux kernel code: wifi: ath6kl: drop redundant device reference
Problem Details: Driver core holds a reference to the USB interface and its parent USB device while the interface is bound to a driver and there is no need to take additional references unless the structures are needed after disconnect. Drop the redundant device reference to reduce cargo culting, make it easier to spo...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/usb.c b/drivers/net/wireless/ath/ath6kl/usb.c index 852e77e41bde..814faf96f1ff 100644 --- a/drivers/net/wireless/ath/ath6kl/usb.c +++ b/drivers/net/wireless/ath/ath6kl/usb.c @@ -1124,8 +1124,6 @@ static int ath6kl_usb_probe(struct usb_interface *interface, int vend...
38dd6ccfdfbbe865569a52fe1ba9fa1478f672e6
Analyze and fix the following issue in the Linux kernel code: remoteproc: xlnx: Only access buffer information if IPI is buffered
Problem Details: In the receive callback check if message is NULL to prevent possibility of crash by NULL pointer dereferencing. Signed-off-by: Ben Levinsky <ben.levinsky@amd.com> Signed-off-by: Tanmay Shah <tanmay.shah@amd.com> Fixes: 5dfb28c257b7 ("remoteproc: xilinx: Add mailbox channels for rpmsg") Cc: stable@vger...
```diff diff --git a/drivers/remoteproc/xlnx_r5_remoteproc.c b/drivers/remoteproc/xlnx_r5_remoteproc.c index 148d8c622566..5e92dc51f1c0 100644 --- a/drivers/remoteproc/xlnx_r5_remoteproc.c +++ b/drivers/remoteproc/xlnx_r5_remoteproc.c @@ -232,17 +232,19 @@ static void zynqmp_r5_mb_rx_cb(struct mbox_client *cl, void *ms...
fc71f409b22ca831a9f87a2712eaa09ef2bb4a5e
Analyze and fix the following issue in the Linux kernel code: nvme-pci: Fix race bug in nvme_poll_irqdisable()
Problem Details: In the following scenario, pdev can be disabled between (1) and (3) by (2). This sets pdev->msix_enabled = 0. Then, pci_irq_vector() will return MSI-X IRQ(>15) for (1) whereas return INTx IRQ(<=15) for (2). This causes IRQ warning because it tries to enable INTx IRQ that has never been disabled before....
```diff diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index d90db12c7cd8..93eb9f1cf9c1 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -1625,14 +1625,16 @@ static irqreturn_t nvme_irq_check(int irq, void *data) static void nvme_poll_irqdisable(struct nvme_queue *nvmeq) { struc...
b4e78f1427c7d6859229ae9616df54e1fc05a516
Analyze and fix the following issue in the Linux kernel code: nvme-pci: Fix slab-out-of-bounds in nvme_dbbuf_set
Problem Details: dev->online_queues is a count incremented in nvme_init_queue. Thus, valid indices are 0 through dev->online_queues − 1. This patch fixes the loop condition to ensure the index stays within the valid range. Index 0 is excluded because it is the admin queue. KASAN splat: ==============================...
```diff diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 9a7863e2001e..d90db12c7cd8 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -544,7 +544,7 @@ static void nvme_dbbuf_set(struct nvme_dev *dev) /* Free memory and continue on */ nvme_dbbuf_dma_free(dev); - for (i = ...
52a8a1ba883defbfe3200baa22cf4cd21985d51a
Analyze and fix the following issue in the Linux kernel code: xfs: fix undersized l_iclog_roundoff values
Problem Details: If the superblock doesn't list a log stripe unit, we set the incore log roundoff value to 512. This leads to corrupt logs and unmountable filesystems in generic/617 on a disk with 4k physical sectors... XFS (sda1): Mounting V5 Filesystem ff3121ca-26e6-4b77-b742-aaff9a449e1c XFS (sda1): Torn write (CR...
```diff diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index b96f262ba139..f807f8f4f705 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c @@ -1357,6 +1357,8 @@ xlog_alloc_log( if (xfs_has_logv2(mp) && mp->m_sb.sb_logsunit > 1) log->l_iclog_roundoff = mp->m_sb.sb_logsunit; + else if (mp->m_sb.sb_logsectsize ...
c7c92f76f90a81dcc5c48cefa3343556501870b9
Analyze and fix the following issue in the Linux kernel code: perf annotate loongarch: Fix off-by-one bug in outside check
Problem Details: A copy-paste of a similar issue fixed by Peter Collingbourne in: https://lore.kernel.org/linux-perf-users/20260304190613.2507582-1-pcc@google.com/ Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: ...
```diff diff --git a/tools/perf/util/annotate-arch/annotate-loongarch.c b/tools/perf/util/annotate-arch/annotate-loongarch.c index 3aeab453a059..950f34e59e5c 100644 --- a/tools/perf/util/annotate-arch/annotate-loongarch.c +++ b/tools/perf/util/annotate-arch/annotate-loongarch.c @@ -93,7 +93,7 @@ static int loongarch_ju...
d557640e4ce589a24dca5ca7ce3b9680f471325f
Analyze and fix the following issue in the Linux kernel code: sched: idle: Make skipping governor callbacks more consistent
Problem Details: If the cpuidle governor .select() callback is skipped because there is only one idle state in the cpuidle driver, the .reflect() callback should be skipped as well, at least for consistency (if not for correctness), so do it. Fixes: e5c9ffc6ae1b ("cpuidle: Skip governor when only one idle state is ava...
```diff diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 65fbb8e807b9..c7876e9e024f 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c @@ -359,16 +359,6 @@ noinstr int cpuidle_enter_state(struct cpuidle_device *dev, int cpuidle_select(struct cpuidle_driver *drv, struct cpuid...
4c527c7e030672efd788d0806d7a68972a7ba3c1
Analyze and fix the following issue in the Linux kernel code: s390/dasd: Copy detected format information to secondary device
Problem Details: During online processing for a DASD device an IO operation is started to determine the format of the device. CDL format contains specifically sized blocks at the beginning of the disk. For a PPRC secondary device no real IO operation is possible therefore this IO request can not be started and this st...
```diff diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index e8f0e302a625..c0f665a2929d 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c @@ -6135,6 +6135,7 @@ static void copy_pair_set_active(struct dasd_copy_relation *copy, char *new_busi static int dasd_e...
40e9cd4ae8ec43b107ed2bff422a8fa39dcf4e4b
Analyze and fix the following issue in the Linux kernel code: s390/dasd: Move quiesce state with pprc swap
Problem Details: Quiesce and resume is a mechanism to suspend operations on DASD devices. In the context of a controlled copy pair swap operation, the quiesce operation is usually issued before the actual swap and a resume afterwards. During the swap operation, the underlying device is exchanged. Therefore, the quiesc...
```diff diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index b08e900687f3..e8f0e302a625 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c @@ -6182,6 +6182,11 @@ static int dasd_eckd_copy_pair_swap(struct dasd_device *device, char *prim_busid dev_name(&sec...
be34705aa527872e5ce83927b7bc9307ba8095ca
Analyze and fix the following issue in the Linux kernel code: perf ftrace: Fix hashmap__new() error checking
Problem Details: The hashmap__new() function never returns NULL, it returns error pointers. Fix the error checking to match. Additionally, set ftrace->profile_hash to NULL on error, and return the exact error code from hashmap__new(). Fixes: 0f223813edd051a5 ("perf ftrace: Add 'profile' command") Suggested-by: Ian Ro...
```diff diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c index 6b6eec65f93f..4cc33452d79b 100644 --- a/tools/perf/builtin-ftrace.c +++ b/tools/perf/builtin-ftrace.c @@ -18,6 +18,7 @@ #include <poll.h> #include <ctype.h> #include <linux/capability.h> +#include <linux/err.h> #include <linux/stri...
9be71d462c33b1a00acfa4ab8f0f5332ed592817
Analyze and fix the following issue in the Linux kernel code: firmware: cs_dsp: Simplify suppressing log messages during KUnit testing
Problem Details: Rework the way that kernel log messages are rate-limited or suppressed while running the cs_dsp KUnit tests. Under normal conditions cs_dsp doesn't produce an unreasonable number of log messages, and state changes are relatively infrequent. But the KUnit tests run through a very large number of test c...
```diff diff --git a/drivers/firmware/cirrus/cs_dsp.c b/drivers/firmware/cirrus/cs_dsp.c index f9d8a883900d..39e7e1db8eed 100644 --- a/drivers/firmware/cirrus/cs_dsp.c +++ b/drivers/firmware/cirrus/cs_dsp.c @@ -9,6 +9,7 @@ * Cirrus Logic International Semiconductor Ltd. */ +#include <kunit...
207fd1f4d84b7f073eaab556623bf4ad3a161f3f
Analyze and fix the following issue in the Linux kernel code: ASoC: SOF: sof-audio: pcm_id is __le32
Problem Details: The pcm_id value is __le32 so convert it before passing to the dev_dbg function to be printed. Also fixup some other uses of __le32 data and a couple of places where %u should have been used instead of %d Picked up by sparse prototype for variadic and printf function checking. Fixes a large number of ...
```diff diff --git a/sound/soc/sof/compress.c b/sound/soc/sof/compress.c index 96570121aae0..c6c19df29035 100644 --- a/sound/soc/sof/compress.c +++ b/sound/soc/sof/compress.c @@ -248,7 +248,7 @@ static int sof_compr_set_params(struct snd_soc_component *component, ipc_params_reply.posn_offset); if (ret < 0)...
8fc5c7895185d1119ae76b509892a1d14e0bd483
Analyze and fix the following issue in the Linux kernel code: ASoC: wm_adsp: Combine some similar code in firmware file search
Problem Details: In wm_adsp_request_firmware_files() squash the if (system_name && suffix) and the following if (system_name) blocks together. This removes some duplicated code. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20260310141817.1871794-11-rf@opensource.cirrus.co...
```diff diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index bcc77797c09a..a5fa0db250f2 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -804,47 +804,42 @@ VISIBLE_IF_KUNIT int wm_adsp_request_firmware_files(struct wm_adsp *dsp, { const char *system_name = dsp->system...
d8a4c96082e6f5c7aaf6f3e101effe7ff0ea4d6e
Analyze and fix the following issue in the Linux kernel code: ASoC: wm_adsp: Add KUnit test cases for '/' in firmware filenames
Problem Details: Add test cases that '/' in the system name or ALSA prefix are converted to '-' in the firmware filename. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20260310141817.1871794-9-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
```diff diff --git a/sound/soc/codecs/wm_adsp_fw_find_test.c b/sound/soc/codecs/wm_adsp_fw_find_test.c index 556221d38a50..11047851fd80 100644 --- a/sound/soc/codecs/wm_adsp_fw_find_test.c +++ b/sound/soc/codecs/wm_adsp_fw_find_test.c @@ -949,6 +949,13 @@ static const struct wm_adsp_fw_find_test_params wm_adsp_fw_find_...
66170cc7ed59fb7e1e192e53f1d690bd04e8c720
Analyze and fix the following issue in the Linux kernel code: ASoC: wm_adsp: Convert '/' to '-' when normalizing firmware filenames
Problem Details: Don't preserve '/' in firmware filename fields - convert it to '-' like other punctuation characters. The code originally normalized the entire string, including the directory prefix. To prevent breaking the directory it had to preserve '/' characters in the name, but this meant that the system name a...
```diff diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index 9f39db680e07..74c503fc3088 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -776,16 +776,15 @@ static int wm_adsp_request_firmware_file(struct wm_adsp *dsp, return -ENOMEM; /* - * Make sure that filenam...
21b3fb7dc19caa488d285e3c47999f7f1a179334
Analyze and fix the following issue in the Linux kernel code: regulator: pca9450: Correct probed name for PCA9452
Problem Details: An incorrect device name was logged for PCA9452 because the dev_info() ternary omitted PCA9452 and fell through to "pca9450bc". Introduce a type_name and set it per device type so the probed message matches the actual PMIC. While here, make the PCA9451A case explicit. No functional changes. Fixes: 01...
```diff diff --git a/drivers/regulator/pca9450-regulator.c b/drivers/regulator/pca9450-regulator.c index 2205f6de37e7..45d7dc44c2cd 100644 --- a/drivers/regulator/pca9450-regulator.c +++ b/drivers/regulator/pca9450-regulator.c @@ -1293,6 +1293,7 @@ static int pca9450_i2c_probe(struct i2c_client *i2c) struct regulator...
5d0efaf47ee90ac60efae790acee3a3ed99ebf80
Analyze and fix the following issue in the Linux kernel code: regulator: pca9450: Correct interrupt type
Problem Details: Kernel warning on i.MX8MP-EVK when doing module test: irq: type mismatch, failed to map hwirq-3 for gpio@30200000! Per PCA945[X] specification: The IRQ_B pin is pulled low when any unmasked interrupt bit status is changed and it is released high once application processor read INT1 register. So the i...
```diff diff --git a/drivers/regulator/pca9450-regulator.c b/drivers/regulator/pca9450-regulator.c index 5fa868264250..2205f6de37e7 100644 --- a/drivers/regulator/pca9450-regulator.c +++ b/drivers/regulator/pca9450-regulator.c @@ -1369,7 +1369,7 @@ static int pca9450_i2c_probe(struct i2c_client *i2c) if (pca9450->irq...
e53c0e99fd93da200c413deb57875f9f5fdb314a
Analyze and fix the following issue in the Linux kernel code: spi: cadence-qspi: Fix requesting of APB and AHB clocks on JH7110
Problem Details: The move of the AHB and APB clocks from a JH7110 specific quirk to the main clock init dropped the specification of the clock names to request for the AHB and APB clocks, resulting in the clock framework requesting a clock with a NULL name three times. On most platforms where the clocks are physically...
```diff diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c index 649ff55333f0..5fb0cb07c110 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -76,6 +76,11 @@ struct cqspi_flash_pdata { u8 cs; }; +static const struct clk_bulk_data cqspi_clks[C...
6ab3532b4c98f4e51969f0e5f3fc919c535f3ce1
Analyze and fix the following issue in the Linux kernel code: ACPI: video: Switch over to auxiliary bus type
Problem Details: Commit 02c057ddefef ("ACPI: video: Convert the driver to a platform one") switched over the ACPI video bus driver from an ACPI driver to a platform driver, but that change introduced an unwanted and unexpected side effect. Namely, on some systems, the ACPI device object of the ACPI video bus device is ...
```diff diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index df0ff0764d0d..6f4b545f7377 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -9,6 +9,7 @@ config ARCH_SUPPORTS_ACPI menuconfig ACPI bool "ACPI (Advanced Configuration and Power Interface) Support" depends on ARCH_SUPPORTS_ACPI + s...
0e07b16371b6eef9b5a4a1fd3e7942938811072e
Analyze and fix the following issue in the Linux kernel code: drm/xe: Allow per queue programming of COMMON_SLICE_CHICKEN3 bit13
Problem Details: Similar to i915's commit cebc13de7e704b1355bea208a9f9cdb042c74588 ("drm/i915: Whitelist COMMON_SLICE_CHICKEN3 for UMD access"), except that instead of putting the register on the allowlist for UMD to program, the KMD is doing the programming at context initialization based on a queue creation flag. Th...
```diff diff --git a/drivers/gpu/drm/xe/regs/xe_gt_regs.h b/drivers/gpu/drm/xe/regs/xe_gt_regs.h index 8e6df9dcd137..4ee88f629c02 100644 --- a/drivers/gpu/drm/xe/regs/xe_gt_regs.h +++ b/drivers/gpu/drm/xe/regs/xe_gt_regs.h @@ -183,6 +183,7 @@ #define COMMON_SLICE_CHICKEN3 XE_REG(0x7304, XE_REG_OPTION_MASKED) #de...
4063a4d39f97b02cb7bbdb47f0b0050b7821e187
Analyze and fix the following issue in the Linux kernel code: dt-bindings: display: panel: Document the rotation property
Problem Details: The Jadard jd9365da-h3 driver already allows DRM to get the panel orientation via the device tree rotation property (described in panel-common.yaml), but it's currently not documented. Describe it in the driver documentation to fix a dtbs_check error in Xiaomi Mi Smart Clock x04g, where the panel is la...
```diff diff --git a/Documentation/devicetree/bindings/display/panel/jadard,jd9365da-h3.yaml b/Documentation/devicetree/bindings/display/panel/jadard,jd9365da-h3.yaml index 0bb4980555e2..e39efb44ed42 100644 --- a/Documentation/devicetree/bindings/display/panel/jadard,jd9365da-h3.yaml +++ b/Documentation/devicetree/bind...
65fb1ca580461a4fb4529a22b0d6f50c13e4c3cc
Analyze and fix the following issue in the Linux kernel code: dt-bindings: vendor: add taiguanck
Problem Details: Add the "taiguanck" vendor prefix for Shenzhen Top Group Technology Co., Ltd. The prefix is derived from the vendor's website domain: www.taiguanck.com/en/, which uses "taiguanck" as the primary identifier of the company. Signed-off-by: Langyan Ye <yelangyan@huaqin.corp-partner.google.com> Acked-by: ...
```diff diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 2af68463c685..3ec0951c09c1 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -1612,6 +1612,8 @@ pat...
312e23275b5bfa61e6cad9f6648d048257273742
Analyze and fix the following issue in the Linux kernel code: dt-bindings: vendor-prefixes: Add lxd
Problem Details: Add vendor prefix for LXD Research & Display, LLC. Link: https://www.lxdinc.com/ Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Neil Armstrong <neil.armstrong@linaro...
```diff diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 1ef679f88203..2af68463c685 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -973,6 +973,8 @@ patte...
bf29cb3641b80bac759c3332b02e0b270e16bf94
Analyze and fix the following issue in the Linux kernel code: perf annotate: Fix hashmap__new() error checking
Problem Details: The hashmap__new() function never returns NULL, it returns error pointers. Fix the error checking to match. Additionally, set src->samples to NULL to prevent any later code from accidentally using the error pointer. Fixes: d3e7cad6f36d9e80 ("perf annotate: Add a hashmap for symbol histogram") Reviewe...
```diff diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 2e3522905046..63f0ee9d4c03 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -44,6 +44,7 @@ #include "strbuf.h" #include <regex.h> #include <linux/bitops.h> +#include <linux/err.h> #include <linux/kernel.h> ...
daa6c79858e9ca75c548452bf71db8a9e61bde42
Analyze and fix the following issue in the Linux kernel code: block: clear BIO_QOS flags in blk_steal_bios()
Problem Details: When a bio goes through the rq_qos infrastructure on a path's request queue, it gets BIO_QOS_THROTTLED or BIO_QOS_MERGED flags set. These flags indicate that rq_qos_done_bio() should be called on completion to update rq_qos accounting. During path failover in nvme_failover_req(), the bio's bi_bdev is ...
```diff diff --git a/block/blk-mq.c b/block/blk-mq.c index 4aebc6b479ef..4c5c16cce4f8 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -3439,6 +3439,8 @@ void blk_steal_bios(struct bio_list *list, struct request *rq) * the flag to avoid spurious EAGAIN I/O failures. */ bio->bi_opf &= ~REQ_NOWAIT; + bio_c...
329f0b9b48ee6ab59d1ab72fef55fe8c6463a6cf
Analyze and fix the following issue in the Linux kernel code: netfilter: xt_IDLETIMER: reject rev0 reuse of ALARM timer labels
Problem Details: IDLETIMER revision 0 rules reuse existing timers by label and always call mod_timer() on timer->timer. If the label was created first by revision 1 with XT_IDLETIMER_ALARM, the object uses alarm timer semantics and timer->timer is never initialized. Reusing that object from revision 0 causes mod_timer...
```diff diff --git a/net/netfilter/xt_IDLETIMER.c b/net/netfilter/xt_IDLETIMER.c index 5d93e225d0f8..517106165ad2 100644 --- a/net/netfilter/xt_IDLETIMER.c +++ b/net/netfilter/xt_IDLETIMER.c @@ -318,6 +318,12 @@ static int idletimer_tg_checkentry(const struct xt_tgchk_param *par) info->timer = __idletimer_tg_find_b...
6dcee8496d53165b2d8a5909b3050b62ae71fe89
Analyze and fix the following issue in the Linux kernel code: netfilter: nfnetlink_cthelper: fix OOB read in nfnl_cthelper_dump_table()
Problem Details: nfnl_cthelper_dump_table() has a 'goto restart' that jumps to a label inside the for loop body. When the "last" helper saved in cb->args[1] is deleted between dump rounds, every entry fails the (cur != last) check, so cb->args[1] is never cleared. The for loop finishes with cb->args[0] == nf_ct_helpe...
```diff diff --git a/net/netfilter/nfnetlink_cthelper.c b/net/netfilter/nfnetlink_cthelper.c index d658b1478fa0..d545fa459455 100644 --- a/net/netfilter/nfnetlink_cthelper.c +++ b/net/netfilter/nfnetlink_cthelper.c @@ -601,10 +601,10 @@ restart: goto out; } } - } - if (cb->args[1]) { - cb->args[1] = 0; - ...
f1ba83755d81c6fc66ac7acd723d238f974091e9
Analyze and fix the following issue in the Linux kernel code: netfilter: nfnetlink_queue: fix entry leak in bridge verdict error path
Problem Details: nfqnl_recv_verdict() calls find_dequeue_entry() to remove the queue entry from the queue data structures, taking ownership of the entry. For PF_BRIDGE packets, it then calls nfqa_parse_bridge() to parse VLAN attributes. If nfqa_parse_bridge() returns an error (e.g. NFQA_VLAN present but NFQA_VLAN_TCI ...
```diff diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c index 7f5248b5f1ee..47f7f62906e2 100644 --- a/net/netfilter/nfnetlink_queue.c +++ b/net/netfilter/nfnetlink_queue.c @@ -1546,8 +1546,10 @@ static int nfqnl_recv_verdict(struct sk_buff *skb, const struct nfnl_info *info, if (entry...
cfe770220ac2dbd3e104c6b45094037455da81d4
Analyze and fix the following issue in the Linux kernel code: netfilter: x_tables: guard option walkers against 1-byte tail reads
Problem Details: When the last byte of options is a non-single-byte option kind, walkers that advance with i += op[i + 1] ? : 1 can read op[i + 1] past the end of the option area. Add an explicit i == optlen - 1 check before dereferencing op[i + 1] in xt_tcpudp and xt_dccp option walkers. Fixes: 2e4e6a17af35 ("[NETFI...
```diff diff --git a/net/netfilter/xt_dccp.c b/net/netfilter/xt_dccp.c index e5a13ecbe67a..037ab93e25d0 100644 --- a/net/netfilter/xt_dccp.c +++ b/net/netfilter/xt_dccp.c @@ -62,10 +62,10 @@ dccp_find_option(u_int8_t option, return true; } - if (op[i] < 2) + if (op[i] < 2 || i == optlen - 1) i++; else...
d6d8cd2db236a9dd13dbc2d05843b3445cc964b5
Analyze and fix the following issue in the Linux kernel code: netfilter: nft_set_pipapo: fix stack out-of-bounds read in pipapo_drop()
Problem Details: pipapo_drop() passes rulemap[i + 1].n to pipapo_unmap() as the to_offset argument on every iteration, including the last one where i == m->field_count - 1. This reads one element past the end of the stack-allocated rulemap array (declared as rulemap[NFT_PIPAPO_MAX_FIELDS] with NFT_PIPAPO_MAX_FIELDS == ...
```diff diff --git a/net/netfilter/nft_set_pipapo.c b/net/netfilter/nft_set_pipapo.c index a34632ae6048..7fd24e0cc428 100644 --- a/net/netfilter/nft_set_pipapo.c +++ b/net/netfilter/nft_set_pipapo.c @@ -1640,6 +1640,7 @@ static void pipapo_drop(struct nft_pipapo_match *m, int i; nft_pipapo_for_each_field(f, i, m)...
7cb9a23d7ae40a702577d3d8bacb7026f04ac2a9
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_tables: always walk all pending catchall elements
Problem Details: During transaction processing we might have more than one catchall element: 1 live catchall element and 1 pending element that is coming as part of the new batch. If the map holding the catchall elements is also going away, its required to toggle all catchall elements and not just the first viable can...
```diff diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index 710f0ee21a34..dacec5f8a11c 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -829,7 +829,6 @@ static void nft_map_catchall_deactivate(const struct nft_ctx *ctx, nft_set_elem_change_active(ctx->n...
b7cdc5a97d02c943f4bdde4d5767ad0c13cad92b
Analyze and fix the following issue in the Linux kernel code: netfilter: nf_tables: Fix for duplicate device in netdev hooks
Problem Details: When handling NETDEV_REGISTER notification, duplicate device registration must be avoided since the device may have been added by nft_netdev_hook_alloc() already when creating the hook. Suggested-by: Florian Westphal <fw@strlen.de> Reported-by: syzbot+bb9127e278fa198e110c@syzkaller.appspotmail.com Clo...
```diff diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index 1862bd7fe804..710f0ee21a34 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -9688,7 +9688,7 @@ static int nft_flowtable_event(unsigned long event, struct net_device *dev, break; case NETDEV_R...