id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
8b7a26b6681922a38cd5a7829ace61f8e54df9b7
Analyze and fix the following issue in the Linux kernel code: wifi: ath11k: fix warning when unbinding
Problem Details: If there is an error during some initialization related to firmware, the buffers dp->tx_ring[i].tx_status are released. However this is released again when the device is unbinded (ath11k_pci), and we get: WARNING: CPU: 0 PID: 6231 at mm/slub.c:4368 free_large_kmalloc+0x57/0x90 Call Trace: free_large_km...
```diff diff --git a/drivers/net/wireless/ath/ath11k/dp.c b/drivers/net/wireless/ath/ath11k/dp.c index bbb86f165141..5a50b623bd07 100644 --- a/drivers/net/wireless/ath/ath11k/dp.c +++ b/drivers/net/wireless/ath/ath11k/dp.c @@ -1040,6 +1040,7 @@ void ath11k_dp_free(struct ath11k_base *ab) idr_destroy(&dp->tx_ring[i]....
136ca91411b0b637e862eb7b1cce2a56853edd17
Analyze and fix the following issue in the Linux kernel code: tools/nolibc: getopt: Fix potential out of bounds access
Problem Details: Running clang-tidy on a program that uses getopt() from nolibc this warning appears: getopt.h:80:6: warning: Out of bound access to memory after the end of the string literal [clang-analyzer-security.ArrayBound] 80 | if (optstring[i] == ':') { This looks like a very unlikely case that an argu...
```diff diff --git a/tools/include/nolibc/getopt.h b/tools/include/nolibc/getopt.h index 87565e3b6a33..3ad140f692df 100644 --- a/tools/include/nolibc/getopt.h +++ b/tools/include/nolibc/getopt.h @@ -71,7 +71,7 @@ int getopt(int argc, char * const argv[], const char *optstring) d = optstring[i++]; } while (d && d !...
6a082433bcc749f3e07bd2e28a733758ee875373
Analyze and fix the following issue in the Linux kernel code: perf riscv: Add SDT argument parsing for RISC-V
Problem Details: Implement __perf_sdt_arg_parse_op_riscv() to convert RISC-V GCC-generated SDT probe operands into uprobe-compatible format, and register it in the perf_sdt_arg_parse_op() dispatcher for EM_RISCV. RISC-V GCC uses the 'nor' constraint for SDT arguments, producing operands in the following formats: Fo...
```diff diff --git a/tools/perf/util/perf-regs-arch/perf_regs_riscv.c b/tools/perf/util/perf-regs-arch/perf_regs_riscv.c index 5b5f21fcba8c..bf769304c97c 100644 --- a/tools/perf/util/perf-regs-arch/perf_regs_riscv.c +++ b/tools/perf/util/perf-regs-arch/perf_regs_riscv.c @@ -1,8 +1,136 @@ // SPDX-License-Identifier: GP...
12e896b9794bbd88f56aeac2a5807ae8d4bb5ad8
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Fix expired UDP LRU entries in XDP LB benchmark
Problem Details: populate_lru() zero-initializes atime: struct real_pos_lru lru = { .pos = real_idx }; connection_table_lookup() treats UDP entries with cur_time - atime > 30s as expired, so every pre-populated entry expires immediately. Calibration masks this on the CPU it runs on, but if validation migrates to...
```diff diff --git a/tools/testing/selftests/bpf/benchs/bench_xdp_lb.c b/tools/testing/selftests/bpf/benchs/bench_xdp_lb.c index 0b6709a2b03c..8e25bccbde92 100644 --- a/tools/testing/selftests/bpf/benchs/bench_xdp_lb.c +++ b/tools/testing/selftests/bpf/benchs/bench_xdp_lb.c @@ -563,12 +563,23 @@ static void create_per_...
fa747e9f843ba3a0fa4d3fabaf50c9e11aaf963f
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: Fix cold_lru producing zero batch_hash in XDP LB benchmark
Problem Details: batch_hash = (batch_gen ^ cpu_id) * KNUTH_HASH_MULT; When batch_gen == cpu_id the XOR produces zero, batch_hash is zero, and *saddr ^= 0 is a no-op. Every iteration hits the warm LRU entry. During validation batch_gen is 2, so running on CPU 2 triggers: [udp-v4-lru-miss] COUNTER FAIL: LRU misse...
```diff diff --git a/tools/testing/selftests/bpf/progs/xdp_lb_bench.c b/tools/testing/selftests/bpf/progs/xdp_lb_bench.c index b9fd848c035d..13777b3dcac8 100644 --- a/tools/testing/selftests/bpf/progs/xdp_lb_bench.c +++ b/tools/testing/selftests/bpf/progs/xdp_lb_bench.c @@ -618,7 +618,7 @@ int xdp_lb_bench(struct xdp_m...
cdc517688ffa2c30a64a20b558a9ecbf046c70f1
Analyze and fix the following issue in the Linux kernel code: regulator: dt-bindings: mt6359: Drop regulator-name pattern restrictions
Problem Details: The name of the regulator should match what the board design specifies for the power rail. There should be no limitations on what the name can be, and they definitely don't always follow the PMIC's own names. Drop the restrictions on regulator-name. Fixes: 8771456635d5 ("dt-bindings: regulator: Add d...
```diff diff --git a/Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml b/Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml index fe4ac9350ba0..ac925334ae83 100644 --- a/Documentation/devicetree/bindings/regulator/mt6359-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/mt6...
3d879647fb03dab6fe6e1dd9404a2dd324096218
Analyze and fix the following issue in the Linux kernel code: io_uring/timeout: splice timed out link in timeout handler
Problem Details: A previous commit deferred this to the task_work part of it, so it could be protected by ->uring_lock. But that's actually not necessary here, and in fact the head clearing is not enough to make that safe. For those two reasons, just re-instate the local splicing. Fixes: 49ae66eb8c27 ("io_uring: defer...
```diff diff --git a/io_uring/timeout.c b/io_uring/timeout.c index 6353a4d979dc..c4dd26cf342d 100644 --- a/io_uring/timeout.c +++ b/io_uring/timeout.c @@ -417,8 +417,10 @@ static enum hrtimer_restart io_link_timeout_fn(struct hrtimer *timer) * done in io_req_task_link_timeout(), if needed. */ if (prev) { - if ...
c8a3be5bc2b2f2d53c56a8b9cab731e917b95c07
Analyze and fix the following issue in the Linux kernel code: clk: microchip: mpfs-ccc: fix peripheral driver registration failures after oob fix
Problem Details: Commit 2f7ae8ab6aa73 ("clk: microchip: mpfs-ccc: fix out of bounds access during output registration") fixed the out of bounds access, but it did so by packing sparse indices into a linear space. When peripheral drivers request clocks, they obviously don't care for this compression and use the sparse i...
```diff diff --git a/drivers/clk/microchip/clk-mpfs-ccc.c b/drivers/clk/microchip/clk-mpfs-ccc.c index 0a76a1aaa50f..40c17593e594 100644 --- a/drivers/clk/microchip/clk-mpfs-ccc.c +++ b/drivers/clk/microchip/clk-mpfs-ccc.c @@ -32,6 +32,7 @@ #define MPFS_CCC_FIXED_DIV 4 #define MPFS_CCC_OUTPUTS_PER_PLL 4 #define MPF...
09472f591aa0b72c2dd6c693f48b2d6fea66c7ba
Analyze and fix the following issue in the Linux kernel code: bitfield: wire __bf_shf to __builtin_ctzll
Problem Details: __bf_shf() is currently based on built-in ffsll. It's more straightforward to wire it to __builtin_ctzll, which makes it a pure rename. Worth to notice that __builtin_ffsll() is buggy on GCC before 14.1: int main() { sizeof(struct { int t : !(__builtin_ffsll(~0ULL) + 1 < 0); }...
```diff diff --git a/include/linux/bitfield.h b/include/linux/bitfield.h index 989c214ec8a5..14f86e455a67 100644 --- a/include/linux/bitfield.h +++ b/include/linux/bitfield.h @@ -44,7 +44,7 @@ * FIELD_MODIFY(REG_FIELD_C, &reg, c); */ -#define __bf_shf(x) (__builtin_ffsll(x) - 1) +#define __bf_shf __builtin_ctzll...
8a51b2e874f47a6094353b59ecae421f0968fe3a
Analyze and fix the following issue in the Linux kernel code: bitops: use common function parameter names
Problem Details: Fix the function prototypes to use the common parameter name 'addr' instead of 'p' (common to arch-specific implementations of these functions). This avoids the kernel-doc warnings: Warning: include/asm-generic/bitops/lock.h:19 function parameter 'p' not described in 'arch_test_and_set_bit_lock' Warn...
```diff diff --git a/include/asm-generic/bitops/lock.h b/include/asm-generic/bitops/lock.h index 14d4ec8c5152..ffb73b6129e7 100644 --- a/include/asm-generic/bitops/lock.h +++ b/include/asm-generic/bitops/lock.h @@ -16,16 +16,16 @@ * It can be used to implement bit locks. */ static __always_inline int -arch_test_an...
454257f6d124a92342dcbb7710c03dd6ef96c731
Analyze and fix the following issue in the Linux kernel code: sysfs: clamp show() return value in sysfs_kf_read()
Problem Details: sysfs_kf_seq_show() defends against buggy show() callbacks that return larger than PAGE_SIZE by clamping the value and printing a warning. sysfs_kf_read(), the prealloc variant, has no such defense. The only current in-tree user of __ATTR_PREALLOC is drivers/md/md.c, whose show() callbacks are well-be...
```diff diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index 6b3a8f62fa89..cd5bb0f9fee6 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c @@ -119,6 +119,10 @@ static ssize_t sysfs_kf_read(struct kernfs_open_file *of, char *buf, len = ops->show(kobj, of->kn->priv, buf); if (len < 0) return len; + if (len >= (ssi...
237557b8a81ab948e8332f7c0058e758f081c0a3
Analyze and fix the following issue in the Linux kernel code: sysfs: don't remove existing directory on update failure
Problem Details: When sysfs_update_group() is called for a named group and create_files() fails (e.g. -ENOMEM), internal_create_group() calls kernfs_remove(kn) on the group directory. In the update path, kn was obtained via kernfs_find_and_get() and refers to a directory that already existed before this call. Removin...
```diff diff --git a/fs/sysfs/group.c b/fs/sysfs/group.c index 182e54e575ee..4e1e4f18a166 100644 --- a/fs/sysfs/group.c +++ b/fs/sysfs/group.c @@ -188,7 +188,7 @@ static int internal_create_group(struct kobject *kobj, int update, kernfs_get(kn); error = create_files(kn, kobj, uid, gid, grp, update); if (error) { ...
9af1b6e175c82daf4b423da339a722d8e67a735a
Analyze and fix the following issue in the Linux kernel code: drm/virtio: use uninterruptible resv lock for plane updates
Problem Details: virtio_gpu_cursor_plane_update() and virtio_gpu_resource_flush() lock the framebuffer BO's dma_resv via virtio_gpu_array_lock_resv() and ignore its return value. The function can fail with -EINTR from dma_resv_lock_interruptible() (signal during lock wait) or with -ENOMEM from dma_resv_reserve_fences()...
```diff diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h index f17660a71a3e..2f3531950aa4 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -317,6 +317,7 @@ virtio_gpu_array_from_handles(struct drm_file *drm_file, u32 *handles, u32 ne...
a48bbcc7ac739e93562d6148c6fa504c2e9f22f8
Analyze and fix the following issue in the Linux kernel code: drm/virtio: use uninterruptible resv lock for plane updates
Problem Details: virtio_gpu_cursor_plane_update() and virtio_gpu_resource_flush() lock the framebuffer BO's dma_resv via virtio_gpu_array_lock_resv() and ignore its return value. The function can fail with -EINTR from dma_resv_lock_interruptible() (signal during lock wait) or with -ENOMEM from dma_resv_reserve_fences()...
```diff diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h index 04fe15d877cd..7449907754a4 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -320,6 +320,7 @@ virtio_gpu_array_from_handles(struct drm_file *drm_file, u32 *handles, u32 ne...
245aba83e3c288e176ed037a1f6b618b09e92ed8
Analyze and fix the following issue in the Linux kernel code: USB: serial: mct_u232: fix missing interrupt-in transfer sanity check
Problem Details: Add the missing sanity check on the size of interrupt-in transfers to avoid parsing stale or uninitialised slab data (and leaking it to user space). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hov...
```diff diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c index ca1530da6e77..163161881d2d 100644 --- a/drivers/usb/serial/mct_u232.c +++ b/drivers/usb/serial/mct_u232.c @@ -544,6 +544,11 @@ static void mct_u232_read_int_callback(struct urb *urb) goto exit; } + if (urb->actual_length < 2...
915b36d701950503c4ea0f6e314b10868e59fce3
Analyze and fix the following issue in the Linux kernel code: USB: serial: mct_u232: fix memory corruption with small endpoint
Problem Details: The driver overrides the maximum transfer size for a specific device which only accepts 16 byte packets for its 32 byte bulk-out endpoint. Make sure to never increase the maximum transfer size to prevent slab corruption should a malicious device report a smaller endpoint max packet size than expected....
```diff diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c index 18844b92bd08..ca1530da6e77 100644 --- a/drivers/usb/serial/mct_u232.c +++ b/drivers/usb/serial/mct_u232.c @@ -378,6 +378,7 @@ static int mct_u232_port_probe(struct usb_serial_port *port) { struct usb_serial *serial = port->seria...
ab8336a7e414f018430aa1af3a46944032f7ff96
Analyze and fix the following issue in the Linux kernel code: USB: serial: keyspan: fix missing indat transfer sanity check
Problem Details: Add the missing sanity check on the size of usa49wg indat transfers to avoid parsing stale or uninitialised slab data. Fixes: 0ca1268e109a ("USB Serial Keyspan: add support for USA-49WG & USA-28XG") Cc: stable@vger.kernel.org # 2.6.23 Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed...
```diff diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c index 46448843541a..28b80607cebd 100644 --- a/drivers/usb/serial/keyspan.c +++ b/drivers/usb/serial/keyspan.c @@ -1187,6 +1187,10 @@ static void usa49wg_indat_callback(struct urb *urb) len = 0; while (i < urb->actual_length) { + if ...
cb3560e8eab1dfa1cac1ed52631adf8ec6ff2cd5
Analyze and fix the following issue in the Linux kernel code: USB: serial: digi_acceleport: fix memory corruption with small endpoints
Problem Details: Add the missing bulk-out buffer size sanity checks to avoid out-of-bounds memory accesses or slab corruption should a malicious device report smaller buffers than expected. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> ...
```diff diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c index d515df045c4c..c481208255eb 100644 --- a/drivers/usb/serial/digi_acceleport.c +++ b/drivers/usb/serial/digi_acceleport.c @@ -1229,15 +1229,34 @@ static int digi_port_init(struct usb_serial_port *port, unsigned port_num...
4ce058df2ee02cc2a0f0fd5cd64ce6f1482a0b65
Analyze and fix the following issue in the Linux kernel code: USB: serial: belkin_sa: validate interrupt status length
Problem Details: The Belkin interrupt callback treats interrupt data as a four-byte status report and reads LSR/MSR fields at offsets 2 and 3. The interrupt-in buffer length is derived from endpoint wMaxPacketSize, and short interrupt transfers may complete successfully with a smaller actual_length. Check the complete...
```diff diff --git a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c index 38ac910b1082..7bbd9523d4e9 100644 --- a/drivers/usb/serial/belkin_sa.c +++ b/drivers/usb/serial/belkin_sa.c @@ -194,6 +194,9 @@ static void belkin_sa_read_int_callback(struct urb *urb) usb_serial_debug_data(&port->dev, __func...
c2d1a2130c93f6d758af58590b86b2254c7a1dec
Analyze and fix the following issue in the Linux kernel code: media: vivid: check for vb2_is_busy() when toggling caps
Problem Details: The vivid_update_format_cap/out() functions must only be called if the capture/output queue are not busy. But for the controls that select the CROP/COMPOSE/SCALE capability that is not checked. Only when streaming starts will they be set to 'grabbed' and it is impossible to change the control, but bet...
```diff diff --git a/drivers/media/test-drivers/vivid/vivid-ctrls.c b/drivers/media/test-drivers/vivid/vivid-ctrls.c index 1077445f5772..a8a134b36720 100644 --- a/drivers/media/test-drivers/vivid/vivid-ctrls.c +++ b/drivers/media/test-drivers/vivid/vivid-ctrls.c @@ -613,14 +613,20 @@ static int vivid_vid_cap_s_ctrl(str...
1d793a29efb4260f90913f5287939bf95573b073
Analyze and fix the following issue in the Linux kernel code: media: vivid: add vivid_update_reduced_fps()
Problem Details: Don't call vivid_update_format_cap() when switching to/from reduced fps for HDMI inputs: that will also reset the format, which is overkill for this. Make a new vivid_update_reduced_fps() function that just updates the dev->timeperframe_vid_cap. Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabo...
```diff diff --git a/drivers/media/test-drivers/vivid/vivid-ctrls.c b/drivers/media/test-drivers/vivid/vivid-ctrls.c index f94c15ff84f7..1077445f5772 100644 --- a/drivers/media/test-drivers/vivid/vivid-ctrls.c +++ b/drivers/media/test-drivers/vivid/vivid-ctrls.c @@ -609,7 +609,8 @@ static int vivid_vid_cap_s_ctrl(struc...
9639a6875ea9926ab021484ee46c432a1df7c209
Analyze and fix the following issue in the Linux kernel code: ASoC: soc-dapm: move card->pop_time to soc-dapm.c
Problem Details: Card has pop_time which have used only from TI, and it is now stop using it. This pop_time is used for debug, and can be access from debugfs. Let's move it from Card to soc-dapm.c local. This patch renames it as asoc/${card}/pop_time to asoc/dapm_pop_time. This patch moves it from Card to soc-dapm.c, ...
```diff diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 4f8fb7622a13..f24eafefbdff 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h @@ -673,6 +673,7 @@ int snd_soc_dapm_mux_update_power(struct snd_soc_dapm_context *dapm, /* dapm sys fs - used by the core */ extern struct att...
614e627e0d0bf3de3819c098adde06cad633be2b
Analyze and fix the following issue in the Linux kernel code: media: i2c: imx274: trivial cleanup
Problem Details: Fix some typos, removed superfluous comments/code, some minor code alignment. Signed-off-by: Eugen Hristev <ehristev@kernel.org> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
```diff diff --git a/drivers/media/i2c/imx274.c b/drivers/media/i2c/imx274.c index 882dc2e9dd8f..76da647f9cf9 100644 --- a/drivers/media/i2c/imx274.c +++ b/drivers/media/i2c/imx274.c @@ -182,7 +182,7 @@ struct imx274_mode { }; /* - * imx274 test pattern related structure + * imx274 test pattern related enum */ e...
8ba166ff7c921da610376156d7c0a5fc985fa983
Analyze and fix the following issue in the Linux kernel code: media: synopsys: Fix IPI using hardcoded datatype
Problem Details: The imx93_csi2rx_dphy_ipi_enable() function configures the IPI datatype using csi2->formats->csi_dt, which is initialized during probe but never updated in set_fmt(). This causes the IPI to always use the probe-time default datatype, ignoring the actual media bus format negotiated at runtime. When user...
```diff diff --git a/drivers/media/platform/synopsys/dw-mipi-csi2rx.c b/drivers/media/platform/synopsys/dw-mipi-csi2rx.c index 02eb4a6cafad..0b80e84983f9 100644 --- a/drivers/media/platform/synopsys/dw-mipi-csi2rx.c +++ b/drivers/media/platform/synopsys/dw-mipi-csi2rx.c @@ -311,7 +311,7 @@ dw_mipi_csi2rx_find_format(st...
4f6f28ff24709710c08557c127b3e4c3fb1b4159
Analyze and fix the following issue in the Linux kernel code: media: i2c: alvium: fix critical pointer access in alvium_ctrl_init
Problem Details: The current implementation of alvium_ctrl_init creates several controls in function alvium_ctrl_init and uses the returned pointer without check. That can cause write access over NULL-pointer for several controls. The reworked code checks the pointers before adding flags. Fixes: 0a7af872915e ("media: ...
```diff diff --git a/drivers/media/i2c/alvium-csi2.c b/drivers/media/i2c/alvium-csi2.c index 955b7072a560..dd991c2ee700 100644 --- a/drivers/media/i2c/alvium-csi2.c +++ b/drivers/media/i2c/alvium-csi2.c @@ -2100,20 +2100,21 @@ static int alvium_ctrl_init(struct alvium_dev *alvium) V4L2_CID_PIXEL_RATE, 0, ...
60a1969fae6209644698fca91c185d153674f631
Analyze and fix the following issue in the Linux kernel code: ALSA: seq: Serialize UMP output teardown with event_input
Problem Details: seq_ump_process_event() borrows client->out_rfile.output without synchronizing with the first-open and last-close transition in seq_ump_client_open() and seq_ump_client_close(). The last output unuse can therefore drop opened[STR_OUT] to zero and release the rawmidi file while an in-flight event_input...
```diff diff --git a/sound/core/seq/seq_ump_client.c b/sound/core/seq/seq_ump_client.c index 9079ccfdc866..ccd93599b493 100644 --- a/sound/core/seq/seq_ump_client.c +++ b/sound/core/seq/seq_ump_client.c @@ -37,6 +37,7 @@ struct seq_ump_client { struct snd_ump_endpoint *ump; /* assigned endpoint */ int seq_client; ...
11f94f5b1d3001314fb0f7d1739c74482fbba960
Analyze and fix the following issue in the Linux kernel code: media: atomisp: use kmalloc_objs for array allocations
Problem Details: Convert manual kmalloc() multiplications to the modern kmalloc_objs() interface to improve type safety and prevent potential integer overflows. Signed-off-by: Pedro Pontes <pontescpedro@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
```diff diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c index c136c1745eb9..00082276f1db 100644 --- a/drivers/staging/media/atomisp/pci/sh_css.c +++ b/drivers/staging/media/atomisp/pci/sh_css.c @@ -5819,36 +5819,37 @@ static int ia_css_pipe_create_cas_scaler_desc_sin...
85354d984208ed64eb35cecbd8b4d84f390dd352
Analyze and fix the following issue in the Linux kernel code: staging: media: atomisp: Fix block comment style in ov2722.h
Problem Details: Fix coding style warnings reported by checkpatch.pl. Move the comments above the corresponding code lines to align with guideline. Signed-off-by: Taekyung Oh <ohxorud@ohxorud.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
```diff diff --git a/drivers/staging/media/atomisp/i2c/ov2722.h b/drivers/staging/media/atomisp/i2c/ov2722.h index 00317d105305..b67c26dcae79 100644 --- a/drivers/staging/media/atomisp/i2c/ov2722.h +++ b/drivers/staging/media/atomisp/i2c/ov2722.h @@ -566,8 +566,8 @@ static const struct ov2722_reg ov2722_VGA_30fps[] = {...
12ea58282087b9df896fd0a43a92fa83e56b33c9
Analyze and fix the following issue in the Linux kernel code: staging: media: atomisp: fix map and vmap leaks in stat buffer allocation
Problem Details: There are memory leaks in drivers/staging/media/atomisp/pci/atomisp_compat_css20.c. In atomisp_css_allocate_stat_buffers(), s3a_map is allocated by ia_css_isp_3a_statistics_map_allocate() and its backing memory is mapped via hmm_vmap(). When dis_buf allocation fails, the error path frees s3a_data but ...
```diff diff --git a/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c b/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c index d2bacd1ffe7b..0ee52637ea30 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c +++ b/drivers/staging/media/atomisp/pci/atomisp_compat_css20.c @@ -1117,8 +1117,...
63c9b7def874b28471c5c75151cb43e8f10a9fa2
Analyze and fix the following issue in the Linux kernel code: media: atomisp: style fix for trailing statements
Problem Details: Fix checkpatch errors "ERROR: trailing statements should be on next line" in drivers/staging/media/atomisp/pci/sh_css_params.c. Signed-off-by: Timo Röhling <roehling@debian.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> ...
```diff diff --git a/drivers/staging/media/atomisp/pci/sh_css_params.c b/drivers/staging/media/atomisp/pci/sh_css_params.c index 1c8af03db1c7..8420a22fd8f0 100644 --- a/drivers/staging/media/atomisp/pci/sh_css_params.c +++ b/drivers/staging/media/atomisp/pci/sh_css_params.c @@ -872,7 +872,8 @@ ia_css_process_kernel(str...
9862d3f9de6b5e70d2ff87377beece44ec4e4e45
Analyze and fix the following issue in the Linux kernel code: staging: media: atomisp: fix indentation in bh host files
Problem Details: Fix inconsistent tab/space usage and bring function definitions into a single-line format, matching kernel coding style. Signed-off-by: LiangCheng Wang <zaq14760@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
```diff diff --git a/drivers/staging/media/atomisp/pci/isp/kernels/bh/bh_2/ia_css_bh.host.c b/drivers/staging/media/atomisp/pci/isp/kernels/bh/bh_2/ia_css_bh.host.c index 69c87e53f3c2..b87eb1a21b21 100644 --- a/drivers/staging/media/atomisp/pci/isp/kernels/bh/bh_2/ia_css_bh.host.c +++ b/drivers/staging/media/atomisp/pc...
15b4210a063877ddaa7f410069f86573bc0f5152
Analyze and fix the following issue in the Linux kernel code: staging: media: atomisp: fix indentation in anr files
Problem Details: Fix inconsistent tab/space usage and bring function definitions into a single-line format, matching kernel coding style. Signed-off-by: LiangCheng Wang <zaq14760@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
```diff diff --git a/drivers/staging/media/atomisp/pci/isp/kernels/anr/anr_1.0/ia_css_anr.host.c b/drivers/staging/media/atomisp/pci/isp/kernels/anr/anr_1.0/ia_css_anr.host.c index 899d566234b9..49c22a68ec55 100644 --- a/drivers/staging/media/atomisp/pci/isp/kernels/anr/anr_1.0/ia_css_anr.host.c +++ b/drivers/staging/m...
2bc7dd2b1fcc2a1f65db8967af60327ca8ec4f45
Analyze and fix the following issue in the Linux kernel code: staging: media: atomisp: Remove return from end of void function in gdc.c
Problem Details: Fix checkpatch.pl warning on useless return on the end of the void function. Signed-off-by: Adrian Barnaś <abarnas@google.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
```diff diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/gdc.c b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/gdc.c index a06d69353939..b31e3809c0e4 100644 --- a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/gdc.c +++ b/drivers/staging/media/atomisp/pci/hive_isp_css_com...
3322fc4dcaf1fe6b6fe68b976f6d93c2b87ea169
Analyze and fix the following issue in the Linux kernel code: staging: media: atomisp: Whitespaces style cleanup in gdc.c
Problem Details: Clean up coding style whitespace issues in drivers/staging/media/atomisp/pci/hive_isp_css_common/host/gdc.c. Fixes include: - removal of unnecessary line breaks - correcting spacing around operators - correcting spaces between types and names Signed-off-by: Adrian Barnaś <abarnas@google.com> Signe...
```diff diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/gdc.c b/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/gdc.c index 8bb78b4d7c67..a06d69353939 100644 --- a/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/gdc.c +++ b/drivers/staging/media/atomisp/pci/hive_isp_css_com...
d178c7ca8fefc28115d35b94c3b1f4d653e34182
Analyze and fix the following issue in the Linux kernel code: staging: media: atomisp: use array3_size() for overflow-safe allocation
Problem Details: Replace open-coded width * height * sizeof() multiplications with array3_size() to prevent integer overflow in buffer allocations. The atomisp driver computes DVS, morphing table, shading table and statistics buffer sizes using unchecked arithmetic. When dimensions are attacker-controlled or simply l...
```diff diff --git a/drivers/staging/media/atomisp/pci/sh_css_param_dvs.c b/drivers/staging/media/atomisp/pci/sh_css_param_dvs.c index 3d2cb2d25fdb..ad2a9b84e232 100644 --- a/drivers/staging/media/atomisp/pci/sh_css_param_dvs.c +++ b/drivers/staging/media/atomisp/pci/sh_css_param_dvs.c @@ -4,6 +4,7 @@ * Copyright (c)...
7222dc8751e0c1a179acd6f8a2c664a7f16081b1
Analyze and fix the following issue in the Linux kernel code: staging: media: atomisp: use __func__ in debug message in atomisp_cmd.c
Problem Details: Replace hardcoded function name string with __func__ macro in dev_dbg call as recommended by kernel coding style. Signed-off-by: Oskar Ray-Frayssinet <rayfraytech@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
```diff diff --git a/drivers/staging/media/atomisp/pci/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp_cmd.c index 6174177eb869..6cd500d9fd26 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_cmd.c +++ b/drivers/staging/media/atomisp/pci/atomisp_cmd.c @@ -4011,7 +4011,7 @@ static int css_input_resolution...
4d542f256cf2ff23a4a2c5411cbdf9af0191b8ca
Analyze and fix the following issue in the Linux kernel code: staging: media: atomisp: use kmalloc_array() for sh_css_blob_info
Problem Details: Replace the open-coded multiplication in kmalloc() with kmalloc_array() to provide overflow protection and improve code readability. Signed-off-by: Lin YuChen <starpt.official@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
```diff diff --git a/drivers/staging/media/atomisp/pci/sh_css_firmware.c b/drivers/staging/media/atomisp/pci/sh_css_firmware.c index 57ecf5549c23..af12df2f9b09 100644 --- a/drivers/staging/media/atomisp/pci/sh_css_firmware.c +++ b/drivers/staging/media/atomisp/pci/sh_css_firmware.c @@ -253,9 +253,9 @@ sh_css_load_firmw...
f4d51e55dd47ef467fbe37d8575e20eee41b092d
Analyze and fix the following issue in the Linux kernel code: staging: media: atomisp: reduce load_primary_binaries() stack usage
Problem Details: The load_primary_binaries() function is overly complex and has som large variables on the stack, which can cause warnings depending on CONFIG_FRAME_WARN setting: drivers/staging/media/atomisp/pci/sh_css.c: In function 'load_primary_binaries': drivers/staging/media/atomisp/pci/sh_css.c:5260:1: error: t...
```diff diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c index c6838772553d..792379407828 100644 --- a/drivers/staging/media/atomisp/pci/sh_css.c +++ b/drivers/staging/media/atomisp/pci/sh_css.c @@ -5019,7 +5019,6 @@ static int load_primary_binaries( struct ia_css_c...
4baf44b4051940ba1abc68ef5136d25cb1806521
Analyze and fix the following issue in the Linux kernel code: platform/x86: classmate-laptop: Address memory leaks on driver removal
Problem Details: Switch over cmpc_accel_add_v4() and cmpc_accel_add() to using devm_kzalloc() for allocating the accel object which will cause it to be freed automatically on device removal, so it won't be leaked any more. This also simplifies the rollback paths in these functions somewhat. Fixes: 529aa8cb0a59 ("clas...
```diff diff --git a/drivers/platform/x86/classmate-laptop.c b/drivers/platform/x86/classmate-laptop.c index e6eed3d65580..a5fe34211afb 100644 --- a/drivers/platform/x86/classmate-laptop.c +++ b/drivers/platform/x86/classmate-laptop.c @@ -400,7 +400,7 @@ static int cmpc_accel_add_v4(struct acpi_device *acpi) struct i...
a4173887605121f61a5222911b11ac598336618e
Analyze and fix the following issue in the Linux kernel code: docs: fix typo in uniwill-laptop.rst
Problem Details: Replace "benifit" with "benefit". Signed-off-by: Sakurai Shun <ssh1326@icloud.com> Reviewed-by: Armin Wolf <W_Armin@gmx.de> Link: https://patch.msgid.link/20260517024148.9642-1-ssh1326@icloud.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@lin...
```diff diff --git a/Documentation/wmi/devices/uniwill-laptop.rst b/Documentation/wmi/devices/uniwill-laptop.rst index e246bf293450..65583b239706 100644 --- a/Documentation/wmi/devices/uniwill-laptop.rst +++ b/Documentation/wmi/devices/uniwill-laptop.rst @@ -189,7 +189,7 @@ Indexed IO Indexed IO with IO ports with a...
53a8f95cbb407608ef77a864ad4a59f25ddd906c
Analyze and fix the following issue in the Linux kernel code: platform/x86: wireless-hotkey: Check ACPI_COMPANION() against NULL
Problem Details: Every platform driver can be forced to match a device that doesn't match its list of device IDs because of device_match_driver_override(), so platform drivers that rely on the existence of a device's ACPI companion object need to verify its presence. Accordingly, add a requisite ACPI_COMPANION() check...
```diff diff --git a/drivers/platform/x86/wireless-hotkey.c b/drivers/platform/x86/wireless-hotkey.c index f680d8ff8e87..3151844d1699 100644 --- a/drivers/platform/x86/wireless-hotkey.c +++ b/drivers/platform/x86/wireless-hotkey.c @@ -89,9 +89,14 @@ static void wl_notify(acpi_handle handle, u32 event, void *data) st...
4840f8bb3e9aad183e707950f24f829fd220eb07
Analyze and fix the following issue in the Linux kernel code: platform/x86: toshiba_haps: Check ACPI_COMPANION() against NULL
Problem Details: Every platform driver can be forced to match a device that doesn't match its list of device IDs because of device_match_driver_override(), so platform drivers that rely on the existence of a device's ACPI companion object need to verify its presence. Accordingly, add a requisite ACPI_COMPANION() check...
```diff diff --git a/drivers/platform/x86/toshiba_haps.c b/drivers/platform/x86/toshiba_haps.c index 1486252b5983..8d12241924df 100644 --- a/drivers/platform/x86/toshiba_haps.c +++ b/drivers/platform/x86/toshiba_haps.c @@ -182,13 +182,17 @@ static int toshiba_haps_available(acpi_handle handle) static int toshiba_hap...
48b06fffb16901237dc0acbb0474a54b3cc5730f
Analyze and fix the following issue in the Linux kernel code: platform/x86: toshiba_bluetooth: Check ACPI_COMPANION() against NULL
Problem Details: Every platform driver can be forced to match a device that doesn't match its list of device IDs because of device_match_driver_override(), so platform drivers that rely on the existence of a device's ACPI companion object need to verify its presence. Accordingly, add a requisite ACPI_COMPANION() check...
```diff diff --git a/drivers/platform/x86/toshiba_bluetooth.c b/drivers/platform/x86/toshiba_bluetooth.c index e50d4fc1e603..e00abba58c7c 100644 --- a/drivers/platform/x86/toshiba_bluetooth.c +++ b/drivers/platform/x86/toshiba_bluetooth.c @@ -230,10 +230,14 @@ static int toshiba_bt_resume(struct device *dev) static ...
0978824a64f160f1d2e8dc821a522ad91e7b4215
Analyze and fix the following issue in the Linux kernel code: platform/x86: toshiba_acpi: Check ACPI_COMPANION() against NULL
Problem Details: Every platform driver can be forced to match a device that doesn't match its list of device IDs because of device_match_driver_override(), so platform drivers that rely on the existence of a device's ACPI companion object need to verify its presence. Accordingly, add a requisite ACPI_COMPANION() check...
```diff diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index 35d899c01740..7cecb3a70b9c 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c @@ -3374,7 +3374,7 @@ static const struct dmi_system_id toshiba_dmi_quirks[] __initconst = { stati...
840bcd6bd5bcbc807b679e367ae7a148a1f07370
Analyze and fix the following issue in the Linux kernel code: platform/x86: system76: Check ACPI_COMPANION() against NULL
Problem Details: Every platform driver can be forced to match a device that doesn't match its list of device IDs because of device_match_driver_override(), so platform drivers that rely on the existence of a device's ACPI companion object need to verify its presence. Accordingly, add a requisite ACPI_COMPANION() check...
```diff diff --git a/drivers/platform/x86/system76_acpi.c b/drivers/platform/x86/system76_acpi.c index 693cbb461382..dd7b1b07c316 100644 --- a/drivers/platform/x86/system76_acpi.c +++ b/drivers/platform/x86/system76_acpi.c @@ -674,10 +674,14 @@ static void system76_notify(acpi_handle handle, u32 event, void *context) ...
f2ec69363fb52fbb2010e5edbec2b8ca0951aadf
Analyze and fix the following issue in the Linux kernel code: platform/x86: sony-laptop: Check ACPI_COMPANION() against NULL
Problem Details: Every platform driver can be forced to match a device that doesn't match its list of device IDs because of device_match_driver_override(), so platform drivers that rely on the existence of a device's ACPI companion object need to verify its presence. Accordingly, add requisite ACPI_COMPANION() checks ...
```diff diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index b18f00e9082f..67370967df6f 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c @@ -3147,11 +3147,15 @@ static void sony_nc_backlight_cleanup(void) static int sony_nc_probe(struct pl...
f15b0a3043f193677903be52d7dbef3d5c8df282
Analyze and fix the following issue in the Linux kernel code: platform/x86: panasonic-laptop: Check ACPI_COMPANION() against NULL
Problem Details: Every platform driver can be forced to match a device that doesn't match its list of device IDs because of device_match_driver_override(), so platform drivers that rely on the existence of a device's ACPI companion object need to verify its presence. Accordingly, add a requisite ACPI_COMPANION() check...
```diff diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c index 1337f7c49805..b83113c26f88 100644 --- a/drivers/platform/x86/panasonic-laptop.c +++ b/drivers/platform/x86/panasonic-laptop.c @@ -981,11 +981,15 @@ static int acpi_pcc_hotkey_resume(struct device *dev) static...
7e169326c2263ebc4878baae536c956fa3118eff
Analyze and fix the following issue in the Linux kernel code: platform/x86: lg-laptop: Check ACPI_COMPANION() against NULL
Problem Details: Every platform driver can be forced to match a device that doesn't match its list of device IDs because of device_match_driver_override(), so platform drivers that rely on the existence of a device's ACPI companion object need to verify its presence. Accordingly, add a requisite ACPI_COMPANION() check...
```diff diff --git a/drivers/platform/x86/lg-laptop.c b/drivers/platform/x86/lg-laptop.c index 9681412d694b..a8f2f465ef3f 100644 --- a/drivers/platform/x86/lg-laptop.c +++ b/drivers/platform/x86/lg-laptop.c @@ -761,12 +761,11 @@ static void lg_laptop_remove_address_space_handler(void *data) static int acpi_probe(str...
922952f2bbcfe21375973d0ea0e662a1a4837b10
Analyze and fix the following issue in the Linux kernel code: platform/x86: intel/smartconnect: Check ACPI_HANDLE() against NULL
Problem Details: Every platform driver can be forced to match a device that doesn't match its list of device IDs because of device_match_driver_override(), so platform drivers that rely on the existence of a device's ACPI companion object need to verify its presence. Accordingly, add a requisite ACPI_HANDLE() check ag...
```diff diff --git a/drivers/platform/x86/intel/smartconnect.c b/drivers/platform/x86/intel/smartconnect.c index 4d866b6366d6..71e91ac60e5d 100644 --- a/drivers/platform/x86/intel/smartconnect.c +++ b/drivers/platform/x86/intel/smartconnect.c @@ -12,10 +12,14 @@ MODULE_LICENSE("GPL"); static int smartconnect_acpi_pr...
51e91ad0a0ccb0906306c653f9e8b97a180d8608
Analyze and fix the following issue in the Linux kernel code: platform/x86: intel/rst: Check ACPI_COMPANION() against NULL
Problem Details: Every platform driver can be forced to match a device that doesn't match its list of device IDs because of device_match_driver_override(), so platform drivers that rely on the existence of a device's ACPI companion object need to verify its presence. Accordingly, add a requisite ACPI_COMPANION() check...
```diff diff --git a/drivers/platform/x86/intel/rst.c b/drivers/platform/x86/intel/rst.c index 4bd10927aad9..bb19f0d89305 100644 --- a/drivers/platform/x86/intel/rst.c +++ b/drivers/platform/x86/intel/rst.c @@ -102,9 +102,13 @@ static struct device_attribute irst_timeout_attr = { static int irst_probe(struct platfor...
ab743c6d7b118235f6d48a513a6560afbc5e615a
Analyze and fix the following issue in the Linux kernel code: platform/x86: fujitsu-tablet: Check ACPI_COMPANION() against NULL
Problem Details: Every platform driver can be forced to match a device that doesn't match its list of device IDs because of device_match_driver_override(), so platform drivers that rely on the existence of a device's ACPI companion object need to verify its presence. Accordingly, add requisite ACPI_COMPANION() checks ...
```diff diff --git a/drivers/platform/x86/fujitsu-tablet.c b/drivers/platform/x86/fujitsu-tablet.c index 8319df28e9b8..2f8c1b89cbca 100644 --- a/drivers/platform/x86/fujitsu-tablet.c +++ b/drivers/platform/x86/fujitsu-tablet.c @@ -445,10 +445,14 @@ static acpi_status fujitsu_walk_resources(struct acpi_resource *res, vo...
e99829a15989d58ffe1ee3e283e0a5eb8e41ee8b
Analyze and fix the following issue in the Linux kernel code: platform/x86: fujitsu: Check ACPI_COMPANION() against NULL
Problem Details: Every platform driver can be forced to match a device that doesn't match its list of device IDs because of device_match_driver_override(), so platform drivers that rely on the existence of a device's ACPI companion object need to verify its presence. Accordingly, add requisite ACPI_COMPANION() checks ...
```diff diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c index 2e265be2267e..54d0b9cec4d3 100644 --- a/drivers/platform/x86/fujitsu-laptop.c +++ b/drivers/platform/x86/fujitsu-laptop.c @@ -530,10 +530,14 @@ static void acpi_fujitsu_bl_notify(acpi_handle handle, u32 event, void ...
814830394764cef79c506629edd55f072e0207d1
Analyze and fix the following issue in the Linux kernel code: platform/x86: eeepc-laptop: Check ACPI_COMPANION() against NULL
Problem Details: Every platform driver can be forced to match a device that doesn't match its list of device IDs because of device_match_driver_override(), so platform drivers that rely on the existence of a device's ACPI companion object need to verify its presence. Accordingly, add a requisite ACPI_COMPANION() check...
```diff diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 02a71095920e..d18a80907611 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c @@ -1363,10 +1363,14 @@ static bool eeepc_device_present; static int eeepc_acpi_probe(struct platf...
8a17c62b02fc4baa02300b57a2ad882c7a06a984
Analyze and fix the following issue in the Linux kernel code: platform/x86: dell/dell-rbtn: Check ACPI_COMPANION() against NULL
Problem Details: Every platform driver can be forced to match a device that doesn't match its list of device IDs because of device_match_driver_override(), so platform drivers that rely on the existence of a device's ACPI companion object need to verify its presence. Accordingly, add a requisite ACPI_COMPANION() check...
```diff diff --git a/drivers/platform/x86/dell/dell-rbtn.c b/drivers/platform/x86/dell/dell-rbtn.c index 34af9f4ff741..180b8c6720e6 100644 --- a/drivers/platform/x86/dell/dell-rbtn.c +++ b/drivers/platform/x86/dell/dell-rbtn.c @@ -396,11 +396,15 @@ static void rbtn_cleanup(struct device *dev) static int rbtn_probe(s...
08f29dc34d1cf39696d04bc1ff31538dc2d74c72
Analyze and fix the following issue in the Linux kernel code: platform/x86: asus-laptop: Check ACPI_COMPANION() against NULL
Problem Details: Every platform driver can be forced to match a device that doesn't match its list of device IDs because of device_match_driver_override(), so platform drivers that rely on the existence of a device's ACPI companion object need to verify its presence. Accordingly, add a requisite ACPI_COMPANION() check...
```diff diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c index dbbb6292cd11..140ac8a10537 100644 --- a/drivers/platform/x86/asus-laptop.c +++ b/drivers/platform/x86/asus-laptop.c @@ -1826,10 +1826,14 @@ static bool asus_device_present; static int asus_acpi_probe(struct platform_de...
dc334b9bf9d28070f7a3e413fead759abdce19ba
Analyze and fix the following issue in the Linux kernel code: platform/x86: acer-wireless: Check ACPI_COMPANION() against NULL
Problem Details: Every platform driver can be forced to match a device that doesn't match its list of device IDs because of device_match_driver_override(), so platform drivers that rely on the existence of a device's ACPI companion object need to verify its presence. Accordingly, add a requisite ACPI_COMPANION() check...
```diff diff --git a/drivers/platform/x86/acer-wireless.c b/drivers/platform/x86/acer-wireless.c index f464b13a58af..fae8e5ad0f97 100644 --- a/drivers/platform/x86/acer-wireless.c +++ b/drivers/platform/x86/acer-wireless.c @@ -37,9 +37,14 @@ static void acer_wireless_notify(acpi_handle handle, u32 event, void *data) ...
11a0111ea1b429db1a05d09db26ade421e370b73
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211_hwsim: Do not declare NAN support for Extended Key ID
Problem Details: Do not declare support for Extended Key ID for NAN, as defined in section 7.4 in the WiFi Aware specification v4.0 (in order to support security association upgrade). Fixes: eaa7ce66c3e2 ("wifi: mac80211_hwsim: Fix possible NULL dereference") Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-b...
```diff diff --git a/drivers/net/wireless/virtual/mac80211_hwsim_main.c b/drivers/net/wireless/virtual/mac80211_hwsim_main.c index 8d4de9d282b0..67a33e5e7d54 100644 --- a/drivers/net/wireless/virtual/mac80211_hwsim_main.c +++ b/drivers/net/wireless/virtual/mac80211_hwsim_main.c @@ -5735,8 +5735,6 @@ static int mac80211...
7a8a3ff2815501f78f494808355ddf37e08647d0
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: don't call ieee80211_handle_reconfig_failure when not needed
Problem Details: In case reconfiguration of NAN fails, we call ieee80211_handle_reconfig_failure, that marks all interfaces as not in the driver. Then, at the error path of the reconfig, cfg80211_shutdown_all_interfaces is called to destroy all the interfaces. If we have any other interface but the NAN one, for exampl...
```diff diff --git a/net/mac80211/util.c b/net/mac80211/util.c index c3861e414804..255905f971c8 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -2203,11 +2203,7 @@ int ieee80211_reconfig(struct ieee80211_local *local) } break; case NL80211_IFTYPE_NAN: - res = ieee80211_reconfig_nan(sdata); - ...
0bdfb1a4697f94661b96b87893eddb56a5a102a5
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211_hwsim: reject NAN on multi-radio wiphys
Problem Details: When userspace creates a new hwsim radio with both HWSIM_ATTR_MULTI_RADIO and HWSIM_ATTR_SUPPORT_NAN_DEVICE, hwsim_new_radio_nl() sets BIT(NL80211_IFTYPE_NAN_DATA) in wiphy->interface_modes while configuring the wiphy with n_radio > 1. This violates the invariant checked in wiphy_register(): (inte...
```diff diff --git a/drivers/net/wireless/virtual/mac80211_hwsim_main.c b/drivers/net/wireless/virtual/mac80211_hwsim_main.c index dc9775cd9f54..ec90da265b9e 100644 --- a/drivers/net/wireless/virtual/mac80211_hwsim_main.c +++ b/drivers/net/wireless/virtual/mac80211_hwsim_main.c @@ -6766,9 +6766,15 @@ static int hwsim_n...
928e0abdad0d9d8bb78673350152459bda053ee8
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: don't recalc min def for S1G chan ctx
Problem Details: __ieee80211_recalc_chanctx_min_def() currently does not attempt to find the min def for S1G widths, meaning the BW will never change. However, the following call into ieee80211_chan_bw_change() will lead to a WARN within ieee80211_chan_width_to_rx_bw(). Not only that, this entire path is geared towards...
```diff diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c index b9d563f927da..c64a99131954 100644 --- a/net/mac80211/chan.c +++ b/net/mac80211/chan.c @@ -751,8 +751,14 @@ _ieee80211_recalc_chanctx_min_def(struct ieee80211_local *local, struct ieee80211_link_data *rsvd_for, bool check_reserved) { - u...
3c18c2e545b3bf38fc364afb06619c7ae8a4168b
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: skip NSS and BW init for S1G sta
Problem Details: Currently there is no S1G STA bandwidth support throughout mac80211 as existing support is all based on 20MHz widths. With the recent STA NSS/BW handling rework, S1G associations now hit the new WARN within ieee80211_chan_width_to_rx_bw() as the chandef is not a 20MHz based width. For now, skip initial...
```diff diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index aba2fabfe0db..0ea37016cd4f 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -3516,6 +3516,23 @@ static u8 ieee80211_sta_nss_capability(struct link_sta_info *link_sta) void ieee80211_sta_init_nss_bw_capa(struct link_sta_in...
ae6691b8c1fde1a21579386664fa971c76504f2b
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: check stations are removed before MLD change
Problem Details: If an interface changes to/from MLD, then all stations related to it must have been removed first. This is just natural since we go from having links to not (or vice versa), but not doing so also causes crashes in debugfs since vif changing to/from MLD removes the entire debugfs for the vif, including ...
```diff diff --git a/net/mac80211/link.c b/net/mac80211/link.c index 93e290dd783f..e81dd02de12e 100644 --- a/net/mac80211/link.c +++ b/net/mac80211/link.c @@ -2,7 +2,7 @@ /* * MLO link handling * - * Copyright (C) 2022-2025 Intel Corporation + * Copyright (C) 2022-2026 Intel Corporation */ #include <linux/slab....
e24f3c0df48378214d9a67c5048d0faca144b163
Analyze and fix the following issue in the Linux kernel code: thunderbolt: Increase Notification Timeout to 255 ms for USB4 routers
Problem Details: Currently we set the Notification Timeout field in ROUTER_CS_4 for USB4 routers to 10 ms, which is unnecessarily short and may cause unnecessary retransmissions of Hot Plug packets by the router in case of slow software response. Increase the timeout to 255 ms, aligning with Thunderbolt 3 routers and p...
```diff diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index f421997c298d..d7c53eb3221b 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -1767,8 +1767,6 @@ int tb_switch_wait_for_bit(struct tb_switch *sw, u32 offset, u32 bit, /* * tb_plug_events_active() - ena...
ba2cc385110129d03cd0f18a1b5969a430b67a18
Analyze and fix the following issue in the Linux kernel code: thunderbolt: Increase timeout for Configuration Ready bit
Problem Details: After setting the Configuration Valid bit (ROUTER_CS_5.CV), the USB4 Connection Manager guide specifies a 500 ms timeout for the router to set the Configuration Ready bit (ROUTER_CS_6.CR). The current timeout is shorter than specified. While there, fix the kernel-doc typo. Increase the timeout to matc...
```diff diff --git a/drivers/thunderbolt/usb4.c b/drivers/thunderbolt/usb4.c index 54f4f5fa3c5a..5fd4fe070f25 100644 --- a/drivers/thunderbolt/usb4.c +++ b/drivers/thunderbolt/usb4.c @@ -309,7 +309,7 @@ int usb4_switch_setup(struct tb_switch *sw) * Sets configuration valid bit for the router. Must be called before ...
b69af182b55665f5b0ccca8ed1ed239758671354
Analyze and fix the following issue in the Linux kernel code: thunderbolt: Activate path hops from source to destination
Problem Details: Currently, path activation starts from the last hop (destination adapter) and iterates backwards to the first hop (source adapter). This does not follow the order suggested in the USB4 Connection Manager guide and could potentially cause issues with tunnelled protocols. Reverse the activation order to...
```diff diff --git a/drivers/thunderbolt/path.c b/drivers/thunderbolt/path.c index 0092b2ec7873..b2c322e76b8a 100644 --- a/drivers/thunderbolt/path.c +++ b/drivers/thunderbolt/path.c @@ -484,7 +484,7 @@ void tb_path_deactivate(struct tb_path *path) * tb_path_activate() - activate a path * @path: Path to activate ...
0ab47718345dc58a6e2ff4c1c23a9026a2cf1310
Analyze and fix the following issue in the Linux kernel code: thunderbolt: Fix lane bonding log when bonding not possible
Problem Details: Currently if lane bonding is not possible or not supported, we continue and read the updated number of Total Buffers from lane adapters unnecessarily and incorrectly log the bonding as successful. Fix this by bailing out early when bonding is not possible, avoiding the unnecessary read and the mislead...
```diff diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index ad0ec8f8ee28..f421997c298d 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -2977,14 +2977,14 @@ static int tb_switch_lane_bonding_enable(struct tb_switch *sw) int ret; if (!tb_switch_lane_bonding...
dc14686f27df6454b13b16ad1c9203ab3e9b0375
Analyze and fix the following issue in the Linux kernel code: wifi: cfg80211: wext: validate chandef in monitor mode
Problem Details: cfg80211_wext_siwfreq() constructs a channel definition for monitor mode but passes it to cfg80211_set_monitor_channel() without first validating it with cfg80211_chandef_valid(). This causes a WARN_ON in cfg80211_chandef_dfs_required() when it receives an invalid chandef. Add the missing cfg80211_cha...
```diff diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c index 22d9d9bae8f5..63d145b524c9 100644 --- a/net/wireless/wext-compat.c +++ b/net/wireless/wext-compat.c @@ -789,6 +789,8 @@ static int cfg80211_wext_siwfreq(struct net_device *dev, chandef.chan = ieee80211_get_channel(&rdev->wiphy, freq);...
a6e6ccd5bd07155c2add6c74ce1a5e68ad3b95ea
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: consume only present negotiated TTLM maps
Problem Details: ieee80211_tid_to_link_map_size_ok() validates negotiated TTLM elements against the number of link-map entries indicated by link_map_presence. ieee80211_parse_neg_ttlm() must consume the same layout. The parser advanced its cursor for every TID, including TIDs whose presence bit is clear and therefore ...
```diff diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index ca1d29daf019..b98ddfa3003e 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -8164,6 +8164,7 @@ ieee80211_parse_neg_ttlm(struct ieee80211_sub_if_data *sdata, "No active links for TID %d", tid); return -EINVAL; } + pos += ...
dd7b6a8671939708cc4b7a46786d8c11297e8f69
Analyze and fix the following issue in the Linux kernel code: wifi: wilc1000: fix dma_buffer leak on bus acquire failure
Problem Details: wilc_wlan_firmware_download() allocates dma_buffer with kmalloc() at the top of the function and uses a 'fail:' label to free it via kfree(dma_buffer) on error. All later error paths correctly use 'goto fail' to route through this cleanup. However, the early failure path after the first acquire_bus() ...
```diff diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.c b/drivers/net/wireless/microchip/wilc1000/wlan.c index 3fa8592eb250..4b116fe6f9ea 100644 --- a/drivers/net/wireless/microchip/wilc1000/wlan.c +++ b/drivers/net/wireless/microchip/wilc1000/wlan.c @@ -1265,7 +1265,7 @@ int wilc_wlan_firmware_download(str...
d71c841be5d9e586ee7f36c0dc8ed4db0d9a1349
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: capture fast-RX rate before mesh reuses skb->cb
Problem Details: ieee80211_invoke_fast_rx() reads RX status through IEEE80211_SKB_RXCB(skb), which aliases the same skb->cb storage that ieee80211_rx_mesh_data() reuses as IEEE80211_TX_INFO. In the unicast forward path, mesh_data does: info = IEEE80211_SKB_CB(fwd_skb); memset(info, 0, sizeof(*info)); on the same s...
```diff diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index d18e962126ce..3fb40449c6c5 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -4984,6 +4984,7 @@ static bool ieee80211_invoke_fast_rx(struct ieee80211_rx_data *rx, u8 sa[ETH_ALEN]; } addrs __aligned(2); struct ieee80211_sta_rx_stats *stats; ...
fe2d61a5d2849ee75dd4deeb2fe35f78d80721f8
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: fix multi-link element inheritance
Problem Details: When parsing a beacon, mac80211 erroneously inherits any reconfiguration or EPCS multi-link elements from the outer elements into the multi-BSSID profile that's requested, if connected to a non-transmitted BSS, unless that profile has a non-inheritance element. This also happens if parsing a multi-BSS...
```diff diff --git a/net/mac80211/parse.c b/net/mac80211/parse.c index 666cdd5fd0ea..77894d997113 100644 --- a/net/mac80211/parse.c +++ b/net/mac80211/parse.c @@ -34,6 +34,15 @@ #include "led.h" #include "wep.h" +static const u8 empty_non_inheritance[] = { + WLAN_EID_EXTENSION, 1, WLAN_EID_EXT_NON_INHERITANCE, + /*...
a74e893f30db64cdce0fc7a96d3baa417bcd55f5
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: fix MLE defragmentation
Problem Details: If either reconf or EPCS multi-link element (MLE) is contained in a non-transmitted profile, the defragmentation routine is called with a pointer to the defragmented copy, but the original elements. This is incorrect for two reasons: - if the original defragmentation was needed, it will not find the ...
```diff diff --git a/net/mac80211/parse.c b/net/mac80211/parse.c index 2b3632c6008a..666cdd5fd0ea 100644 --- a/net/mac80211/parse.c +++ b/net/mac80211/parse.c @@ -34,6 +34,13 @@ #include "led.h" #include "wep.h" +struct ieee80211_elem_defrag { + const struct element *elem; + /* container start/len */ + const u8 *st...
e1e83feb8eae82cc9cc676db4c70f52fedc4735d
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: don't override max_amsdu_subframes
Problem Details: In client mode, the extended capabilities are handled by the kernel looking at the association frame. When the supplicant installs the keys it calls sta_apply_parameters and it doesn't include the extended capabilities since those can't change after association. As a result, we overrode the max_amsdu_...
```diff diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 7b77d57c9f96..f9ee9947a94d 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -2344,8 +2344,9 @@ static int sta_apply_parameters(struct ieee80211_local *local, sta->sta.max_sp = params->max_sp; } - ieee80211_sta_set_max_amsdu_subframes(s...
f718506edd2d9c6a308ded9d13c632bf7b7d5a2c
Analyze and fix the following issue in the Linux kernel code: wifi: mac80211: bounds-check link_id in ieee80211_ml_epcs
Problem Details: IEEE80211_MLE_STA_EPCS_CONTROL_LINK_ID is 0x000f, so link_id extracted from a PRIO_ACCESS ML element PER_STA_PROFILE subelement can be 0..15. sdata->link[] has IEEE80211_MLD_MAX_NUM_LINKS (15) entries (indices 0..14), making index 15 out-of-bounds. A connected WiFi 7 AP can trigger this by sending an ...
```diff diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 0a0f27836d57..ca1d29daf019 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -11232,6 +11232,9 @@ static void ieee80211_ml_epcs(struct ieee80211_sub_if_data *sdata, control = get_unaligned_le16(pos); link_id = control & IEEE80211_MLE...
fcca603c6a09c7fd041d9004f63421d3a4014db5
Analyze and fix the following issue in the Linux kernel code: firmware: arm_scmi: Validate Powercap domains before state access
Problem Details: Powercap protocol v2 keeps local enable and last-cap state per domain. The v2 enable helpers and disabled-domain cap_set path indexed that state before checking that the supplied domain id was valid. Validate the domain before touching the per-domain state. Link: https://patch.msgid.link/20260517-scm...
```diff diff --git a/drivers/firmware/arm_scmi/powercap.c b/drivers/firmware/arm_scmi/powercap.c index ab9733f4458b..27e3c805e927 100644 --- a/drivers/firmware/arm_scmi/powercap.c +++ b/drivers/firmware/arm_scmi/powercap.c @@ -453,10 +453,14 @@ static int scmi_powercap_cap_set(const struct scmi_protocol_handle *ph, ...
32bc5496b48174dbca1f187f710955ee4d9527a1
Analyze and fix the following issue in the Linux kernel code: firmware: arm_scmi: Validate SENSOR_UPDATE payload size
Problem Details: SENSOR_UPDATE carries one or more sensor readings after the fixed notification header. The parser derives the expected reading count from the sensor description, but it did not verify that the received payload contains those entries before parsing them. Reject truncated update notifications before rea...
```diff diff --git a/drivers/firmware/arm_scmi/sensors.c b/drivers/firmware/arm_scmi/sensors.c index 836c294a9f42..b14bb1146356 100644 --- a/drivers/firmware/arm_scmi/sensors.c +++ b/drivers/firmware/arm_scmi/sensors.c @@ -1072,12 +1072,15 @@ scmi_sensor_fill_custom_report(const struct scmi_protocol_handle *ph, case ...
56e7e64cdd0e7209a58c8ec66028d63387402919
Analyze and fix the following issue in the Linux kernel code: firmware: arm_scmi: Validate BASE_ERROR_EVENT payload size
Problem Details: BASE_ERROR_EVENT carries a variable number of message reports, with the count encoded in error_status. The notification parser used that count without checking whether the received payload contained all reported entries. Reject truncated payloads before copying the report array. Link: https://patch.m...
```diff diff --git a/drivers/firmware/arm_scmi/base.c b/drivers/firmware/arm_scmi/base.c index 4df2620e3c5d..a9cea09355ff 100644 --- a/drivers/firmware/arm_scmi/base.c +++ b/drivers/firmware/arm_scmi/base.c @@ -325,6 +325,8 @@ static void *scmi_base_fill_custom_report(const struct scmi_protocol_handle *ph, void...
f6fe7c3c007df18afd289ff2d98c692fae9ab085
Analyze and fix the following issue in the Linux kernel code: firmware: arm_scmi: Read sensor config as 32-bit value
Problem Details: The SENSOR_CONFIG_GET response contains a 32-bit sensor_config field, and the xfer is initialized with a 4-byte RX buffer. Reading it with get_unaligned_le64() can consume bytes past the returned payload. Use get_unaligned_le32() to match the protocol layout and the allocated response size. Fixes: 7b...
```diff diff --git a/drivers/firmware/arm_scmi/sensors.c b/drivers/firmware/arm_scmi/sensors.c index 882d55f987d2..836c294a9f42 100644 --- a/drivers/firmware/arm_scmi/sensors.c +++ b/drivers/firmware/arm_scmi/sensors.c @@ -793,7 +793,7 @@ static int scmi_sensor_config_get(const struct scmi_protocol_handle *ph, if (!r...
88658ff0e4e7f46dbf8179af1280f2cb295fb0cb
Analyze and fix the following issue in the Linux kernel code: drm/imagination: Fix missing argument in pvr_power_fw_{en,dis}able()
Problem Details: Commit 42577ba79fbf ("drm/imagination: Rename FW booted to FW initialised") dropped by mistake the last argument of the functions pvr_power_fw_enable() and pvr_power_fw_disable(), leading to the following compile error: CC [M] drivers/gpu/drm/imagination/pvr_power.o drivers/gpu/drm/imagination/pvr_...
```diff diff --git a/drivers/gpu/drm/imagination/pvr_power.c b/drivers/gpu/drm/imagination/pvr_power.c index 0ed9e7be604b..a71d5b35601e 100644 --- a/drivers/gpu/drm/imagination/pvr_power.c +++ b/drivers/gpu/drm/imagination/pvr_power.c @@ -379,7 +379,7 @@ pvr_power_device_suspend(struct device *dev) return -EIO; ...
70492cfce2a4d41e87bf46989028a90f4bc6b38f
Analyze and fix the following issue in the Linux kernel code: firmware: smccc: Fix Arm SMCCC SOC_ID name call
Problem Details: Commit 5f9c23abc477 ("firmware: smccc: Support optional Arm SMCCC SOC_ID name") introduced the SOC_ID name string call, which reports a human readable string describing the SoC, as returned by firmware. The SMCCC spec v1.6 describes this feature as AArch64 only, since we rely on 8 characters to be tra...
```diff diff --git a/drivers/firmware/smccc/soc_id.c b/drivers/firmware/smccc/soc_id.c index 2f7475e66b3c..a909d5e6dee5 100644 --- a/drivers/firmware/smccc/soc_id.c +++ b/drivers/firmware/smccc/soc_id.c @@ -60,7 +60,7 @@ static char __init *smccc_soc_name_init(void) * to the ARM_SMCCC_ARCH_SOC_ID function. Fetch it...
6edd9a0d32e1ef81133b8cb5b3bb3157a44da4d1
Analyze and fix the following issue in the Linux kernel code: riscv: dts: spacemit: fix uboot partition offset on Milk-V Jupiter
Problem Details: Correct the uboot partition node name to match its actual offset. Fixes: 2829823956f0 ("riscv: dts: spacemit: enable QSPI and add SPI NOR on Milk-V Jupiter") Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Yixun Lan <dlan@kernel.org> Link: https://patch.msgid.link/20260519041458.3287...
```diff diff --git a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts index beebf804197e..2fc8d6533786 100644 --- a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts +++ b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts @@ -379,7 +379,7 @@ opensbi@70000 { ...
4f97acb4f744f516bbe976da8282c0fe213216ff
Analyze and fix the following issue in the Linux kernel code: riscv: dts: spacemit: set console baud rate on Milk-V Jupiter
Problem Details: Because the default console's baud rate is not set, defconfig kernels do not have any serial output on this platform. Set the baud rate to 115200, matching what is used by U-Boot etc on this platform. See-also: 24c12ca43b12c ("dts: spacemit: set console baud rate on bpif3") Fixes: 5b90a3d6092d9 ("risc...
```diff diff --git a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts index afaad59e6bce..db98dbfadf00 100644 --- a/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts +++ b/arch/riscv/boot/dts/spacemit/k1-milkv-jupiter.dts @@ -20,7 +20,7 @@ }; chosen { - stdout...
f14d52b67e63993e2d184da5f49d884d527dd475
Analyze and fix the following issue in the Linux kernel code: staging: media: atomisp: improve cleanup robustness in ia_css_stream_destroy_isp2401()
Problem Details: Remove the 'assert(entry)' call. In the atomisp driver, assert() is a wrapper around BUG(), which intentionally crashes the entire kernel. This is dangerous and inappropriate for a simple null pointer check during stream teardown. Replace it with a safe 'if (!entry) continue;' check. Change the early ...
```diff diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c index dcfb602c53e3..c6838772553d 100644 --- a/drivers/staging/media/atomisp/pci/sh_css.c +++ b/drivers/staging/media/atomisp/pci/sh_css.c @@ -8196,26 +8196,25 @@ static void ia_css_stream_destroy_isp2401(struct ...
9087395a383212ab1beaefcbe3b57ed131c7823d
Analyze and fix the following issue in the Linux kernel code: staging: media: atomisp: fix loop shadowing in ia_css_stream_destroy()
Problem Details: The nested loop inside the IS_ISP2401 block incorrectly uses the same variable 'i' as the outer loop. This shadows the outer loop variable and causes premature termination or skipped array elements. Change the inner loop to use a new variable 'j' to prevent this. Fixes: 113401c67386 ("media: atomisp:...
```diff diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/atomisp/pci/sh_css.c index f40b6912c14b..456c0b2df231 100644 --- a/drivers/staging/media/atomisp/pci/sh_css.c +++ b/drivers/staging/media/atomisp/pci/sh_css.c @@ -8190,7 +8190,7 @@ ERR: int ia_css_stream_destroy(struct ia_css_stre...
7488f3e0732b9226dbcaa09c74d14443a14de7a5
Analyze and fix the following issue in the Linux kernel code: media: atomisp: avoid ACPI package count underflow in gmin_cfg_get_dsm
Problem Details: gmin_cfg_get_dsm() iterates over ACPI _DSM package elements as key/value pairs using obj->package.count - 1 as the loop bound. If package.count is 0, the subtraction underflows and may lead to out-of-bounds access. Use i + 1 < obj->package.count instead. Signed-off-by: Mohamad El Harake <mohamedhara...
```diff diff --git a/drivers/staging/media/atomisp/pci/atomisp_csi2_bridge.c b/drivers/staging/media/atomisp/pci/atomisp_csi2_bridge.c index ba61cc28fac1..cca91c6d71a5 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_csi2_bridge.c +++ b/drivers/staging/media/atomisp/pci/atomisp_csi2_bridge.c @@ -113,7 +113,7 @@ s...
c06b73f1e19176c0534cd4e1ee0afc044e9774d6
Analyze and fix the following issue in the Linux kernel code: staging: media: atomisp: pci: fix split GP_TIMER_BASE declaration
Problem Details: Merge declaration of const GP_TIMER_BASE split across 2 lines to improve readability. Signed-off-by: Anushka Badhe <anushkabadhe@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
```diff diff --git a/drivers/staging/media/atomisp/pci/system_local.c b/drivers/staging/media/atomisp/pci/system_local.c index a8a93760d5b1..69bcd557a821 100644 --- a/drivers/staging/media/atomisp/pci/system_local.c +++ b/drivers/staging/media/atomisp/pci/system_local.c @@ -86,8 +86,7 @@ const hrt_address GP_DEVICE_BAS...
628f763aee0047ff44974388d6f70f75a763026b
Analyze and fix the following issue in the Linux kernel code: media: atomisp: gc2235: fix UAF and memory leak
Problem Details: gc2235_probe() handles its error paths incorrectly. If media_entity_pads_init() fails, gc2235_remove() is called, which tears down the subdev and frees dev, but then still falls through to atomisp_register_i2c_module(). This results in use-after-free. If atomisp_register_i2c_module() fails, the media...
```diff diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c index d3414312e1de..998c9f46bd06 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c @@ -809,7 +809,7 @@ static int gc2235_pro...
2e6b2d43309758b4dff4074c9d6a2cb084066463
Analyze and fix the following issue in the Linux kernel code: media: atomisp: Fix block comment coding style in sh_css_param_shading.c
Problem Details: Fix checkpatch.pl warnings in sh_css_param_shading.c regarding block comment formatting. The warning was: - Block comments use a trailing */ on a separate line This change also moves text from the first line of block comments to subsequent lines to adhere to the standard Linux kernel coding style. S...
```diff diff --git a/drivers/staging/media/atomisp/pci/sh_css_param_shading.c b/drivers/staging/media/atomisp/pci/sh_css_param_shading.c index 9105334c71b1..083ac5713b6d 100644 --- a/drivers/staging/media/atomisp/pci/sh_css_param_shading.c +++ b/drivers/staging/media/atomisp/pci/sh_css_param_shading.c @@ -20,7 +20,8 @@...
ffb694d75291b8d5433321bd16153bb973cf85bc
Analyze and fix the following issue in the Linux kernel code: media: atomisp: Fix erroneous parameter descriptions
Problem Details: The function mmu_get_page_table_base_index() accepts only one argument mmu_ID_t, the block comment for it shows an erroneous additional argument base_index[in]. Similarly, mmu_reg_load() only accepts two arguments, however the block comment explaining it shows an erroneous argument 'value[in]'. Remove...
```diff diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_include/host/mmu_public.h b/drivers/staging/media/atomisp/pci/hive_isp_css_include/host/mmu_public.h index c3495ec4835c..611755e88e9f 100644 --- a/drivers/staging/media/atomisp/pci/hive_isp_css_include/host/mmu_public.h +++ b/drivers/staging/media/atom...
2842e567b4b90645c2fda07f464f62624e89bc7d
Analyze and fix the following issue in the Linux kernel code: media: atomisp: Fix block comment coding style
Problem Details: Fix checkpatch.pl warnings regarding block comments. Add missing asterisks to block comments to adhere to the kernel coding style. Signed-off-by: Mahad Ibrahim <mahad.ibrahim.dev@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
```diff diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_include/host/mmu_public.h b/drivers/staging/media/atomisp/pci/hive_isp_css_include/host/mmu_public.h index 90a2e4e8f510..c3495ec4835c 100644 --- a/drivers/staging/media/atomisp/pci/hive_isp_css_include/host/mmu_public.h +++ b/drivers/staging/media/atom...
fff06b0538b1c5a690e8092757089a8078f94672
Analyze and fix the following issue in the Linux kernel code: media: atomisp: Fix function signature alignment
Problem Details: Fix checkpatch.pl warnings regarding lines ending with "(" and improper spacing for indentation. This change fixes the function signatures for both function prototypes and static inline function definations in mmu_public.h. The kernel coding style prefers arguments to start immediately after the open...
```diff diff --git a/drivers/staging/media/atomisp/pci/hive_isp_css_include/host/mmu_public.h b/drivers/staging/media/atomisp/pci/hive_isp_css_include/host/mmu_public.h index 2fc137ef46da..90a2e4e8f510 100644 --- a/drivers/staging/media/atomisp/pci/hive_isp_css_include/host/mmu_public.h +++ b/drivers/staging/media/atom...
0a41dd4aabc852692e9bc480e4a789683acd4777
Analyze and fix the following issue in the Linux kernel code: media: atomisp: Fix alloc_pages_bulk() failed errors
Problem Details: Systems with the atomisp ISP do not have a lot of memory for modern standards, so these are often under memory pressure and alloc_pages_bulk() does not try very hard to free pages before returning an amount of pages which is less then requested. This leads to streaming from the camera often failing wit...
```diff diff --git a/drivers/staging/media/atomisp/pci/hmm/hmm_bo.c b/drivers/staging/media/atomisp/pci/hmm/hmm_bo.c index 856561e951a5..b91cbd0262d0 100644 --- a/drivers/staging/media/atomisp/pci/hmm/hmm_bo.c +++ b/drivers/staging/media/atomisp/pci/hmm/hmm_bo.c @@ -620,14 +620,23 @@ static void free_private_bo_pages(s...
4e8156bd9517fa18c3613ea39c222c7035f0221e
Analyze and fix the following issue in the Linux kernel code: media: atomisp: Fix memory leak in atomisp_fixed_pattern_table()
Problem Details: atomisp_v4l2_framebuffer_to_css_frame() allocates memory for temporary variable raw_black_frame, which must be released via ia_css_frame_free() before the function returns. However, if sh_css_set_black_frame() fails, the function returns immediately without performing this cleanup, leading to a memory ...
```diff diff --git a/drivers/staging/media/atomisp/pci/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp_cmd.c index 7c45fa10f986..e401c23a7575 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_cmd.c +++ b/drivers/staging/media/atomisp/pci/atomisp_cmd.c @@ -3378,10 +3378,8 @@ int atomisp_fixed_pattern_tabl...
f69992d08a06e9f105716a141731507f280f8b13
Analyze and fix the following issue in the Linux kernel code: staging: media: atomisp: fix block comment style in atomisp_cmd.c
Problem Details: Fix block comment style warnings reported by checkpatch.pl in atomisp_cmd.c. Signed-off-by: Ethan Lam <ethanlxkernel@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
```diff diff --git a/drivers/staging/media/atomisp/pci/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp_cmd.c index 5e5f3fe1ba7d..7c45fa10f986 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_cmd.c +++ b/drivers/staging/media/atomisp/pci/atomisp_cmd.c @@ -1380,8 +1380,10 @@ static void atomisp_update_gri...
5cb289b5397d198f0ae1ee70dc31fee1c46ff5f9
Analyze and fix the following issue in the Linux kernel code: staging: media: atomisp: Fix typos and formatting in headers
Problem Details: Update block and inline comments to follow kernel commenting conventions, fix typos and wording, remove redundant comments and reformat long comments for clarity and line length consistency. Although some comments used the /** ... */ style, they are not kernel-doc comments and are converted to normal ...
```diff diff --git a/drivers/staging/media/atomisp/include/linux/atomisp.h b/drivers/staging/media/atomisp/include/linux/atomisp.h index 3c8fa3f5808d..7d7f57c2d67c 100644 --- a/drivers/staging/media/atomisp/include/linux/atomisp.h +++ b/drivers/staging/media/atomisp/include/linux/atomisp.h @@ -22,7 +22,7 @@ #define AT...
a380fa65d526b3e0d527cce0379b426bbe3f1c2e
Analyze and fix the following issue in the Linux kernel code: staging: media: atomisp: Fix braces on incorrect lines
Problem Details: Fix checkpatch.pl errors: ERROR: that open brace { should be on the previous line Signed-off-by: Matt Wardle <matt@mattwardle.net> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
```diff diff --git a/drivers/staging/media/atomisp/pci/isp/kernels/dvs/dvs_1.0/ia_css_dvs.host.c b/drivers/staging/media/atomisp/pci/isp/kernels/dvs/dvs_1.0/ia_css_dvs.host.c index 4c85b5a62224..cf6c29155758 100644 --- a/drivers/staging/media/atomisp/pci/isp/kernels/dvs/dvs_1.0/ia_css_dvs.host.c +++ b/drivers/staging/m...
2785424faf21c6c43aa7b78ed9e800e580caa324
Analyze and fix the following issue in the Linux kernel code: staging: media: atomisp: Fix function indentation and braces
Problem Details: Fix parameter indentation for functions and move opening braces onto new line. Fix checkpatch.pl errors: ERROR: open brace '{' following function definitions go on the next line Signed-off-by: Matt Wardle <matt@mattwardle.net> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
```diff diff --git a/drivers/staging/media/atomisp/pci/isp/kernels/dvs/dvs_1.0/ia_css_dvs.host.c b/drivers/staging/media/atomisp/pci/isp/kernels/dvs/dvs_1.0/ia_css_dvs.host.c index e9d6dd0bbfe2..4c85b5a62224 100644 --- a/drivers/staging/media/atomisp/pci/isp/kernels/dvs/dvs_1.0/ia_css_dvs.host.c +++ b/drivers/staging/m...
f3c450f5f13221798de7acbe667d55fbadc63b94
Analyze and fix the following issue in the Linux kernel code: staging: media: atomisp: Remove braces for single statement blocks
Problem Details: Fix checkpatch.pl warnings: WARNING: braces {} are not necessary for single statement blocks WARNING: braces {} are not necessary for any arm of this statement Signed-off-by: Matt Wardle <matt@mattwardle.net> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
```diff diff --git a/drivers/staging/media/atomisp/pci/base/circbuf/interface/ia_css_circbuf.h b/drivers/staging/media/atomisp/pci/base/circbuf/interface/ia_css_circbuf.h index 86300991d30e..148f9f6febfb 100644 --- a/drivers/staging/media/atomisp/pci/base/circbuf/interface/ia_css_circbuf.h +++ b/drivers/staging/media/a...
0812f34bf5dd3e1df495bf6f2c5fe4d140c10d37
Analyze and fix the following issue in the Linux kernel code: staging: media: atomisp: Fix spelling mistakes in comments
Problem Details: Fix various spelling mistakes found by codespell: - aviod => avoid - corrent => correct - stablization => stabilization - addtional => additional - facor => factor - steams => streams Signed-off-by: Tomasz Unger <tomasz.unger@yahoo.pl> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
```diff diff --git a/drivers/staging/media/atomisp/pci/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp_cmd.c index fec369575d88..5e5f3fe1ba7d 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_cmd.c +++ b/drivers/staging/media/atomisp/pci/atomisp_cmd.c @@ -811,7 +811,7 @@ void atomisp_buf_done(struct atom...
69f888381d2ecbe18ed9f112c096f8fd3623db98
Analyze and fix the following issue in the Linux kernel code: OPP: of: Fix potential memory leak in opp_parse_supplies()
Problem Details: The memory allocated for microvolt, microamp and microwatt is not freed in one of the paths in opp_parse_supplies() which returns directly. Fix that by adding a goto to the error unwind ladder. Fixes: 2eedf62e66c2 ("OPP: decouple dt properties in opp_parse_supplies()") Cc: stable@vger.kernel.org Signe...
```diff diff --git a/drivers/opp/of.c b/drivers/opp/of.c index f96adfd5b219..c02e20632fa6 100644 --- a/drivers/opp/of.c +++ b/drivers/opp/of.c @@ -673,7 +673,7 @@ static int opp_parse_supplies(struct dev_pm_opp *opp, struct device *dev, */ if (unlikely(opp_table->regulator_count == -1)) { opp_table->regulator_c...