id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
4774ad841bef97cc51df90195338c5b2573dd4cb
Analyze and fix the following issue in the Linux kernel code: net: phy: marvell: Fix inconsistent indenting in led_blink_set
Problem Details: Fix inconsistent indeinting in m88e1318_led_blink_set reported by kernel test robot, probably done by the presence of an if condition dropped in later revision of the same code. Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/oe-kbuild-all/202304240007.0VEX8QYG-lkp@intel.c...
```diff diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index cd5d0ed9c5e5..43b6cb725551 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -2880,10 +2880,10 @@ static int m88e1318_led_blink_set(struct phy_device *phydev, u8 index, case 1: case 2: reg &= ~(0xf << (4 * in...
aed8fdad2152d946add50bec00a6b07c457bdcdf
Analyze and fix the following issue in the Linux kernel code: net: phy: Fix reading LED reg property
Problem Details: 'reg' is always encoded in 32 bits, thus it has to be read using the function with the corresponding bit width. Fixes: 01e5b728e9e4 ("net: phy: Add a binding for PHY LEDs") Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian F...
```diff diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index d373446ab5ac..17d0d0555a79 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -3028,6 +3028,7 @@ static int of_phy_led(struct phy_device *phydev, struct led_init_data init_data = {}; struct led_classd...
d913d32cc2707e9cd24fe6fa6d7d470e9c728980
Analyze and fix the following issue in the Linux kernel code: netlink: Use copy_to_user() for optval in netlink_getsockopt().
Problem Details: Brad Spencer provided a detailed report [0] that when calling getsockopt() for AF_NETLINK, some SOL_NETLINK options set only 1 byte even though such options require at least sizeof(int) as length. The options return a flag value that fits into 1 byte, but such behaviour confuses users who do not initi...
```diff diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index f365dfdd672d..9b6eb28e6e94 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -1742,7 +1742,8 @@ static int netlink_getsockopt(struct socket *sock, int level, int optname, { struct sock *sk = sock->sk; struct netlin...
be7dbd275dc6b911a5b9a22c4f9cb71b2c7fd847
Analyze and fix the following issue in the Linux kernel code: selftests/bpf: avoid mark_all_scalars_precise() trigger in one of iter tests
Problem Details: iter_pass_iter_ptr_to_subprog subtest is relying on actual array size being passed as subprog parameter. This combined with recent fixes to precision tracking in conditional jumps ([0]) is now causing verifier to backtrack all the way to the point where sum() and fill() subprogs are called, at which po...
```diff diff --git a/tools/testing/selftests/bpf/progs/iters.c b/tools/testing/selftests/bpf/progs/iters.c index 6b9b3c56f009..be16143ae292 100644 --- a/tools/testing/selftests/bpf/progs/iters.c +++ b/tools/testing/selftests/bpf/progs/iters.c @@ -651,25 +651,29 @@ int iter_stack_array_loop(const void *ctx) return sum...
612c5ad50c3e5505e674b7cc50bf6527bc0adee6
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: 3.2.233
Problem Details: This DC version brings along: - Improvements in the SubVP feature - Keep disable aux-i delay as 0 - Add p-state debugging and improvements - Fix in secure display context creation - add option to use custom backlight caps - Lowering min Z8 residency time - Restore rptr/wptr for DMCUB as workaround - Up...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index f52ab717ac7d..4424e7abb801 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -45,7 +45,7 @@ struct aux_payload; struct set_config_cmd_payload; struct dmub_notification; -#...
87f0c16e0eeb672fb888b4e173edff0252e02757
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Enable SubVP for high refresh rate displays
Problem Details: [Description] - Add debug option to enable SubVP for high refresh rate displays - For now limit the enabled modes based on a table in debug options - Currently disabled by default Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Reviewed-by: Jun Lei <Jun.Lei@amd.com> Acked-by: Rodrigo Siqueira <Rodr...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h index 5268d98b96dc..e41107098ffe 100644 --- a/drivers/gpu/drm/amd/display/dc/dc.h +++ b/drivers/gpu/drm/amd/display/dc/dc.h @@ -881,6 +881,7 @@ struct dc_debug_options { bool disable_boot_optimizations; bool override_odm_...
c8cefb99fc811304fff9590677994531ff0ac992
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: For no plane case set pstate support in validation
Problem Details: - Previously update_clocks was overriding pstate support if it checked that there were no planes - However, P-State support should be determined in validation phase instead - This fixes an issue where a transition from FPO -> no planes expects UCLK MAX, but update_clocks was overriding to set U...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c index 694a9d3d92ae..3908e7cfd6cb 100644 --- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c +++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c @...
9c25ab167df412a5474dedfd0e7743e76bc89cbe
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Add p-state debugging
Problem Details: [WHY] P-State related issues are fairly common but currently there is no way to debug these issues after the fact. [HOW] Add helpful registers to HW state queries Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Reviewed-by: Aric Cyr <Aric.Cyr@amd.com> Reviewed-by: Jun Lei <Jun.Lei@amd.com> Acked-b...
```diff diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubbub.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubbub.c index 24bd93219936..0ddd310cc971 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubbub.c +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubbub.c @@ -623,6 +623,11 @@ void hubbub2_rea...
f477c7b5ec3e4ef87606671b340abf3bdb0cccff
Analyze and fix the following issue in the Linux kernel code: drm/amd/display: Fix in secure display context creation
Problem Details: [Why & How] We need to store CRTC information in secure_display_ctx, so postpone the call to amdgpu_dm_crtc_secure_display_create_contexts() until we initialize all CRTCs. Cc: stable@vger.kernel.org Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Reviewed-by: Wayne Lin <Wayne.Lin@amd.com> Acked-by:...
```diff diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index b265434c77e1..7f0dcd7af4c7 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -1776,12 +1776,6 @@ static int amdgpu_dm_i...
445d85e3c1dfd8c45b24be6f1527f1e117256d0e
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: add debugfs interface for reading MQDs
Problem Details: Provide a debugfs interface to access the MQD. Useful for debugging issues with the CP and MES hardware scheduler. v2: fix missing unreserve/unmap when pos >= size (Alex) Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c index eaf0f82757ef..1e9ae3bc59d3 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c @@ -509,6 +509,59 @@ static const struct file_operations amdgpu_debugfs_ring_fops...
3af470cbcc9f40e47fe9b16882f60cd20b438095
Analyze and fix the following issue in the Linux kernel code: drm/amdkfd: Fix an issue at userptr buffer validation process.
Problem Details: amdgpu_ttm_tt_get_user_pages can fail(-EFAULT). If it failed mem has no associated hmm range or user_pages associated. Keep it at process_info->userptr_inval_list and mark mem->invalid until following scheduled attempts can valid it. Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com> Reviewed-by: Fe...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c index 83a83ced2439..4432e169fae8 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c @@ -2445,7 +2445,9 @@ static int update_invalid_u...
ac9287055ff16a092416c76a19006764e4c6a978
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: add gfx shadow CS IOCTL support
Problem Details: Add support for submitting the shadow update packet when submitting an IB. Needed for MCBP on GFX11. v2: update API for CSA (Alex) v3: fix ordering; SET_Q_PREEMPTION_MODE most come before COND_EXEC Add missing check for AMDGPU_CHUNK_ID_CP_GFX_SHADOW in amdgpu_cs_pass1() Only initialize sh...
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index a8ec5ff41fc0..c3b3287dc29e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -288,6 +288,7 @@ static int amdgpu_cs_pass1(struct amdgpu_cs_parser *p, case AMDGPU...
31d7c3a4fc3d312a0646990767647925d5bde540
Analyze and fix the following issue in the Linux kernel code: drm/amdgpu: fix memory leak in mes self test
Problem Details: The fences associated with mes queue have to be freed up during amdgpu_ring_fini. Signed-off-by: Jack Xiao <Jack.Xiao@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
```diff diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c index f676c236b657..eaf0f82757ef 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c @@ -390,6 +390,8 @@ void amdgpu_ring_fini(struct amdgpu_ring *ring) amdgpu_bo_...
7deca5eae83389ca40ac1b1bde96e4af17cca84f
Analyze and fix the following issue in the Linux kernel code: bpf: Disable bpf_refcount_acquire kfunc calls until race conditions are fixed
Problem Details: As reported by Kumar in [0], the shared ownership implementation for BPF programs has some race conditions which need to be addressed before it can safely be used. This patch does so in a minimal way instead of ripping out shared ownership entirely, as proper fixes for the issues raised will follow ASA...
```diff diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 0d73139ee4d8..5c4aa393f65a 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -10509,7 +10509,10 @@ static int check_kfunc_args(struct bpf_verifier_env *env, struct bpf_kfunc_call_ verbose(env, "arg#%d doesn't point to a type w...
16eb51aba0a72b8f60c6b98d1493844230293450
Analyze and fix the following issue in the Linux kernel code: drm/msm: Fix vmap madv warning
Problem Details: Commit d6ae7d1cd58e ("drm/msm/gem: Simplify vmap vs LRU tracking") introduced a splat in the pin_pages_locked() path for buffers that had been MADV_DONTNEED. ------------[ cut here ]------------ msm_obj->madv != 0 WARNING: CPU: 1 PID: 144 at drivers/gpu/drm/msm/msm_gem.c:230 msm_gem_pin_pages...
```diff diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c index db6c4e281d75..cd39b9d8abdb 100644 --- a/drivers/gpu/drm/msm/msm_gem.c +++ b/drivers/gpu/drm/msm/msm_gem.c @@ -219,7 +219,8 @@ static void put_pages(struct drm_gem_object *obj) } } -static struct page **msm_gem_pin_pages_locked...
ce902336d9b3472d6104316e876e1a8752531916
Analyze and fix the following issue in the Linux kernel code: drm/msm/atomic: Don't try async if crtc not active
Problem Details: For a similar reason as commit f2c7ca890182 ("drm/atomic-helper: Don't set deadline for modesets"), we need the crtc to be already active in order to compute a target vblank time for an async commit. Otherwise we get this splat reminding us that we are doing it wrong: ------------[ cut here ]-----...
```diff diff --git a/drivers/gpu/drm/msm/msm_atomic.c b/drivers/gpu/drm/msm/msm_atomic.c index d77fa9793c54..9c45d641b521 100644 --- a/drivers/gpu/drm/msm/msm_atomic.c +++ b/drivers/gpu/drm/msm/msm_atomic.c @@ -155,6 +155,8 @@ static bool can_do_async(struct drm_atomic_state *state, for_each_new_crtc_in_state(state, ...
0d68683838f2850dd8ff31f1121e05bfb7a2def0
Analyze and fix the following issue in the Linux kernel code: drm/dsc: fix DP_DSC_MAX_BPP_DELTA_* macro values
Problem Details: The macro values just don't match the specs. Fix them. Fixes: 1482ec00be4a ("drm: Add missing DP DSC extended capability definitions.") Cc: Vinod Govindapillai <vinod.govindapillai@intel.com> Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Rev...
```diff diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h index 4545ed610958..b8b7f990d67f 100644 --- a/include/drm/display/drm_dp.h +++ b/include/drm/display/drm_dp.h @@ -286,8 +286,8 @@ #define DP_DSC_MAX_BITS_PER_PIXEL_HI 0x068 /* eDP 1.4 */ # define DP_DSC_MAX_BITS_PER_PIXEL_HI_M...
13525645e2246ebc8a21bd656248d86022a6ee8f
Analyze and fix the following issue in the Linux kernel code: drm/dsc: fix drm_edp_dsc_sink_output_bpp() DPCD high byte usage
Problem Details: The operator precedence between << and & is wrong, leading to the high byte being completely ignored. For example, with the 6.4 format, 32 becomes 0 and 24 becomes 8. Fix it, and remove the slightly confusing and unnecessary DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT macro while at it. Fixes: 0575650077ea ("d...
```diff diff --git a/include/drm/display/drm_dp.h b/include/drm/display/drm_dp.h index 632376c291db..4545ed610958 100644 --- a/include/drm/display/drm_dp.h +++ b/include/drm/display/drm_dp.h @@ -286,7 +286,6 @@ #define DP_DSC_MAX_BITS_PER_PIXEL_HI 0x068 /* eDP 1.4 */ # define DP_DSC_MAX_BITS_PER_PIXEL_HI_M...
449067f3fc9f340da54e383738286881e6634d0b
Analyze and fix the following issue in the Linux kernel code: perf cs-etm: Fix timeless decode mode detection
Problem Details: In this context, timeless refers to the trace data rather than the perf event data. But when detecting whether there are timestamps in the trace data or not, the presence of a timestamp flag on any perf event is used. Since commit f42c0ce573df ("perf record: Always get text_poke events with --kcore op...
```diff diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c index 8dd81ddd9e4e..50593289d53c 100644 --- a/tools/perf/util/cs-etm.c +++ b/tools/perf/util/cs-etm.c @@ -2684,26 +2684,29 @@ static int cs_etm__process_auxtrace_event(struct perf_session *session, return 0; } -static bool cs_etm__is_timeless...
1a261a6e10e80cd7c69c3f5bdf47cd41f928fd08
Analyze and fix the following issue in the Linux kernel code: scripts: Remove ICC-related dead code
Problem Details: Intel compiler support has already been completely removed in commit 95207db8166a ("Remove Intel compiler support"). However, it appears that there is still some ICC-related code in scripts/cc-version.sh. There is no harm in leaving the code as it is, but removing the dead code makes the codebase a bi...
```diff diff --git a/scripts/cc-version.sh b/scripts/cc-version.sh index 0573c92e841d..a7e28b6a514e 100755 --- a/scripts/cc-version.sh +++ b/scripts/cc-version.sh @@ -45,10 +45,6 @@ Clang) version=$2.$3.$4 min_version=$($min_tool_version llvm) ;; -ICC) - version=$(($2 / 100)).$(($2 % 100)).$3 - min_version=$($min...
c963e2ec095cb3f855890be53f56f5a6c6fbe371
Analyze and fix the following issue in the Linux kernel code: ASoC: Intel: soc-acpi-byt: Fix "WM510205" match no longer working
Problem Details: Commit 7e1d728a94ca ("ASoC: Intel: soc-acpi-byt: Add new WM5102 ACPI HID") added an extra HID to wm5102_comp_ids.codecs, but it forgot to bump wm5102_comp_ids.num_codecs, causing the last codec HID in the codecs list to no longer work. Bump wm5102_comp_ids.num_codecs to fix this. Fixes: 7e1d728a94ca ...
```diff diff --git a/sound/soc/intel/common/soc-acpi-intel-byt-match.c b/sound/soc/intel/common/soc-acpi-intel-byt-match.c index db5a92b9875a..87c44f284971 100644 --- a/sound/soc/intel/common/soc-acpi-intel-byt-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-byt-match.c @@ -124,7 +124,7 @@ static const struct snd_s...
51010c1dc487e7764b7e1ec1c4954068e5880757
Analyze and fix the following issue in the Linux kernel code: dt-bindings: timer: rockchip: Drop superfluous rk3288 compatible
Problem Details: The compatible string for Rockchip RK3288 is wrongly provided in the 'enum' item, in addition to the subsequent 'const', which allows the usage of an incorrect specification: compatible = "rockchip,rk3288-timer", "rockchip,rk3288-timer"; As the rk3288 string is also specified in the top-most 'const...
```diff diff --git a/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml b/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml index 65e59836a660..2bdb6e6bdb21 100644 --- a/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml +++ b/Documentation/devicetree/bindings/timer/rockchip,rk-time...
8d7aac5153f21108365137b76e395dcf9bb3a800
Analyze and fix the following issue in the Linux kernel code: clocksource/drivers/timer-ti-dm: Fix finding alwon timer
Problem Details: Clean-up commit b6999fa1c847 ("clocksource/drivers/timer-ti-dm: Use of_address_to_resource()") caused a regression where pa is never set making all related SoCs fail to boot. Let's fix this by setting pa if found. Fixes: b6999fa1c847 ("clocksource/drivers/timer-ti-dm: Use of_address_to_resource()") Cc...
```diff diff --git a/drivers/clocksource/timer-ti-dm-systimer.c b/drivers/clocksource/timer-ti-dm-systimer.c index 3b98a3c04f87..4fa68f657056 100644 --- a/drivers/clocksource/timer-ti-dm-systimer.c +++ b/drivers/clocksource/timer-ti-dm-systimer.c @@ -261,8 +261,10 @@ static void __init dmtimer_systimer_assign_alwon(voi...
fb73556386e074e9bee9fa2d253aeaefe4e063e0
Analyze and fix the following issue in the Linux kernel code: clocksource/drivers/davinci: Fix memory leak in davinci_timer_register when init fails
Problem Details: Smatch reports: drivers/clocksource/timer-davinci.c:332 davinci_timer_register() warn: 'base' from ioremap() not released on lines: 274. Fix this and other potential memory leak problems by adding a set of corresponding exit lables. Fixes: 721154f972aa ("clocksource/drivers/davinci: Add support for c...
```diff diff --git a/drivers/clocksource/timer-davinci.c b/drivers/clocksource/timer-davinci.c index 9996c0542520..b1c248498be4 100644 --- a/drivers/clocksource/timer-davinci.c +++ b/drivers/clocksource/timer-davinci.c @@ -257,21 +257,25 @@ int __init davinci_timer_register(struct clk *clk, resource_size(&timer_cf...
fd3f088f35f610a7ee3045b7d172b362342e43c6
Analyze and fix the following issue in the Linux kernel code: clocksource/drivers/exynos_mct: Explicitly return 0 for shared timer
Problem Details: For a shared timers, the mct_init_dt() should not initialize the clock even with global comparator. This is not an error, thus the function should simply return 0, not 'ret'. This also fixes smatch warning: drivers/clocksource/exynos_mct.c:635 mct_init_dt() warn: missing error code? 'ret' Reporte...
```diff diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c index bfd60093ee1c..ef8cb1b71be4 100644 --- a/drivers/clocksource/exynos_mct.c +++ b/drivers/clocksource/exynos_mct.c @@ -682,7 +682,7 @@ static int __init mct_init_dt(struct device_node *np, unsigned int int_type) * processor c...
bd8621ca1510e6e802df9855bdc35a04a3cfa932
Analyze and fix the following issue in the Linux kernel code: tpm: Add !tpm_amd_is_rng_defective() to the hwrng_unregister() call site
Problem Details: The following crash was reported: [ 1950.279393] list_del corruption, ffff99560d485790->next is NULL [ 1950.279400] ------------[ cut here ]------------ [ 1950.279401] kernel BUG at lib/list_debug.c:49! [ 1950.279405] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI [ 1950.279407] CPU: 11 PID: 5886 Comm: m...
```diff diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c index 33319a78767f..6fdfa65a00c3 100644 --- a/drivers/char/tpm/tpm-chip.c +++ b/drivers/char/tpm/tpm-chip.c @@ -692,7 +692,8 @@ EXPORT_SYMBOL_GPL(tpm_chip_register); void tpm_chip_unregister(struct tpm_chip *chip) { tpm_del_legacy_sysfs(...
77218e83c83c1cd4b994edfb5b162ece42e73ffe
Analyze and fix the following issue in the Linux kernel code: tpm_tis: fix stall after iowrite*()s
Problem Details: ioread8() operations to TPM MMIO addresses can stall the CPU when immediately following a sequence of iowrite*()'s to the same region. For example, cyclitest measures ~400us latency spikes when a non-RT usermode application communicates with an SPI-based TPM chip (Intel Atom E3940 system, PREEMPT_RT k...
```diff diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index ba0402202bee..7af389806643 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c @@ -50,6 +50,45 @@ static inline struct tpm_tis_tcg_phy *to_tpm_tis_tcg_phy(struct tpm_tis_data *da return container_of(data, struct tp...
e644b2f498d297a928efcb7ff6f900c27f8b788e
Analyze and fix the following issue in the Linux kernel code: tpm, tpm_tis: Enable interrupt test
Problem Details: The test for interrupts in tpm_tis_send() is skipped if the flag TPM_CHIP_FLAG_IRQ is not set. Since the current code never sets the flag initially the test is never executed. Fix this by setting the flag in tpm_tis_gen_interrupt() right after interrupts have been enabled and before the test is execut...
```diff diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index 5b01a3df65a6..c2421162cf34 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -793,10 +793,15 @@ static void tpm_tis_gen_interrupt(struct tpm_chip *chip) cap_t cap; int ret; + chip->flag...
548eb516ec0f7a484a23a902835899341164b8ea
Analyze and fix the following issue in the Linux kernel code: tpm, tpm_tis: startup chip before testing for interrupts
Problem Details: In tpm_tis_gen_interrupt() a request for a property value is sent to the TPM to test if interrupts are generated. However after a power cycle the TPM responds with TPM_RC_INITIALIZE which indicates that the TPM is not yet properly initialized. Fix this by first starting the TPM up before the request is...
```diff diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c index 0601e6e5e326..33319a78767f 100644 --- a/drivers/char/tpm/tpm-chip.c +++ b/drivers/char/tpm/tpm-chip.c @@ -605,6 +605,30 @@ static int tpm_get_pcr_allocation(struct tpm_chip *chip) return rc; } +/* + * tpm_chip_startup() - performs...
955df4f87760b3bb2af253d3fbb12fb712b3ffa6
Analyze and fix the following issue in the Linux kernel code: tpm, tpm_tis: Claim locality when interrupts are reenabled on resume
Problem Details: In tpm_tis_resume() make sure that the locality has been claimed when tpm_tis_reenable_interrupts() is called. Otherwise the writings to the register might not have any effect. Fixes: 45baa1d1fa39 ("tpm_tis: Re-enable interrupts upon (S3) resume") Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.co...
```diff diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index fda4ed61d0a4..dfb622a1b6f7 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -1225,28 +1225,27 @@ int tpm_tis_resume(struct device *dev) struct tpm_chip *chip = dev_get_drvdata(dev); int ...
7a2f55d0be296c4e81fd782f3d6c43ed4ec7e265
Analyze and fix the following issue in the Linux kernel code: tpm, tpm: Implement usage counter for locality
Problem Details: Implement a usage counter for the (default) locality used by the TPM TIS driver: Request the locality from the TPM if it has not been claimed yet, otherwise only increment the counter. Also release the locality if the counter is 0 otherwise only decrement the counter. Since in case of SPI the register ...
```diff diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index 717b81435cbd..b05c1ed51dd3 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -165,16 +165,27 @@ static bool check_locality(struct tpm_chip *chip, int l) return false; } -static int relea...
15d7aa4e46eba87242a320f39773aa16faddadee
Analyze and fix the following issue in the Linux kernel code: tpm, tpm_tis: Claim locality before writing interrupt registers
Problem Details: In tpm_tis_probe_single_irq() interrupt registers TPM_INT_VECTOR, TPM_INT_STATUS and TPM_INT_ENABLE are modified to setup the interrupts. Currently these modifications are done without holding a locality thus they have no effect. Fix this by claiming the (default) locality before the registers are writ...
```diff diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index b5338e522a45..f70c1d95bc03 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -740,16 +740,10 @@ static void tpm_tis_gen_interrupt(struct tpm_chip *chip) cap_t cap; int ret; - ret = requ...
ed9be0e6c892a783800d77a41ca4c7255c6af8c5
Analyze and fix the following issue in the Linux kernel code: tpm, tpm_tis: Do not skip reset of original interrupt vector
Problem Details: If in tpm_tis_probe_irq_single() an error occurs after the original interrupt vector has been read, restore the interrupts before the error is returned. Since the caller does not check the error value, return -1 in any case that the TPM_CHIP_FLAG_IRQ flag is not set. Since the return value of function...
```diff diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index 347af7010396..b5338e522a45 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -733,7 +733,7 @@ static irqreturn_t tis_int_handler(int dummy, void *dev_id) return IRQ_HANDLED; } -static in...
ef97e774713fcd34c45f7a7426c7d8845394f7be
Analyze and fix the following issue in the Linux kernel code: KEYS: Add missing function documentation
Problem Details: Compiling with 'W=1' results in warnings that 'Function parameter or member not described' Add the missing parameters for restrict_link_by_builtin_and_secondary_trusted and restrict_link_to_builtin_trusted. Use /* instead of /** for get_builtin_and_secondary_restriction, since it is a static function...
```diff diff --git a/certs/system_keyring.c b/certs/system_keyring.c index 5042cc54fa5e..a7a49b17ceb1 100644 --- a/certs/system_keyring.c +++ b/certs/system_keyring.c @@ -33,7 +33,11 @@ extern __initconst const unsigned long system_certificate_list_size; extern __initconst const unsigned long module_cert_size; /** ...
7f8da9915fcc6386edf86471bf31e162845930a4
Analyze and fix the following issue in the Linux kernel code: KEYS: Create static version of public_key_verify_signature
Problem Details: The kernel test robot reports undefined reference to public_key_verify_signature when CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE is not defined. Create a static version in this case and return -EINVAL. Fixes: db6c43bd2132 ("crypto: KEYS: convert public key and digsig asym to the akcipher api") Reported-by: ...
```diff diff --git a/include/crypto/public_key.h b/include/crypto/public_key.h index 68f7aa2a7e55..6d61695e1cde 100644 --- a/include/crypto/public_key.h +++ b/include/crypto/public_key.h @@ -80,7 +80,16 @@ extern int create_signature(struct kernel_pkey_params *, const void *, void *); extern int verify_signature(const...
b3a7a9ab65ae2f2626c7222fb79cdd433f8c5252
Analyze and fix the following issue in the Linux kernel code: fbdev: mmp: Fix deferred clk handling in mmphw_probe()
Problem Details: When dev_err_probe() is called, 'ret' holds the value of the previous successful devm_request_irq() call. 'ret' should be assigned with a meaningful value before being used in dev_err_probe(). While at it, use and return "PTR_ERR(ctrl->clk)" instead of a hard-coded "-ENOENT" so that -EPROBE_DEFER is h...
```diff diff --git a/drivers/video/fbdev/mmp/hw/mmp_ctrl.c b/drivers/video/fbdev/mmp/hw/mmp_ctrl.c index a9df8ee79810..51fbf02a0343 100644 --- a/drivers/video/fbdev/mmp/hw/mmp_ctrl.c +++ b/drivers/video/fbdev/mmp/hw/mmp_ctrl.c @@ -514,9 +514,9 @@ static int mmphw_probe(struct platform_device *pdev) /* get clock */ ...
bfff83c4824308f7acce47baf88858b52bc1314f
Analyze and fix the following issue in the Linux kernel code: linux/vt_buffer.h: allow either builtin or modular for macros
Problem Details: Fix build errors on ARCH=alpha when CONFIG_MDA_CONSOLE=m. This allows the ARCH macros to be the only ones defined. In file included from ../drivers/video/console/mdacon.c:37: ../arch/alpha/include/asm/vga.h:17:40: error: expected identifier or '(' before 'volatile' 17 | static inline void scr_write...
```diff diff --git a/include/linux/vt_buffer.h b/include/linux/vt_buffer.h index 848db1b1569f..919d999a8c1d 100644 --- a/include/linux/vt_buffer.h +++ b/include/linux/vt_buffer.h @@ -16,7 +16,7 @@ #include <linux/string.h> -#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_MDA_CONSOLE) +#if IS_ENABLED(CONFIG_VGA_C...
1f3744b89164a430865d18b757b86c4007627855
Analyze and fix the following issue in the Linux kernel code: platform/chrome: cros_ec_debugfs: fix kernel-doc warning
Problem Details: Fix the following kernel-doc warning: $ ./scripts/kernel-doc -none drivers/platform/chrome/* [...] warning: This comment starts with '/**', but isn't a kernel-doc comment. Fixes: 14bb09b32f43 ("platform/chrome: cros_ec: Separate logic for getting panic info") Reported-by: kernel test robot <lkp@intel...
```diff diff --git a/drivers/platform/chrome/cros_ec_debugfs.c b/drivers/platform/chrome/cros_ec_debugfs.c index 414ebfffcf83..c876120e0ebc 100644 --- a/drivers/platform/chrome/cros_ec_debugfs.c +++ b/drivers/platform/chrome/cros_ec_debugfs.c @@ -400,7 +400,7 @@ static void cros_ec_cleanup_console_log(struct cros_ec_de...
dc70234c408c644505a24362b0f095f713e4697e
Analyze and fix the following issue in the Linux kernel code: platform/chrome: cros_typec_switch: Add missing fwnode_handle_put()
Problem Details: In cros_typec_register_switches(), we should add fwnode_handle_put() when break out of the iteration device_for_each_child_node() as it will automatically increase and decrease the refcounter. Fixes: affc804c44c8 ("platform/chrome: cros_typec_switch: Add switch driver") Signed-off-by: Liang He <windhl...
```diff diff --git a/drivers/platform/chrome/cros_typec_switch.c b/drivers/platform/chrome/cros_typec_switch.c index 9ed1605f4071..752720483753 100644 --- a/drivers/platform/chrome/cros_typec_switch.c +++ b/drivers/platform/chrome/cros_typec_switch.c @@ -270,6 +270,7 @@ static int cros_typec_register_switches(struct cr...
20981ce2d5a5f79d17da1ace3a93df7b3c6ba3d6
Analyze and fix the following issue in the Linux kernel code: Bluetooth: btusb: Add WCN6855 devcoredump support
Problem Details: WCN6855 will report memdump via ACL data or HCI event when it get crashed, so we collect memdump to debug firmware. Signed-off-by: Tim Jiang <quic_tjiang@quicinc.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
```diff diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 3aa189b1986d..2a8e2bb038f5 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -733,6 +733,16 @@ static const struct dmi_system_id btusb_needs_reset_resume_table[] = { {} }; +struct qca_dump_info { + /* fields fo...
7948fe1c92d92313eea5453f83deb7f0141355e8
Analyze and fix the following issue in the Linux kernel code: Bluetooth: btrtl: Add the support for RTL8851B
Problem Details: Add the support for RTL8851B BT controller on USB interface. The necessary firmware will be submitted to linux-firmware project. Note that the Bluetooth devices WITH the VID=0x0bda would be set the feature quirk in btrtl_setup_realtek(). It's able to ignore the feature flag set for the specific VID an...
```diff diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c index 2ced74f8f87d..2915c82d719d 100644 --- a/drivers/bluetooth/btrtl.c +++ b/drivers/bluetooth/btrtl.c @@ -29,6 +29,7 @@ #define RTL_ROM_LMP_8761A 0x8761 #define RTL_ROM_LMP_8822B 0x8822 #define RTL_ROM_LMP_8852A 0x8852 +#define RTL_ROM_LMP_...
9e080b53dafae52759c87a105abcb87aa0592cf4
Analyze and fix the following issue in the Linux kernel code: Bluetooth: btnxpuart: Fix sparse warnings
Problem Details: This fixes the following sparse warnings: drivers/bluetooth/btnxpuart.c:681:23: sparse: sparse: restricted __le16 degrades to integer drivers/bluetooth/btnxpuart.c:690:82: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned short [usertype] req_l...
```diff diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c index 93f3afc0c0c8..31046f26e712 100644 --- a/drivers/bluetooth/btnxpuart.c +++ b/drivers/bluetooth/btnxpuart.c @@ -683,12 +683,14 @@ static int nxp_recv_chip_ver_v1(struct hci_dev *hdev, struct sk_buff *skb) { struct btnxpuart_dev *n...
0ab905c3be8c2be368821dd2bd1f8d126064d993
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Devcoredump: Fix storing u32 without specifying byte order issue
Problem Details: API hci_devcd_init() stores its u32 type parameter @dump_size into skb, but it does not specify which byte order is used to store the integer, let us take little endian to store and parse the integer. Fixes: f5cc609d09d4 ("Bluetooth: Add support for hci devcoredump") Signed-off-by: Zijun Hu <quic_ziju...
```diff diff --git a/net/bluetooth/coredump.c b/net/bluetooth/coredump.c index 08fa98505454..d2d2624ec708 100644 --- a/net/bluetooth/coredump.c +++ b/net/bluetooth/coredump.c @@ -5,6 +5,7 @@ #include <linux/devcoredump.h> +#include <asm/unaligned.h> #include <net/bluetooth/bluetooth.h> #include <net/bluetooth/hc...
25c150ac103a4ebeed0319994c742a90634ddf18
Analyze and fix the following issue in the Linux kernel code: bluetooth: Perform careful capability checks in hci_sock_ioctl()
Problem Details: Previously, capability was checked using capable(), which verified that the caller of the ioctl system call had the required capability. In addition, the result of the check would be stored in the HCI_SOCK_TRUSTED flag, making it persistent for the socket. However, malicious programs can abuse this ap...
```diff diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index 8d8950101cee..1d249d839819 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c @@ -1031,7 +1031,14 @@ static int hci_sock_ioctl(struct socket *sock, unsigned int cmd, if (hci_sock_gen_cookie(sk)) { struct sk_buff *skb; ...
25e97f7b1866e6b8503be349eeea44bb52d661ce
Analyze and fix the following issue in the Linux kernel code: Bluetooth: L2CAP: fix "bad unlock balance" in l2cap_disconnect_rsp
Problem Details: conn->chan_lock isn't acquired before l2cap_get_chan_by_scid, if l2cap_get_chan_by_scid returns NULL, then 'bad unlock balance' is triggered. Reported-by: syzbot+9519d6b5b79cf7787cf3@syzkaller.appspotmail.com Link: https://lore.kernel.org/all/000000000000894f5f05f95e9f4d@google.com/ Signed-off-by: Min...
```diff diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 5cc95fd17f7d..376b523c7b26 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -4693,7 +4693,6 @@ static inline int l2cap_disconnect_rsp(struct l2cap_conn *conn, chan = l2cap_get_chan_by_scid(conn, scid); if...
db2bf510bd5d57f064d9e1db395ed86a08320c54
Analyze and fix the following issue in the Linux kernel code: Revert "Bluetooth: btsdio: fix use after free bug in btsdio_remove due to unfinished work"
Problem Details: This reverts commit 1e9ac114c4428fdb7ff4635b45d4f46017e8916f. This patch introduces a possible null-ptr-def problem. Revert it. And the fixed bug by this patch have resolved by commit 73f7b171b7c0 ("Bluetooth: btsdio: fix use after free bug in btsdio_remove due to race condition"). Fixes: 1e9ac114c44...
```diff diff --git a/drivers/bluetooth/btsdio.c b/drivers/bluetooth/btsdio.c index 51000320e1ea..f19d31ee37ea 100644 --- a/drivers/bluetooth/btsdio.c +++ b/drivers/bluetooth/btsdio.c @@ -354,7 +354,6 @@ static void btsdio_remove(struct sdio_func *func) BT_DBG("func %p", func); - cancel_work_sync(&data->work); i...
c09b80be6ffc338634b2f5f8cfa12b6843410834
Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_conn: Fix not waiting for HCI_EVT_LE_CIS_ESTABLISHED
Problem Details: When submitting HCI_OP_LE_CREATE_CIS the code shall wait for HCI_EVT_LE_CIS_ESTABLISHED thus enforcing the serialization of HCI_OP_LE_CREATE_CIS as the Core spec does not allow to send them in parallel: BLUETOOTH CORE SPECIFICATION Version 5.3 | Vol 4, Part E page 2566: If the Host issues this co...
```diff diff --git a/include/net/bluetooth/hci_sync.h b/include/net/bluetooth/hci_sync.h index 17f5a4c32f36..f61b249787fc 100644 --- a/include/net/bluetooth/hci_sync.h +++ b/include/net/bluetooth/hci_sync.h @@ -122,6 +122,8 @@ int hci_abort_conn_sync(struct hci_dev *hdev, struct hci_conn *conn, u8 reason); int hci_l...
c14516faede33c2c31da45cf950d55dbff42962e
Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_conn: Fix not matching by CIS ID
Problem Details: This fixes only matching CIS by address which prevents creating new hcon if upper layer is requesting a specific CIS ID. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
```diff diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 4fe1e71cb9d8..a6c8aee2f256 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h @@ -1180,7 +1180,9 @@ static inline struct hci_conn *hci_conn_hash_lookup_le(struct hci_dev *hdev, static inli...
e4eea890369c00dd58d97b1c066dc2bddf0da2c7
Analyze and fix the following issue in the Linux kernel code: Bluetooth: vhci: Fix info leak in force_devcd_write()
Problem Details: There are a number of bugs here: 1) If "count" is less than sizeof(dump_data.data) then it copies uninitialized data. 2) If simple_write_to_buffer() returns -EFAULT then we run into a problem "ret < count" comparison. "count" is an unsigned long so the comparison is type promoted to unsigned...
```diff diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c index 691fe93b1976..40e2b9fa11a2 100644 --- a/drivers/bluetooth/hci_vhci.c +++ b/drivers/bluetooth/hci_vhci.c @@ -323,17 +323,21 @@ static ssize_t force_devcd_write(struct file *file, const char __user *user_buf, struct hci_dev *hdev = d...
3c690a0d64f5964977050a91b6bba8de09c13d94
Analyze and fix the following issue in the Linux kernel code: Bluetooth: fix inconsistent indenting
Problem Details: Fixed a wrong indentation before "return".This line uses a 7 space indent instead of a tab. Signed-off-by: Lanzhe Li <u202212060@hust.edu.cn> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
```diff diff --git a/net/bluetooth/hci_debugfs.c b/net/bluetooth/hci_debugfs.c index b7f682922a16..ec0df2f9188e 100644 --- a/net/bluetooth/hci_debugfs.c +++ b/net/bluetooth/hci_debugfs.c @@ -189,7 +189,7 @@ static int uuids_show(struct seq_file *f, void *p) } hci_dev_unlock(hdev); - return 0; + return 0; }...
09df5a91e620a2d21f7f410938e5e28364fae0bf
Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_bcm: Add Acer Iconia One 7 B1-750 to the bcm_broken_irq_dmi_table
Problem Details: The DSDT for the Acer Iconia One 7 B1-750 models (which share the same mainboard) specifies a IOAPIC IRQ for the HCI -> host IRQ but this is not correct. Like the Asus TF103C these tablets use pin 17 of the INT33FC:02 GPIO controller for the IRQ and this pin is _not_ configured in direct IRQ mode by t...
```diff diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c index eb9e1c858e91..83bf5d4330c4 100644 --- a/drivers/bluetooth/hci_bcm.c +++ b/drivers/bluetooth/hci_bcm.c @@ -899,6 +899,14 @@ static struct gpiod_lookup_table irq_on_int33fc02_pin17_gpios = { }; static const struct dmi_system_id bcm_b...
9a09460274d311466b44743c281c81f36c3e4df4
Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_bcm: Add Lenovo Yoga Tablet 2 830 / 1050 to the bcm_broken_irq_dmi_table
Problem Details: The DSDT for the Lenovo Yoga Tablet 2 830 / 1050 models (which share the same mainboard) specifies a IOAPIC IRQ for the HCI -> host IRQ but this is not correct. Like the Asus TF103C these tablets use pin 17 of the INT33FC:02 GPIO controller for the IRQ and this pin is _not_ configured in direct IRQ mo...
```diff diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c index 4a3ef844df5d..eb9e1c858e91 100644 --- a/drivers/bluetooth/hci_bcm.c +++ b/drivers/bluetooth/hci_bcm.c @@ -890,7 +890,7 @@ unlock: #endif /* Some firmware reports an IRQ which does not work (wrong pin in fw table?) */ -static struct...
0d218c3642b9ccf71f44987cd03c19320f3bd918
Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_bcm: Fall back to getting bdaddr from EFI if not set
Problem Details: On some devices the BCM Bluetooth adapter does not have a valid bdaddr set. btbcm.c currently sets HCI_QUIRK_INVALID_BDADDR to indicate when this is the case. But this requires users to manual setup a btaddr, by doing e.g.: btmgmt -i hci0 public-addr 'B0:F1:EC:82:1D:B3' Which means that Bluetooth wi...
```diff diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c index 43e98a598bd9..de2ea589aa49 100644 --- a/drivers/bluetooth/btbcm.c +++ b/drivers/bluetooth/btbcm.c @@ -6,6 +6,7 @@ * Copyright (C) 2015 Intel Corporation */ +#include <linux/efi.h> #include <linux/module.h> #include <linux/firmwar...
0fe8c8d071343fa9278980ce4b6f8e6ea24a2ed1
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Split bt_iso_qos into dedicated structures
Problem Details: Split bt_iso_qos into dedicated unicast and broadcast structures and add additional broadcast parameters. Fixes: eca0ae4aea66 ("Bluetooth: Add initial implementation of BIS connections") Signed-off-by: Iulia Tanasescu <iulia.tanasescu@nxp.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@inte...
```diff diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index bcc5a4cd2c17..1b4230cd42a3 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h @@ -1,6 +1,7 @@ /* BlueZ - Bluetooth protocol stack for Linux Copyright (C) 2000-2001 Qualcomm Incor...
af395330abed142a2685bf3d17a938544816bf3c
Analyze and fix the following issue in the Linux kernel code: Bluetooth: btintel: Add Intel devcoredump support
Problem Details: Intercept debug exception events from the controller and put them into a devcoredump using hci devcoredump APIs. The debug exception contains data in a TLV format and it will be parsed in userspace. Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Signed-off-by: Manish Mandlik <mman...
```diff diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c index 7a6dc05553f1..d9349ba48281 100644 --- a/drivers/bluetooth/btintel.c +++ b/drivers/bluetooth/btintel.c @@ -43,6 +43,12 @@ struct cmd_write_boot_params { u8 fw_build_yy; } __packed; +static struct { + const char *driver_name; + u8 ...
11e29b4a3fda975f4427800285b7e4544f4e9152
Analyze and fix the following issue in the Linux kernel code: Bluetooth: NXP: select CONFIG_CRC8
Problem Details: The driver needs both CRC32 and CRC8 to link correctly: ld: drivers/bluetooth/btnxpuart.o: in function `nxp_serdev_probe': drivers/bluetooth/btnxpuart.c:1214: undefined reference to `crc8_populate_msb' ld: drivers/bluetooth/btnxpuart.o: in function `nxp_send_ack': drivers/bluetooth/btnxpuart.c:559: un...
```diff diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig index 0703bdd44140..f84322d375de 100644 --- a/drivers/bluetooth/Kconfig +++ b/drivers/bluetooth/Kconfig @@ -469,6 +469,7 @@ config BT_NXPUART tristate "NXP protocol support" depends on SERIAL_DEV_BUS select CRC32 + select CRC8 help N...
586e154f98ac826233c2be5dc80e101303b4b2bd
Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_ldisc: Fix tty_set_termios() return value assumptions
Problem Details: tty_set_termios() never returns anything else than 0. Make the debug prints to look directly into the new termios instead to check CRTSCTS state. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
```diff diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c index 865112e96ff9..efdda2c3fce8 100644 --- a/drivers/bluetooth/hci_ldisc.c +++ b/drivers/bluetooth/hci_ldisc.c @@ -323,9 +323,9 @@ void hci_uart_set_flow_control(struct hci_uart *hu, bool enable) /* Disable hardware flow control */ ...
125ede3afe5830c3e748dbc66098b7b640899321
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Add VID/PID 0489/e0e4 for MediaTek MT7922
Problem Details: Tested on Acer Nitro AN515-47 Notebook output from /sys/kernel/debug/usb/devices: T: Bus=03 Lev=01 Prnt=01 Port=02 Cnt=02 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0489 ProdID=e0e4 Rev= 1.00 S: Manufacturer=MediaTek Inc. S: Product=Wireless_D...
```diff diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 372007f78467..0c94cd7f4af3 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -615,6 +615,9 @@ static const struct usb_device_id blacklist_table[] = { { USB_DEVICE(0x0489, 0xe0e2), .driver_info = BTUSB_MEDIATEK | ...
ae051b044ebf5938940741c25a8989e07a5d7e88
Analyze and fix the following issue in the Linux kernel code: Bluetooth: hci_sync: Fix smatch warning
Problem Details: This fixes the following new warning: net/bluetooth/hci_sync.c:2403 hci_pause_addr_resolution() warn: missing error code? 'err' Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <error27@gmail.com> Link: https://lore.kernel.org/r/202302251952.xryXOegd-lkp@intel.com/ Signed-off...
```diff diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c index 632be1267288..b64af017ab99 100644 --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c @@ -2403,7 +2403,7 @@ static int hci_pause_addr_resolution(struct hci_dev *hdev) /* Return if address resolution is disabled and RPA is not u...
f3948874c340cddb8c6d93d36f35742184d601a7
Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: replace maintainer of FireWire subsystem
Problem Details: In the last few years, I have reviewed patches for FireWire subsystem and requested sound subsystem maintainer to sent them to mainline, since FireWire subsystem maintainer has been long absent. This situation is not preferable since we have some user of sound hardware in IEEE 1394 bus. I will stand f...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index c6545eb54104..5cdf9f81ead6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7954,10 +7954,11 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/nab/lio-core-2.6.git master F: drivers/target/sbp/ FIREWIRE SUBSYSTEM -M: Stefan Richter <stefanr@s5r6.in-berlin.de>...
b5fda08ef213352ac2df7447611eb4d383cce929
Analyze and fix the following issue in the Linux kernel code: ubifs: Fix memleak when insert_old_idx() failed
Problem Details: Following process will cause a memleak for copied up znode: dirty_cow_znode zn = copy_znode(c, znode); err = insert_old_idx(c, zbr->lnum, zbr->offs); if (unlikely(err)) return ERR_PTR(err); // No one refers to zn. Fetch a reproducer in [Link]. Function copy_znode() is split into 2 parts...
```diff diff --git a/fs/ubifs/tnc.c b/fs/ubifs/tnc.c index 2df56bbc6865..6b7d95b65f4b 100644 --- a/fs/ubifs/tnc.c +++ b/fs/ubifs/tnc.c @@ -44,6 +44,33 @@ enum { NOT_ON_MEDIA = 3, }; +static void do_insert_old_idx(struct ubifs_info *c, + struct ubifs_old_idx *old_idx) +{ + struct ubifs_old_idx *o; + struct ...
7d01cb27f6aebc54efbe28d8961a973b8f795b13
Analyze and fix the following issue in the Linux kernel code: Revert "ubifs: dirty_cow_znode: Fix memleak in error handling path"
Problem Details: This reverts commit 122deabfe1428 (ubifs: dirty_cow_znode: Fix memleak in error handling path). After commit 122deabfe1428 applied, if insert_old_idx() failed, old index neither exists in TNC nor in old-index tree. Which means that old index node could be overwritten in layout_leb_in_gaps(), then ubifs...
```diff diff --git a/fs/ubifs/tnc.c b/fs/ubifs/tnc.c index 2469f72eeaab..2df56bbc6865 100644 --- a/fs/ubifs/tnc.c +++ b/fs/ubifs/tnc.c @@ -267,18 +267,11 @@ static struct ubifs_znode *dirty_cow_znode(struct ubifs_info *c, if (zbr->len) { err = insert_old_idx(c, zbr->lnum, zbr->offs); if (unlikely(err)) - /* -...
50d527f52cbf0680c87d11a254383ca730c5c19f
Analyze and fix the following issue in the Linux kernel code: cxl/mem: Add debugfs attributes for poison inject and clear
Problem Details: Inject and Clear Poison commands are optionally supported by CXL memdev devices and are intended for use in debug environments only. Add debugfs attributes for user access. Documentation/ABI/testing/debugfs-cxl describes the usage. Signed-off-by: Alison Schofield <alison.schofield@intel.com> Reviewed...
```diff diff --git a/Documentation/ABI/testing/debugfs-cxl b/Documentation/ABI/testing/debugfs-cxl new file mode 100644 index 000000000000..fe61d372e3fa --- /dev/null +++ b/Documentation/ABI/testing/debugfs-cxl @@ -0,0 +1,35 @@ +What: /sys/kernel/debug/cxl/memX/inject_poison +Date: April, 2023 +KernelVersion: v6.4 +C...
98b6926562d9ccdbca69de9a0e0bf4f90d7f1326
Analyze and fix the following issue in the Linux kernel code: cxl/memdev: Trace inject and clear poison as cxl_poison events
Problem Details: The cxl_poison trace event allows users to view the history of poison list reads. With the addition of inject and clear poison capabilities, users will expect similar tracing. Add trace types 'Inject' and 'Clear' to the cxl_poison trace_event and trace successful operations only. If the driver finds ...
```diff diff --git a/drivers/cxl/core/core.h b/drivers/cxl/core/core.h index deb5f87d6d0a..27f0968449de 100644 --- a/drivers/cxl/core/core.h +++ b/drivers/cxl/core/core.h @@ -71,6 +71,8 @@ void cxl_mbox_init(void); enum cxl_poison_trace_type { CXL_POISON_TRACE_LIST, + CXL_POISON_TRACE_INJECT, + CXL_POISON_TRACE_CL...
0a105ab28a4de44eb738ce64e9ac74946aa5133b
Analyze and fix the following issue in the Linux kernel code: cxl/memdev: Warn of poison inject or clear to a mapped region
Problem Details: Inject and clear poison capabilities and intended for debug usage only. In order to be useful in debug environments, the driver needs to allow inject and clear operations on DPAs mapped in regions. dev_warn_once() when either operation occurs. Signed-off-by: Alison Schofield <alison.schofield@intel.c...
```diff diff --git a/drivers/cxl/core/memdev.c b/drivers/cxl/core/memdev.c index 813fd1eeba3d..40ce74f5500a 100644 --- a/drivers/cxl/core/memdev.c +++ b/drivers/cxl/core/memdev.c @@ -160,6 +160,50 @@ int cxl_trigger_poison_list(struct cxl_memdev *cxlmd) } EXPORT_SYMBOL_NS_GPL(cxl_trigger_poison_list, CXL); +struct ...
9690b07748d18ac667036a68442081c4aea33ba7
Analyze and fix the following issue in the Linux kernel code: cxl/memdev: Add support for the Clear Poison mailbox command
Problem Details: CXL devices optionally support the CLEAR POISON mailbox command. Add memdev driver support for clearing poison. Per the CXL Specification (3.0 8.2.9.8.4.3), after receiving a valid clear poison request, the device removes the address from the device's Poison List and writes 0 (zero) for 64 bytes start...
```diff diff --git a/drivers/cxl/core/memdev.c b/drivers/cxl/core/memdev.c index 8a3b7d7505fe..813fd1eeba3d 100644 --- a/drivers/cxl/core/memdev.c +++ b/drivers/cxl/core/memdev.c @@ -216,6 +216,49 @@ out: } EXPORT_SYMBOL_NS_GPL(cxl_inject_poison, CXL); +int cxl_clear_poison(struct cxl_memdev *cxlmd, u64 dpa) +{ + s...
d2fbc48658022f48625064ae192baff52057987d
Analyze and fix the following issue in the Linux kernel code: cxl/memdev: Add support for the Inject Poison mailbox command
Problem Details: CXL devices optionally support the INJECT POISON mailbox command. Add memdev driver support for the mailbox command. Per the CXL Specification (3.0 8.2.9.8.4.2), after receiving a valid inject poison request, the device will return poison when the address is accessed through the CXL.mem driver. Inject...
```diff diff --git a/drivers/cxl/core/memdev.c b/drivers/cxl/core/memdev.c index 185b6d27b698..8a3b7d7505fe 100644 --- a/drivers/cxl/core/memdev.c +++ b/drivers/cxl/core/memdev.c @@ -160,6 +160,62 @@ int cxl_trigger_poison_list(struct cxl_memdev *cxlmd) } EXPORT_SYMBOL_NS_GPL(cxl_trigger_poison_list, CXL); +static ...
7e8472c820f04517ae5d5a27c1aecfa2263a0aa5
Analyze and fix the following issue in the Linux kernel code: media: Adjust column width for pdfdocs
Problem Details: The column width specifiers added in commit 8d0e3fc61abd ("media: Add 2-10-10-10 RGB formats") don't suffice for column 1 and too wide for column 2. Adjust them to get a good looking table. Fixes: 8d0e3fc61abd ("media: Add 2-10-10-10 RGB formats") Cc: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> ...
```diff diff --git a/Documentation/userspace-api/media/v4l/pixfmt-rgb.rst b/Documentation/userspace-api/media/v4l/pixfmt-rgb.rst index ea545ed1aeaa..d9d7b7621d8c 100644 --- a/Documentation/userspace-api/media/v4l/pixfmt-rgb.rst +++ b/Documentation/userspace-api/media/v4l/pixfmt-rgb.rst @@ -778,7 +778,7 @@ number of bit...
fc623d89b4c404f2dea917d00eba2111f3c1bc15
Analyze and fix the following issue in the Linux kernel code: media: Fix building pdfdocs
Problem Details: Commit 8d0e3fc61abd ("media: Add 2-10-10-10 RGB formats") added documentation for a few new RGB formats. The table has column-width specifiers for 34 columns used in pdfdocs build. However, the new table has a couple of rows with 35 columns which confused Sphinx's latex builder. The resulting .tex fil...
```diff diff --git a/Documentation/userspace-api/media/v4l/pixfmt-rgb.rst b/Documentation/userspace-api/media/v4l/pixfmt-rgb.rst index d330aeb4d3eb..ea545ed1aeaa 100644 --- a/Documentation/userspace-api/media/v4l/pixfmt-rgb.rst +++ b/Documentation/userspace-api/media/v4l/pixfmt-rgb.rst @@ -868,7 +868,6 @@ number of bit...
0bcf2e4aca6c29a07555b713f2fb461dc38d5977
Analyze and fix the following issue in the Linux kernel code: net: dsa: tag_ocelot: call only the relevant portion of __skb_vlan_pop() on TX
Problem Details: ocelot_xmit_get_vlan_info() calls __skb_vlan_pop() as the most appropriate helper I could find which strips away a VLAN header. That's all I need it to do, but __skb_vlan_pop() has more logic, which will become incompatible with the future revert of commit 6d1ccff62780 ("net: reset mac header in dev_st...
```diff diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 3698f2b391cd..0f40f379d75c 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h @@ -685,6 +685,27 @@ static inline void vlan_set_encap_proto(struct sk_buff *skb, skb->protocol = htons(ETH_P_802_2); } +/** + * vlan_remove_ta...
fadfc57cc8047080a123b16f288b7138524fb1e2
Analyze and fix the following issue in the Linux kernel code: rxrpc: Fix error when reading rxrpc tokens
Problem Details: When converting from ASSERTCMP to WARN_ON, the tested condition must be inverted, which was missed for this case. This would cause an EIO error when trying to read an rxrpc token, for instance when trying to display tokens with AuriStor's "tokens" command. Fixes: 84924aac08a4 ("rxrpc: Fix checker war...
```diff diff --git a/net/rxrpc/key.c b/net/rxrpc/key.c index 8d53aded09c4..33e8302a79e3 100644 --- a/net/rxrpc/key.c +++ b/net/rxrpc/key.c @@ -680,7 +680,7 @@ static long rxrpc_read(const struct key *key, return -ENOPKG; } - if (WARN_ON((unsigned long)xdr - (unsigned long)oldxdr == + if (WARN_ON((unsigned lo...
b148b9abc8444c9e0579a6bbe47b2da6adf5a150
Analyze and fix the following issue in the Linux kernel code: net: ethernet: mediatek: remove return value check of `mtk_wed_hw_add_debugfs`
Problem Details: Smatch complains that: mtk_wed_hw_add_debugfs() warn: 'dir' is an error pointer or valid Debugfs checks are generally not supposed to be checked for errors and it is not necessary here. fix it by just deleting the dead code. Signed-off-by: Wang Zhang <silver_code@hust.edu.cn> Reviewed-by: Dongliang ...
```diff diff --git a/drivers/net/ethernet/mediatek/mtk_wed_debugfs.c b/drivers/net/ethernet/mediatek/mtk_wed_debugfs.c index 56f663439721..b244c02c5b51 100644 --- a/drivers/net/ethernet/mediatek/mtk_wed_debugfs.c +++ b/drivers/net/ethernet/mediatek/mtk_wed_debugfs.c @@ -252,8 +252,6 @@ void mtk_wed_hw_add_debugfs(struc...
4eaeca1fc43a4060fa79d7a071572e89181a725e
Analyze and fix the following issue in the Linux kernel code: net: mtk_eth_soc: mediatek: fix ppe flow accounting for v1 hardware
Problem Details: Older chips (like MT7622) use a different bit in ib2 to enable hardware counter support. Add macros for both and select the appropriate bit. Fixes: 3fbe4d8c0e53 ("net: ethernet: mtk_eth_soc: ppe: add support for flow accounting") Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Daniel Golle ...
```diff diff --git a/drivers/net/ethernet/mediatek/mtk_ppe.c b/drivers/net/ethernet/mediatek/mtk_ppe.c index dd9581334b05..9129821f3ab8 100644 --- a/drivers/net/ethernet/mediatek/mtk_ppe.c +++ b/drivers/net/ethernet/mediatek/mtk_ppe.c @@ -601,6 +601,7 @@ __mtk_foe_entry_commit(struct mtk_ppe *ppe, struct mtk_foe_entry ...
9cedc5e89a59da72bfecdb76bfaa5a28a273029d
Analyze and fix the following issue in the Linux kernel code: kbuild: use proper prefix for tarballs to fix rpm-pkg build error
Problem Details: Since commit f8d94c4e403c ("kbuild: do not create intermediate *.tar for source tarballs"), 'make rpm-pkg' fails because the prefix of the source tarball is 'linux.tar/' instead of 'linux/'. $(basename $@) strips only '.gz' from the filename linux.tar.gz. You need to strip two suffixes from compressed...
```diff diff --git a/scripts/Makefile.package b/scripts/Makefile.package index 4d90691505b1..4000ad04c122 100644 --- a/scripts/Makefile.package +++ b/scripts/Makefile.package @@ -49,7 +49,7 @@ git-config-tar.zst = -c tar.tar.zst.command="$(ZSTD)" quiet_cmd_archive = ARCHIVE $@ cmd_archive = git -C $(srctree) ...
8b824220bd6641976676ae7a1e925db63eb89c4b
Analyze and fix the following issue in the Linux kernel code: kbuild: deb-pkg: Fix a spell typo in mkdebian script
Problem Details: Signed-off-by: Woody Suwalski <terraluna977@gmail.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
```diff diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian index a4c2c2276223..74b83c9ae0a8 100755 --- a/scripts/package/mkdebian +++ b/scripts/package/mkdebian @@ -190,7 +190,7 @@ EOF # Generate copyright file cat <<EOF > debian/copyright -This is a packacked upstream version of the Linux kernel. +Th...
14a2956539b0620d3b7369af75ddc73f18852835
Analyze and fix the following issue in the Linux kernel code: ALSA: emu10k1: fix error handling in snd_audigy_i2c_volume_put()
Problem Details: Check all inputs before changing anything, and return the right error code in case of failure. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230422161021.1144026-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c index 3d2ed5e0a59d..8fce3413f4ae 100644 --- a/sound/pci/emu10k1/emumixer.c +++ b/sound/pci/emu10k1/emumixer.c @@ -1006,7 +1006,7 @@ static int snd_audigy_i2c_volume_put(struct snd_kcontrol *kcontrol, { struct snd_emu10k1 *emu = snd_kcon...
375052892172c741b93e8e9303ec186cca7169ab
Analyze and fix the following issue in the Linux kernel code: ALSA: emu10k1: fix SNDRV_EMU10K1_IOCTL_SINGLE_STEP
Problem Details: - Use correct address limit for Audigy - Use the right constant to actually make a step on Audigy - Don't store *_DBG_STEP and the address in emu->fx8010.dbg, as otherwise unrelated operations would make steps, too This is untested. as10k1 was never ported to Audigy anyway. Signed-off-by: Oswald Bu...
```diff diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c index 510b776f856d..355e3bde6132 100644 --- a/sound/pci/emu10k1/emufx.c +++ b/sound/pci/emu10k1/emufx.c @@ -2650,17 +2650,19 @@ static int snd_emu10k1_fx8010_ioctl(struct snd_hwdep * hw, struct file *file, un return -EPERM; if (get_user(a...
2696d5a3b0ec9f242b0220999933b6c78502b1b2
Analyze and fix the following issue in the Linux kernel code: ALSA: emu10k1: fixup DSP defines
Problem Details: Firstly, fix the distribution between public and private headers. Otherwise, some of the already public macros wouldn't actually work, and the SNDRV_EMU10K1_IOCTL_DBG_READ result for Audigy would be useless. Secondly, add condition code registers for Audigy. These are just aliases for selected constan...
```diff diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h index 0d288cc618c1..5958cae819fd 100644 --- a/include/sound/emu10k1.h +++ b/include/sound/emu10k1.h @@ -704,18 +704,15 @@ #define GPSCS 0x51 /* General Purpose SPDIF channel status register */ +// Corresponding EMU10K1_DBG_* constants are in...
6815f5359aa5d02d1a936221812ab46624c39283
Analyze and fix the following issue in the Linux kernel code: ALSA: emu10k1: fix lineup of EMU_HANA_* defines
Problem Details: The bit values are supposed to be internally indented by one step relative to the register addresses. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230422161021.1143903-3-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h index 7786d5807679..35a60bdcf641 100644 --- a/include/sound/emu10k1.h +++ b/include/sound/emu10k1.h @@ -1072,34 +1072,34 @@ #define EMU_HANA_DOCK_LEDS_3_MANUAL_SIGNAL 0x20 /* Manual Signal detection */ #define EMU_HANA_ADC_PADS 0x10 /* 0000xxx ...
faca6aaa4838c3c234caa619d3c7d1f09da0d303
Analyze and fix the following issue in the Linux kernel code: drm/i915/mtl: fix mocs selftest
Problem Details: Media GT has a different base for MOCS register, need to apply gsi_offset to the mmio address if not using the intel_uncore_r/w functions for register access. Cc: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Fei Yang <fei.yang@intel.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Sig...
```diff diff --git a/drivers/gpu/drm/i915/gt/selftest_mocs.c b/drivers/gpu/drm/i915/gt/selftest_mocs.c index ca009a6a13bd..a8446ab82501 100644 --- a/drivers/gpu/drm/i915/gt/selftest_mocs.c +++ b/drivers/gpu/drm/i915/gt/selftest_mocs.c @@ -131,13 +131,14 @@ static int read_mocs_table(struct i915_request *rq, cons...
3db166d6cf0ea73dd2c887036aad2e95e0884d9b
Analyze and fix the following issue in the Linux kernel code: cxl/mbox: Deprecate poison commands
Problem Details: The CXL subsystem is adding formal mechanisms for managing device poison. Minimize the maintenance burden going forward, and maximize the investment in common tooling by deprecating direct user access to poison commands outside of CXL_MEM_RAW_COMMANDS debug scenarios. A new cxl_deprecated_commands[] l...
```diff diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c index f2addb457172..938cff2c948e 100644 --- a/drivers/cxl/core/mbox.c +++ b/drivers/cxl/core/mbox.c @@ -61,12 +61,7 @@ static struct cxl_mem_command cxl_mem_commands[CXL_MEM_COMMAND_ID_MAX] = { CXL_CMD(SET_ALERT_CONFIG, 0xc, 0, 0), CXL_CMD(GET_S...
95b5baf81001a80a8dd8b35306694db163bcb423
Analyze and fix the following issue in the Linux kernel code: MIPS: Mark check_bugs() as __init
Problem Details: After commit ac7c3e4ff401 ("compiler: enable CONFIG_OPTIMIZE_INLINING forcibly"), a compiler may choose not to inline a function marked with just 'inline'. If check_bugs() is not inlined into start_kernel(), which occurs when building with clang after commit 9ea7e6b62c2b ("init: Mark [arch_call_]rest_i...
```diff diff --git a/arch/mips/include/asm/bugs.h b/arch/mips/include/asm/bugs.h index d72dc6e1cf3c..047e14227c45 100644 --- a/arch/mips/include/asm/bugs.h +++ b/arch/mips/include/asm/bugs.h @@ -30,7 +30,7 @@ static inline void check_bugs_early(void) check_bugs64_early(); } -static inline void check_bugs(void) +s...
267214a2319b5692bbc9b128a6514960291dcca8
Analyze and fix the following issue in the Linux kernel code: cxl/port: Fix port to pci device assumptions in read_cdat_data()
Problem Details: Not all endpoint CXL ports are associated with PCI devices. The cxl_test infrastructure models 'struct cxl_port' instances hosted by platform devices. Teach read_cdat_data() to be careful about non-pci hosted cxl_memdev instances. Otherwise, cxl_test crashes with this signature: RIP: 0010:xas_start+0...
```diff diff --git a/drivers/cxl/core/pci.c b/drivers/cxl/core/pci.c index 25b7e8125d5d..bdbd907884ce 100644 --- a/drivers/cxl/core/pci.c +++ b/drivers/cxl/core/pci.c @@ -536,17 +536,18 @@ static int cxl_cdat_read_table(struct device *dev, */ void read_cdat_data(struct cxl_port *port) { - struct pci_doe_mb *cdat_do...
6fb861bb3caf2ca8e440f7a3fdcca35fcac917b4
Analyze and fix the following issue in the Linux kernel code: ALSA: emu10k1: fix snd_emu1010_fpga_read() input masking for rev2 cards
Problem Details: Unlike the Alice2 chips used on 1st generation E-MU cards, the Tina/Tina2 chips used on the 2nd gen cards have only six GPIN pins, which means that we need to use a smaller mask. Failure to do so would falsify the read data if the FPGA tried to raise an IRQ right at that moment. This wasn't a problem s...
```diff diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h index f21441cda6b9..790dedd42340 100644 --- a/include/sound/emu10k1.h +++ b/include/sound/emu10k1.h @@ -252,7 +252,8 @@ #define MUSTAT_ORDYN 0x40 /* 0 = MUDATA can accept a command or data */ #define A_GPIO 0x18 /* GPIO on Audigy card (16bi...
6d26d985eeda89faedabbcf6607c37454b9691b0
Analyze and fix the following issue in the Linux kernel code: bpf: fix link failure with NETFILTER=y INET=n
Problem Details: Explicitly check if NETFILTER_BPF_LINK is enabled, else configs that have NETFILTER=y but CONFIG_INET=n fail to link: > kernel/bpf/syscall.o: undefined reference to `netfilter_prog_ops' > kernel/bpf/verifier.o: undefined reference to `netfilter_verifier_ops' Fixes: fd9c663b9ad6 ("bpf: minimal support...
```diff diff --git a/include/linux/bpf_types.h b/include/linux/bpf_types.h index 39a999abb0ce..fc0d6f32c687 100644 --- a/include/linux/bpf_types.h +++ b/include/linux/bpf_types.h @@ -79,7 +79,7 @@ BPF_PROG_TYPE(BPF_PROG_TYPE_LSM, lsm, #endif BPF_PROG_TYPE(BPF_PROG_TYPE_SYSCALL, bpf_syscall, void *, void *) -#...
e0416e7d33361d2ad0bf9f007428346579ac854a
Analyze and fix the following issue in the Linux kernel code: rxrpc: Fix potential race in error handling in afs_make_call()
Problem Details: If the rxrpc call set up by afs_make_call() receives an error whilst it is transmitting the request, there's the possibility that it may get to the point the rxrpc call is ended (after the error_kill_call label) just as the call is queued for async processing. This could manifest itself as call->rxcal...
```diff diff --git a/Documentation/networking/rxrpc.rst b/Documentation/networking/rxrpc.rst index ec1323d92c96..e807e18ba32a 100644 --- a/Documentation/networking/rxrpc.rst +++ b/Documentation/networking/rxrpc.rst @@ -848,14 +848,21 @@ The kernel interface functions are as follows: returned. The caller now hold...
bd858e494ceb3aac25bab9c6639f4cd764f534ba
Analyze and fix the following issue in the Linux kernel code: watchdog: menz069_wdt: fix timeout setting
Problem Details: When setting the timeout for the menz069_wdt watchdog driver, we erroneously read from the 'watchdog value register' (WVR) instead of the 'watchdog timer register' (WTR) and then write the value back into WTR. This can potentially lead to wrong timeouts and wrong enable bit settings. Signed-off-by: J...
```diff diff --git a/drivers/watchdog/menz69_wdt.c b/drivers/watchdog/menz69_wdt.c index bca0938f3429..3c98030b9fcd 100644 --- a/drivers/watchdog/menz69_wdt.c +++ b/drivers/watchdog/menz69_wdt.c @@ -77,7 +77,7 @@ static int men_z069_wdt_set_timeout(struct watchdog_device *wdt, wdt->timeout = timeout; val = timeout ...
87b22656ca6a896d0378e9e60ffccb0c82f48b08
Analyze and fix the following issue in the Linux kernel code: watchdog: menz069_wdt: fix watchdog initialisation
Problem Details: Doing a 'cat /dev/watchdog0' with menz069_wdt as watchdog0 will result in a NULL pointer dereference. This happens because we're passing the wrong pointer to watchdog_register_device(). Fix this by getting rid of the static watchdog_device structure and use the one embedded into the driver's per-insta...
```diff diff --git a/drivers/watchdog/menz69_wdt.c b/drivers/watchdog/menz69_wdt.c index 8973f98bc6a5..bca0938f3429 100644 --- a/drivers/watchdog/menz69_wdt.c +++ b/drivers/watchdog/menz69_wdt.c @@ -98,14 +98,6 @@ static const struct watchdog_ops men_z069_ops = { .set_timeout = men_z069_wdt_set_timeout, }; -static...
99e5acae193e369b71217efe6f1dad42f3f18815
Analyze and fix the following issue in the Linux kernel code: ipv4: Fix potential uninit variable access bug in __ip_make_skb()
Problem Details: Like commit ea30388baebc ("ipv6: Fix an uninit variable access bug in __ip6_make_skb()"). icmphdr does not in skb linear region under the scenario of SOCK_RAW socket. Access icmp_hdr(skb)->type directly will trigger the uninit variable access bug. Use a local variable icmp_type to carry the correct va...
```diff diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 4e4e308c3230..89bd7872c629 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -1570,9 +1570,19 @@ struct sk_buff *__ip_make_skb(struct sock *sk, cork->dst = NULL; skb_dst_set(skb, &rt->dst); - if (iph->protocol == IPPROTO_ICMP) - ...
0ea0a825192efdd44af4c016faaab1a3d2073c78
Analyze and fix the following issue in the Linux kernel code: watchdog: imx2_wdg: Declare local symbols static
Problem Details: 0-day complains: drivers/watchdog/imx2_wdt.c:442:22: sparse: symbol 'imx_wdt' was not declared. Should it be static? drivers/watchdog/imx2_wdt.c:446:22: sparse: symbol 'imx_wdt_legacy' was not declared. Should it be static? Declare as static variables. Fixes: e42c73f1ef0d ("watchdog: imx2_wdg: sus...
```diff diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c index 19ab7b3d286b..6fcc3596103c 100644 --- a/drivers/watchdog/imx2_wdt.c +++ b/drivers/watchdog/imx2_wdt.c @@ -439,11 +439,11 @@ static int __maybe_unused imx2_wdt_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(imx2_wdt_pm_ops, imx2_w...
a1c87c0b27059b4155c7aba6b34810c889e8b6a9
Analyze and fix the following issue in the Linux kernel code: ALSA: emu10k1: fix access to Audigy GPIO port
Problem Details: As the register definition clearly states, this is a 16-bit register, yet we did all accesses as 32-bit. The writes in particular would have the potential to clear the TIMER register (depending on how the bus/card actually handles the too long writes). This commit also introduces a separate define A_G...
```diff diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h index 00c2d8cd5a8d..89dbd2e93410 100644 --- a/include/sound/emu10k1.h +++ b/include/sound/emu10k1.h @@ -251,11 +251,16 @@ #define MUSTAT_IRDYN 0x80 /* 0 = MIDI data or command ACK */ #define MUSTAT_ORDYN 0x40 /* 0 = MUDATA can accept a comma...
418a73074da9182f571e467eaded03ea501f3281
Analyze and fix the following issue in the Linux kernel code: net: dst: fix missing initialization of rt_uncached
Problem Details: xfrm_alloc_dst() followed by xfrm4_dst_destroy(), without a xfrm4_fill_dst() call in between, causes the following BUG: BUG: spinlock bad magic on CPU#0, fbxhostapd/732 lock: 0x890b7668, .magic: 890b7668, .owner: <none>/-1, .owner_cpu: 0 CPU: 0 PID: 732 Comm: fbxhostapd Not tainted 6.3.0-rc6-next-...
```diff diff --git a/net/core/dst.c b/net/core/dst.c index 3247e84045ca..79d9306ad1ee 100644 --- a/net/core/dst.c +++ b/net/core/dst.c @@ -67,6 +67,7 @@ void dst_init(struct dst_entry *dst, struct dst_ops *ops, #endif dst->lwtstate = NULL; rcuref_init(&dst->__rcuref, initial_ref); + INIT_LIST_HEAD(&dst->rt_uncache...
33c1af8e2c75ab601524e25efeeed0173d703ce7
Analyze and fix the following issue in the Linux kernel code: net: dsa: qca8k: fix LEDS_CLASS dependency
Problem Details: With LEDS_CLASS=m, a built-in qca8k driver fails to link: arm-linux-gnueabi-ld: drivers/net/dsa/qca/qca8k-leds.o: in function `qca8k_setup_led_ctrl': qca8k-leds.c:(.text+0x1ea): undefined reference to `devm_led_classdev_register_ext' Change the dependency to avoid the broken configuration. Fixes: 1e...
```diff diff --git a/drivers/net/dsa/qca/Kconfig b/drivers/net/dsa/qca/Kconfig index 7a86d6d6a246..4347b42c50fd 100644 --- a/drivers/net/dsa/qca/Kconfig +++ b/drivers/net/dsa/qca/Kconfig @@ -19,7 +19,7 @@ config NET_DSA_QCA8K config NET_DSA_QCA8K_LEDS_SUPPORT bool "Qualcomm Atheros QCA8K Ethernet switch family LEDs ...
2cc8a008d62f3c04eeb7ec6fe59e542802bb8df3
Analyze and fix the following issue in the Linux kernel code: net/sched: cls_api: Initialize miss_cookie_node when action miss is not used
Problem Details: Function tcf_exts_init_ex() sets exts->miss_cookie_node ptr only when use_action_miss is true so it assumes in other case that the field is set to NULL by the caller. If not then the field contains garbage and subsequent tcf_exts_destroy() call results in a crash. Ensure that the field .miss_cookie_nod...
```diff diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 35785a36c802..3c3629c9e7b6 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -3211,6 +3211,7 @@ int tcf_exts_init_ex(struct tcf_exts *exts, struct net *net, int action, #ifdef CONFIG_NET_CLS_ACT exts->type = 0; exts->nr_actions = 0; +...
6aa445e39693bff9c98b12f960e66b4e18c7378b
Analyze and fix the following issue in the Linux kernel code: net/handshake: Fix section mismatch in handshake_exit
Problem Details: If CONFIG_NET_NS=n (e.g. m68k/defconfig): WARNING: modpost: vmlinux.o: section mismatch in reference: handshake_exit (section: .exit.text) -> handshake_genl_net_ops (section: .init.data) ERROR: modpost: Section mismatches detected. Fix this by dropping the __net_initdata tag from handshake_ge...
```diff diff --git a/net/handshake/netlink.c b/net/handshake/netlink.c index 8ea0ff993f9f..35c9c445e0b8 100644 --- a/net/handshake/netlink.c +++ b/net/handshake/netlink.c @@ -249,7 +249,7 @@ static void __net_exit handshake_net_exit(struct net *net) } } -static struct pernet_operations __net_initdata handshake_gen...
7041101ff6c3073fd8f2e99920f535b111c929cb
Analyze and fix the following issue in the Linux kernel code: net/sched: sch_fq: fix integer overflow of "credit"
Problem Details: if sch_fq is configured with "initial quantum" having values greater than INT_MAX, the first assignment of "credit" does signed integer overflow to a very negative value. In this situation, the syzkaller script provided by Cristoph triggers the CPU soft-lockup warning even with few sockets. It's not an...
```diff diff --git a/net/sched/sch_fq.c b/net/sched/sch_fq.c index 48d14fb90ba0..f59a2cb2c803 100644 --- a/net/sched/sch_fq.c +++ b/net/sched/sch_fq.c @@ -779,13 +779,17 @@ static int fq_resize(struct Qdisc *sch, u32 log) return 0; } +static struct netlink_range_validation iq_range = { + .max = INT_MAX, +}; + sta...
63cfd210034c772fad047afa13dd5a4664b0a72e
Analyze and fix the following issue in the Linux kernel code: nfp: fix incorrect pointer deference when offloading IPsec with bonding
Problem Details: There are two pointers in struct xfrm_dev_offload, *dev, *real_dev. The *dev points whether bonding interface or real interface, if bonding IPsec offload is used, it points bonding interface; if not, it points real interface. And *real_dev always points real interface. So nfp should always use real_dev...
```diff diff --git a/drivers/net/ethernet/netronome/nfp/crypto/ipsec.c b/drivers/net/ethernet/netronome/nfp/crypto/ipsec.c index c0dcce8ae437..b1f026b81dea 100644 --- a/drivers/net/ethernet/netronome/nfp/crypto/ipsec.c +++ b/drivers/net/ethernet/netronome/nfp/crypto/ipsec.c @@ -269,7 +269,7 @@ static void set_sha2_512h...
461bb5b97049a149278f2c27a3aa12af16da6a2e
Analyze and fix the following issue in the Linux kernel code: net: dpaa: Fix uninitialized variable in dpaa_stop()
Problem Details: The return value is not initialized on the success path. Fixes: 901bdff2f529 ("net: fman: Change return type of disable to void") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Acked-by: Madalin Bucur <madalin.bucur@oss.nxp.com> Reviewed-by: Sean Anderson <sean.anderson@seco.com> Link: https:...
```diff diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c index 9318a2554056..f96196617121 100644 --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c @@ -299,7 +299,8 @@ static int dpaa_stop(struct net_devic...
210ffe4a74caead4d6790747d32b63c6152c70b7
Analyze and fix the following issue in the Linux kernel code: ipvs: Remove {Enter,Leave}Function
Problem Details: Remove EnterFunction and LeaveFunction. These debugging macros seem well past their use-by date. And seem to have little value these days. Removing them allows some trivial cleanup of some exit paths for some functions. These are also included in this patch. There is likely scope for further cleanup ...
```diff diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index e20f1f92066d..a3adc246ee31 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h @@ -265,26 +265,6 @@ static inline const char *ip_vs_dbg_addr(int af, char *buf, size_t buf_len, pr_err(msg, ##__VA_ARGS__); \ } while (0) -#ifdef CONFIG_I...
e3478c68f6704638d08f437cbc552ca5970c151a
Analyze and fix the following issue in the Linux kernel code: ipvs: Update width of source for ip_vs_sync_conn_options
Problem Details: In ip_vs_sync_conn_v0() copy is made to struct ip_vs_sync_conn_options. That structure looks like this: struct ip_vs_sync_conn_options { struct ip_vs_seq in_seq; struct ip_vs_seq out_seq; }; The source of the copy is the in_seq field of struct ip_vs_conn. Whose type is ...
```diff diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 6d71a5ff52df..e20f1f92066d 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h @@ -630,8 +630,10 @@ struct ip_vs_conn { */ struct ip_vs_app *app; /* bound ip_vs_app object */ void *app_data; /* Ap...