Commit graph

3240 commits

Author SHA1 Message Date
Aurelien Jarno
326dc928ad Revert "mmc: dw_mmc: Fix IDMAC operation with pages bigger than 4K"
commit 1635e407a4a64d08a8517ac59ca14ad4fc785e75 upstream.

The commit 8396c793ffdf ("mmc: dw_mmc: Fix IDMAC operation with pages
bigger than 4K") increased the max_req_size, even for 4K pages, causing
various issues:
- Panic booting the kernel/rootfs from an SD card on Rockchip RK3566
- Panic booting the kernel/rootfs from an SD card on StarFive JH7100
- "swiotlb buffer is full" and data corruption on StarFive JH7110

At this stage no fix have been found, so it's probably better to just
revert the change.

This reverts commit 8396c793ffdf28bb8aee7cfe0891080f8cab7890.

Cc: stable@vger.kernel.org
Cc: Sam Protsenko <semen.protsenko@linaro.org>
Fixes: 8396c793ffdf ("mmc: dw_mmc: Fix IDMAC operation with pages bigger than 4K")
Closes: https://lore.kernel.org/linux-mmc/614692b4-1dbe-31b8-a34d-cb6db1909bb7@w6rz.net/
Closes: https://lore.kernel.org/linux-mmc/CAC8uq=Ppnmv98mpa1CrWLawWoPnu5abtU69v-=G-P7ysATQ2Pw@mail.gmail.com/
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Message-ID: <20241110114700.622372-1-aurelien@aurel32.net>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-17 13:20:51 +01:00
Si-Wei Liu
c33bc7efd1 vdpa/mlx5: Fix PA offset with unaligned starting iotlb map
commit 29ce8b8a4fa74e841342c8b8f8941848a3c6f29f upstream.

When calculating the physical address range based on the iotlb and mr
[start,end) ranges, the offset of mr->start relative to map->start
is not taken into account. This leads to some incorrect and duplicate
mappings.

For the case when mr->start < map->start the code is already correct:
the range in [mr->start, map->start) was handled by a different
iteration.

Fixes: 94abbccdf291 ("vdpa/mlx5: Add shared memory registration code")
Cc: stable@vger.kernel.org
Signed-off-by: Si-Wei Liu <si-wei.liu@oracle.com>
Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
Message-Id: <20241021134040.975221-2-dtatulea@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-17 13:20:50 +01:00
Dragos Tatulea
391cc3c9c7 net/mlx5e: kTLS, Fix incorrect page refcounting
[ Upstream commit dd6e972cc5890d91d6749bb48e3912721c4e4b25 ]

The kTLS tx handling code is using a mix of get_page() and
page_ref_inc() APIs to increment the page reference. But on the release
path (mlx5e_ktls_tx_handle_resync_dump_comp()), only put_page() is used.

This is an issue when using pages from large folios: the get_page()
references are stored on the folio page while the page_ref_inc()
references are stored directly in the given page. On release the folio
page will be dereferenced too many times.

This was found while doing kTLS testing with sendfile() + ZC when the
served file was read from NFS on a kernel with NFS large folios support
(commit 49b29a573da8 ("nfs: add support for large folios")).

Fixes: 84d1bb2b139e ("net/mlx5e: kTLS, Limit DUMP wqe size")
Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20241107183527.676877-5-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-17 13:20:50 +01:00
Mark Bloch
664ac69e67 net/mlx5: fs, lock FTE when checking if active
[ Upstream commit 9ca314419930f9135727e39d77e66262d5f7bef6 ]

The referenced commits introduced a two-step process for deleting FTEs:

- Lock the FTE, delete it from hardware, set the hardware deletion function
  to NULL and unlock the FTE.
- Lock the parent flow group, delete the software copy of the FTE, and
  remove it from the xarray.

However, this approach encounters a race condition if a rule with the same
match value is added simultaneously. In this scenario, fs_core may set the
hardware deletion function to NULL prematurely, causing a panic during
subsequent rule deletions.

To prevent this, ensure the active flag of the FTE is checked under a lock,
which will prevent the fs_core layer from attaching a new steering rule to
an FTE that is in the process of deletion.

[  438.967589] MOSHE: 2496 mlx5_del_flow_rules del_hw_func
[  438.968205] ------------[ cut here ]------------
[  438.968654] refcount_t: decrement hit 0; leaking memory.
[  438.969249] WARNING: CPU: 0 PID: 8957 at lib/refcount.c:31 refcount_warn_saturate+0xfb/0x110
[  438.970054] Modules linked in: act_mirred cls_flower act_gact sch_ingress openvswitch nsh mlx5_vdpa vringh vhost_iotlb vdpa mlx5_ib mlx5_core xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xt_addrtype iptable_nat nf_nat br_netfilter rpcsec_gss_krb5 auth_rpcgss oid_registry overlay rpcrdma rdma_ucm ib_iser libiscsi scsi_transport_iscsi ib_umad rdma_cm ib_ipoib iw_cm ib_cm ib_uverbs ib_core zram zsmalloc fuse [last unloaded: cls_flower]
[  438.973288] CPU: 0 UID: 0 PID: 8957 Comm: tc Not tainted 6.12.0-rc1+ #8
[  438.973888] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
[  438.974874] RIP: 0010:refcount_warn_saturate+0xfb/0x110
[  438.975363] Code: 40 66 3b 82 c6 05 16 e9 4d 01 01 e8 1f 7c a0 ff 0f 0b c3 cc cc cc cc 48 c7 c7 10 66 3b 82 c6 05 fd e8 4d 01 01 e8 05 7c a0 ff <0f> 0b c3 cc cc cc cc 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 90
[  438.976947] RSP: 0018:ffff888124a53610 EFLAGS: 00010286
[  438.977446] RAX: 0000000000000000 RBX: ffff888119d56de0 RCX: 0000000000000000
[  438.978090] RDX: ffff88852c828700 RSI: ffff88852c81b3c0 RDI: ffff88852c81b3c0
[  438.978721] RBP: ffff888120fa0e88 R08: 0000000000000000 R09: ffff888124a534b0
[  438.979353] R10: 0000000000000001 R11: 0000000000000001 R12: ffff888119d56de0
[  438.979979] R13: ffff888120fa0ec0 R14: ffff888120fa0ee8 R15: ffff888119d56de0
[  438.980607] FS:  00007fe6dcc0f800(0000) GS:ffff88852c800000(0000) knlGS:0000000000000000
[  438.983984] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  438.984544] CR2: 00000000004275e0 CR3: 0000000186982001 CR4: 0000000000372eb0
[  438.985205] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  438.985842] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  438.986507] Call Trace:
[  438.986799]  <TASK>
[  438.987070]  ? __warn+0x7d/0x110
[  438.987426]  ? refcount_warn_saturate+0xfb/0x110
[  438.987877]  ? report_bug+0x17d/0x190
[  438.988261]  ? prb_read_valid+0x17/0x20
[  438.988659]  ? handle_bug+0x53/0x90
[  438.989054]  ? exc_invalid_op+0x14/0x70
[  438.989458]  ? asm_exc_invalid_op+0x16/0x20
[  438.989883]  ? refcount_warn_saturate+0xfb/0x110
[  438.990348]  mlx5_del_flow_rules+0x2f7/0x340 [mlx5_core]
[  438.990932]  __mlx5_eswitch_del_rule+0x49/0x170 [mlx5_core]
[  438.991519]  ? mlx5_lag_is_sriov+0x3c/0x50 [mlx5_core]
[  438.992054]  ? xas_load+0x9/0xb0
[  438.992407]  mlx5e_tc_rule_unoffload+0x45/0xe0 [mlx5_core]
[  438.993037]  mlx5e_tc_del_fdb_flow+0x2a6/0x2e0 [mlx5_core]
[  438.993623]  mlx5e_flow_put+0x29/0x60 [mlx5_core]
[  438.994161]  mlx5e_delete_flower+0x261/0x390 [mlx5_core]
[  438.994728]  tc_setup_cb_destroy+0xb9/0x190
[  438.995150]  fl_hw_destroy_filter+0x94/0xc0 [cls_flower]
[  438.995650]  fl_change+0x11a4/0x13c0 [cls_flower]
[  438.996105]  tc_new_tfilter+0x347/0xbc0
[  438.996503]  ? ___slab_alloc+0x70/0x8c0
[  438.996929]  rtnetlink_rcv_msg+0xf9/0x3e0
[  438.997339]  ? __netlink_sendskb+0x4c/0x70
[  438.997751]  ? netlink_unicast+0x286/0x2d0
[  438.998171]  ? __pfx_rtnetlink_rcv_msg+0x10/0x10
[  438.998625]  netlink_rcv_skb+0x54/0x100
[  438.999020]  netlink_unicast+0x203/0x2d0
[  438.999421]  netlink_sendmsg+0x1e4/0x420
[  438.999820]  __sock_sendmsg+0xa1/0xb0
[  439.000203]  ____sys_sendmsg+0x207/0x2a0
[  439.000600]  ? copy_msghdr_from_user+0x6d/0xa0
[  439.001072]  ___sys_sendmsg+0x80/0xc0
[  439.001459]  ? ___sys_recvmsg+0x8b/0xc0
[  439.001848]  ? generic_update_time+0x4d/0x60
[  439.002282]  __sys_sendmsg+0x51/0x90
[  439.002658]  do_syscall_64+0x50/0x110
[  439.003040]  entry_SYSCALL_64_after_hwframe+0x76/0x7e

Fixes: 718ce4d601db ("net/mlx5: Consolidate update FTE for all removal changes")
Fixes: cefc23554fc2 ("net/mlx5: Fix FTE cleanup")
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Reviewed-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20241107183527.676877-4-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-17 13:20:50 +01:00
Gabor Juhos
ca185b2a86 clk: qcom: gcc-qcs404: fix initial rate of GPLL3
commit 36d202241d234fa4ac50743510d098ad52bd193a upstream.

The comment before the config of the GPLL3 PLL says that the
PLL should run at 930 MHz. In contrary to this, calculating
the frequency from the current configuration values by using
19.2 MHz as input frequency defined in 'qcs404.dtsi', it gives
921.6 MHz:

  $ xo=19200000; l=48; alpha=0x0; alpha_hi=0x0
  $ echo "$xo * ($((l)) + $(((alpha_hi << 32 | alpha) >> 8)) / 2^32)" | bc -l
  921600000.00000000000000000000

Set 'alpha_hi' in the configuration to a value used in downstream
kernels [1][2] in order to get the correct output rate:

  $ xo=19200000; l=48; alpha=0x0; alpha_hi=0x70
  $ echo "$xo * ($((l)) + $(((alpha_hi << 32 | alpha) >> 8)) / 2^32)" | bc -l
  930000000.00000000000000000000

The change is based on static code analysis, compile tested only.

[1] https://git.codelinaro.org/clo/la/kernel/msm-5.4/-/blob/kernel.lnx.5.4.r56-rel/drivers/clk/qcom/gcc-qcs404.c?ref_type=heads#L335
[2} https://git.codelinaro.org/clo/la/kernel/msm-5.15/-/blob/kernel.lnx.5.15.r49-rel/drivers/clk/qcom/gcc-qcs404.c?ref_type=heads#L127

Cc: stable@vger.kernel.org
Fixes: 652f1813c113 ("clk: qcom: gcc: Add global clock controller driver for QCS404")
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
Link: https://lore.kernel.org/r/20241022-fix-gcc-qcs404-gpll3-v1-1-c4d30d634d19@gmail.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-17 13:20:50 +01:00
Michal Vokáč
619326a8df leds: lp55xx: Remove redundant test for invalid channel number
commit 09b1ef9813a0742674f7efe26104403ca94a1b4a upstream.

Since commit 92a81562e695 ("leds: lp55xx: Add multicolor framework
support to lp55xx") there are two subsequent tests if the chan_nr
(reg property) is in valid range. One in the lp55xx_init_led()
function and one in the lp55xx_parse_common_child() function that
was added with the mentioned commit.

There are two issues with that.

First is in the lp55xx_parse_common_child() function where the reg
property is tested right after it is read from the device tree.
Test for the upper range is not correct though. Valid reg values are
0 to (max_channel - 1) so it should be >=.

Second issue is that in case the parsed value is out of the range
the probe just fails and no error message is shown as the code never
reaches the second test that prints and error message.

Remove the test form lp55xx_parse_common_child() function completely
and keep the one in lp55xx_init_led() function to deal with it.

Fixes: 92a81562e695 ("leds: lp55xx: Add multicolor framework support to lp55xx")
Cc: stable@vger.kernel.org
Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
Link: https://lore.kernel.org/r/20241017150812.3563629-1-michal.vokac@ysoft.com
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-17 13:20:50 +01:00
Ricardo Ribalda
5795e869ef media: uvcvideo: Stop stream during unregister
commit c9ec6f1736363b2b2bb4e266997389740f628441 upstream.

uvc_unregister_video() can be called asynchronously from
uvc_disconnect(). If the device is still streaming when that happens, a
plethora of race conditions can occur.

Make sure that the device has stopped streaming before exiting this
function.

If the user still holds handles to the driver's file descriptors, any
ioctl will return -ENODEV from the v4l2 core.

This change makes uvc more consistent with the rest of the v4l2 drivers
using the vb2_fop_* and vb2_ioctl_* helpers.

This driver (and many other usb drivers) always had this problem, but it
wasn't possible to easily fix this until the vb2_video_unregister_device()
helper was added. So the Fixes tag points to the creation of that helper.

Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Suggested-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fixes: f729ef5796d8 ("media: videobuf2-v4l2.c: add vb2_video_unregister_device helper function")
Cc: stable@vger.kernel.org # 5.10.x
[hverkuil: add note regarding Fixes version]
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-17 13:20:50 +01:00
Gaosheng Cui
f9255d07e5 media: platform: allegro-dvt: Fix possible memory leak in allocate_buffers_internal()
commit 0f514068fbc5d4d189c817adc7c4e32cffdc2e47 upstream.

The buffer in the loop should be released under the exception path,
otherwise there may be a memory leak here.

To mitigate this, free the buffer when allegro_alloc_buffer fails.

Fixes: f20387dfd065 ("media: allegro: add Allegro DVT video IP core driver")
Cc: <stable@vger.kernel.org>
Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-17 13:20:50 +01:00
Jinjie Ruan
99b5366062 media: gspca: ov534-ov772x: Fix off-by-one error in set_frame_rate()
commit d2842dec577900031826dc44e9bf0c66416d7173 upstream.

In set_frame_rate(), select a rate in rate_0 or rate_1 by checking
sd->frame_rate >= r->fps in a loop, but the loop condition terminates when
the index reaches zero, which fails to check the last elememt in rate_0 or
rate_1.

Check for >= 0 so that the last one in rate_0 or rate_1 is also checked.

Fixes: 189d92af707e ("V4L/DVB (13422): gspca - ov534: ov772x changes from Richard Kaswy.")
Cc: stable@vger.kernel.org
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-17 13:20:50 +01:00
Jinjie Ruan
1b4a4dc666 media: venus: Fix pm_runtime_set_suspended() with runtime pm enabled
commit 2a20869f7d798aa2b69e45b863eaf1b1ecf98278 upstream.

It is not valid to call pm_runtime_set_suspended() for devices
with runtime PM enabled because it returns -EAGAIN if it is enabled
already and working. So, call pm_runtime_disable() before to fix it.

Cc: stable@vger.kernel.org
Fixes: af2c3834c8ca ("[media] media: venus: adding core part and helper functions")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Acked-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-17 13:20:50 +01:00
Li Zetao
1b3bba51e3 media: ts2020: fix null-ptr-deref in ts2020_probe()
commit 4a058b34b52ed3feb1f3ff6fd26aefeeeed20cba upstream.

KASAN reported a null-ptr-deref issue when executing the following
command:

  # echo ts2020 0x20 > /sys/bus/i2c/devices/i2c-0/new_device
    KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]
    CPU: 53 UID: 0 PID: 970 Comm: systemd-udevd Not tainted 6.12.0-rc2+ #24
    Hardware name: QEMU Standard PC (Q35 + ICH9, 2009)
    RIP: 0010:ts2020_probe+0xad/0xe10 [ts2020]
    RSP: 0018:ffffc9000abbf598 EFLAGS: 00010202
    RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffffc0714809
    RDX: 0000000000000002 RSI: ffff88811550be00 RDI: 0000000000000010
    RBP: ffff888109868800 R08: 0000000000000001 R09: fffff52001577eb6
    R10: 0000000000000000 R11: ffffc9000abbff50 R12: ffffffffc0714790
    R13: 1ffff92001577eb8 R14: ffffffffc07190d0 R15: 0000000000000001
    FS:  00007f95f13b98c0(0000) GS:ffff888149280000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 0000555d2634b000 CR3: 0000000152236000 CR4: 00000000000006f0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    Call Trace:
     <TASK>
     ts2020_probe+0xad/0xe10 [ts2020]
     i2c_device_probe+0x421/0xb40
     really_probe+0x266/0x850
    ...

The cause of the problem is that when using sysfs to dynamically register
an i2c device, there is no platform data, but the probe process of ts2020
needs to use platform data, resulting in a null pointer being accessed.

Solve this problem by adding checks to platform data.

Fixes: dc245a5f9b51 ("[media] ts2020: implement I2C client bindings")
Cc: <stable@vger.kernel.org>
Signed-off-by: Li Zetao <lizetao1@huawei.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-17 13:20:50 +01:00
Alexander Shiyan
be99c2298b media: i2c: tc358743: Fix crash in the probe error path when using polling
commit 869f38ae07f7df829da4951c3d1f7a2be09c2e9a upstream.

If an error occurs in the probe() function, we should remove the polling
timer that was alarmed earlier, otherwise the timer is called with
arguments that are already freed, which results in a crash.

------------[ cut here ]------------
WARNING: CPU: 3 PID: 0 at kernel/time/timer.c:1830 __run_timers+0x244/0x268
Modules linked in:
CPU: 3 UID: 0 PID: 0 Comm: swapper/3 Not tainted 6.11.0 #226
Hardware name: Diasom DS-RK3568-SOM-EVB (DT)
pstate: 804000c9 (Nzcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : __run_timers+0x244/0x268
lr : __run_timers+0x1d4/0x268
sp : ffffff80eff2baf0
x29: ffffff80eff2bb50 x28: 7fffffffffffffff x27: ffffff80eff2bb00
x26: ffffffc080f669c0 x25: ffffff80efef6bf0 x24: ffffff80eff2bb00
x23: 0000000000000000 x22: dead000000000122 x21: 0000000000000000
x20: ffffff80efef6b80 x19: ffffff80041c8bf8 x18: ffffffffffffffff
x17: ffffffc06f146000 x16: ffffff80eff27dc0 x15: 000000000000003e
x14: 0000000000000000 x13: 00000000000054da x12: 0000000000000000
x11: 00000000000639c0 x10: 000000000000000c x9 : 0000000000000009
x8 : ffffff80eff2cb40 x7 : ffffff80eff2cb40 x6 : ffffff8002bee480
x5 : ffffffc080cb2220 x4 : ffffffc080cb2150 x3 : 00000000000f4240
x2 : 0000000000000102 x1 : ffffff80eff2bb00 x0 : ffffff80041c8bf0
Call trace:
 __run_timers+0x244/0x268
 timer_expire_remote+0x50/0x68
 tmigr_handle_remote+0x388/0x39c
 run_timer_softirq+0x38/0x44
 handle_softirqs+0x138/0x298
 __do_softirq+0x14/0x20
 ____do_softirq+0x10/0x1c
 call_on_irq_stack+0x24/0x4c
 do_softirq_own_stack+0x1c/0x2c
 irq_exit_rcu+0x9c/0xcc
 el1_interrupt+0x48/0xc0
 el1h_64_irq_handler+0x18/0x24
 el1h_64_irq+0x7c/0x80
 default_idle_call+0x34/0x68
 do_idle+0x23c/0x294
 cpu_startup_entry+0x38/0x3c
 secondary_start_kernel+0x128/0x160
 __secondary_switched+0xb8/0xbc
---[ end trace 0000000000000000 ]---

Fixes: 4e66a52a2e4c ("[media] tc358743: Add support for platforms without IRQ line")
Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-17 13:20:50 +01:00
87b15d7911 Revert "zram: Set default compressor to zstd"
This reverts commit 9c6c01a0bd.
2024-12-03 19:58:37 +01:00
94445d78e9 Revert "driver: pwm: Implement .apply() callback"
This reverts commit f11cfb0398.
2024-12-03 19:58:13 +01:00
db5281867e Revert "watchdog: s3c2410_wdt: Assign s3c_wdt[] until probe complete"
This reverts commit f887b383c2.
2024-12-03 19:58:09 +01:00
Li Nan
4eeda86cdc md/raid10: improve code of mrdev in raid10_sync_request
commit 59f8f0b54c8ffb4521f6bbd1cb6f4dfa5022e75e upstream.

'need_recover' and 'mrdev' are equivalent in raid10_sync_request(), and
inc mrdev->nr_pending is unreasonable if don't need recovery. Replace
'need_recover' with 'mrdev', and only inc nr_pending when needed.

Signed-off-by: Li Nan <linan122@huawei.com>
Reviewed-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20230527072218.2365857-3-linan666@huaweicloud.com
Cc: Hagar Gamal Halim <hagarhem@amazon.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:28 +01:00
Reinhard Speyerer
60cea42f5a net: usb: qmi_wwan: add Fibocom FG132 0x0112 composition
[ Upstream commit 64761c980cbf71fb7a532a8c7299907ea972a88c ]

Add Fibocom FG132 0x0112 composition:

T:  Bus=03 Lev=02 Prnt=06 Port=01 Cnt=02 Dev#= 10 Spd=12   MxCh= 0
D:  Ver= 2.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=2cb7 ProdID=0112 Rev= 5.15
S:  Manufacturer=Fibocom Wireless Inc.
S:  Product=Fibocom Module
S:  SerialNumber=xxxxxxxx
C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=83(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
E:  Ad=85(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=84(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=86(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

Signed-off-by: Reinhard Speyerer <rspmn@arcor.de>

Link: https://patch.msgid.link/ZxLKp5YZDy-OM0-e@arcor.de
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-30 02:33:28 +01:00
Yuan Can
8cb8d617dc vDPA/ifcvf: Fix pci_read_config_byte() return code handling
[ Upstream commit 7f8825b2a78ac392d3fbb3a2e65e56d9e39d75e9 ]

ifcvf_init_hw() uses pci_read_config_byte() that returns
PCIBIOS_* codes. The error handling, however, assumes the codes are
normal errnos because it checks for < 0.
Convert the error check to plain non-zero check.

Fixes: 5a2414bc454e ("virtio: Intel IFC VF driver for VDPA")
Signed-off-by: Yuan Can <yuancan@huawei.com>
Message-Id: <20241017013812.129952-1-yuancan@huawei.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Zhu Lingshan <lingshan.zhu@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-30 02:33:27 +01:00
Herbert Xu
2bc3250d95 crypto: marvell/cesa - Disable hash algorithms
[ Upstream commit e845d2399a00f866f287e0cefbd4fc7d8ef0d2f7 ]

Disable cesa hash algorithms by lowering the priority because they
appear to be broken when invoked in parallel.  This allows them to
still be tested for debugging purposes.

Reported-by: Klaus Kudielka <klaus.kudielka@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-30 02:33:27 +01:00
WangYuli
04082543f0 HID: multitouch: Add quirk for HONOR MagicBook Art 14 touchpad
[ Upstream commit 7a5ab8071114344f62a8b1e64ed3452a77257d76 ]

The behavior of HONOR MagicBook Art 14 touchpad is not consistent
after reboots, as sometimes it reports itself as a touchpad, and
sometimes as a mouse.

Similarly to GLO-GXXX it is possible to call MT_QUIRK_FORCE_GET_FEATURE as a
workaround to force set feature in mt_set_input_mode() for such special touchpad
device.

[jkosina@suse.com: reword changelog a little bit]
Link: https://gitlab.freedesktop.org/libinput/libinput/-/issues/1040
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Signed-off-by: WangYuli <wangyuli@uniontech.com>
Reviewed-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-30 02:33:27 +01:00
Ioana Ciornei
b9e9ea8747 net: phy: ti: take into account all possible interrupt sources
commit 73f476aa1975bae6a792b340f5b26ffcfba869a6 upstream.

The previous implementation of .handle_interrupt() did not take into
account the fact that all the interrupt status registers should be
acknowledged since multiple interrupt sources could be asserted.

Fix this by reading all the status registers before exiting with
IRQ_NONE or triggering the PHY state machine.

Fixes: 1d1ae3c6ca3f ("net: phy: ti: implement generic .handle_interrupt() callback")
Reported-by: Sven Schuchmann <schuchmann@schleissheimer.de>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Link: https://lore.kernel.org/r/20210226153020.867852-1-ciorneiioana@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:27 +01:00
Marc Zyngier
ed3f47340e irqchip/gic-v3: Force propagation of the active state with a read-back
commit 464cb98f1c07298c4c10e714ae0c36338d18d316 upstream.

Christoffer reports that on some implementations, writing to
GICR_ISACTIVER0 (and similar GICD registers) can race badly with a guest
issuing a deactivation of that interrupt via the system register interface.

There are multiple reasons to this:

 - this uses an early write-acknoledgement memory type (nGnRE), meaning
   that the write may only have made it as far as some interconnect
   by the time the store is considered "done"

 - the GIC itself is allowed to buffer the write until it decides to
   take it into account (as long as it is in finite time)

The effects are that the activation may not have taken effect by the time
the kernel enters the guest, forcing an immediate exit, or that a guest
deactivation occurs before the interrupt is active, doing nothing.

In order to guarantee that the write to the ISACTIVER register has taken
effect, read back from it, forcing the interconnect to propagate the write,
and the GIC to process the write before returning the read.

Reported-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Christoffer Dall <christoffer.dall@arm.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/all/20241106084418.3794612-1-maz@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:26 +01:00
Benoît Monin
16058ff952 USB: serial: option: add Quectel RG650V
commit 3b05949ba39f305b585452d0e177470607842165 upstream.

Add support for Quectel RG650V which is based on Qualcomm SDX65 chip.
The composition is DIAG / NMEA / AT / AT / QMI.

T:  Bus=02 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#=  4 Spd=5000 MxCh= 0
D:  Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs=  1
P:  Vendor=2c7c ProdID=0122 Rev=05.15
S:  Manufacturer=Quectel
S:  Product=RG650V-EU
S:  SerialNumber=xxxxxxx
C:  #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=896mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
E:  Ad=01(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=03(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=83(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=84(I) Atr=03(Int.) MxPS=  10 Ivl=9ms
I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=04(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=85(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=86(I) Atr=03(Int.) MxPS=  10 Ivl=9ms
I:  If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
E:  Ad=05(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=87(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E:  Ad=88(I) Atr=03(Int.) MxPS=   8 Ivl=9ms

Signed-off-by: Benoît Monin <benoit.monin@gmx.fr>
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:26 +01:00
Reinhard Speyerer
fef801c1a1 USB: serial: option: add Fibocom FG132 0x0112 composition
commit 393c74ccbd847bacf18865a01b422586fc7341cf upstream.

Add Fibocom FG132 0x0112 composition:

T:  Bus=03 Lev=02 Prnt=06 Port=01 Cnt=02 Dev#= 10 Spd=12   MxCh= 0
D:  Ver= 2.01 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=2cb7 ProdID=0112 Rev= 5.15
S:  Manufacturer=Fibocom Wireless Inc.
S:  Product=Fibocom Module
S:  SerialNumber=xxxxxxxx
C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=83(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
E:  Ad=85(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=84(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=86(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms

Signed-off-by: Reinhard Speyerer <rspmn@arcor.de>
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:26 +01:00
Jack Wu
4f0c0d4c9c USB: serial: qcserial: add support for Sierra Wireless EM86xx
commit 25eb47eed52979c2f5eee3f37e6c67714e02c49c upstream.

Add support for Sierra Wireless EM86xx with USB-id 0x1199:0x90e5 and
0x1199:0x90e4.

0x1199:0x90e5
T:  Bus=03 Lev=01 Prnt=01 Port=05 Cnt=01 Dev#= 14 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1199 ProdID=90e5 Rev= 5.15
S:  Manufacturer=Sierra Wireless, Incorporated
S:  Product=Semtech EM8695 Mobile Broadband Adapter
S:  SerialNumber=004403161882339
C:* #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA
A:  FirstIf#=12 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=qcserial
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=usbfs
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=qcserial
E:  Ad=84(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=85(I) Atr=03(Int.) MxPS=  64 Ivl=32ms
I:* If#=12 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim
E:  Ad=87(I) Atr=03(Int.) MxPS=  64 Ivl=32ms
I:  If#=13 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
I:* If#=13 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

0x1199:0x90e4
T:  Bus=03 Lev=01 Prnt=01 Port=05 Cnt=01 Dev#= 16 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1199 ProdID=90e4 Rev= 0.00
S:  Manufacturer=Sierra Wireless, Incorporated
S:  SerialNumber=004403161882339
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=10 Driver=qcserial
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

Signed-off-by: Jack Wu <wojackbb@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:26 +01:00
Dan Carpenter
e6d4dcab60 USB: serial: io_edgeport: fix use after free in debug printk
commit 37bb5628379295c1254c113a407cab03a0f4d0b4 upstream.

The "dev_dbg(&urb->dev->dev, ..." which happens after usb_free_urb(urb)
is a use after free of the "urb" pointer.  Store the "dev" pointer at the
start of the function to avoid this issue.

Fixes: 984f68683298 ("USB: serial: io_edgeport.c: remove dbg() usage")
Cc: stable@vger.kernel.org
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:26 +01:00
Dan Carpenter
9027d91cbf usb: typec: fix potential out of bounds in ucsi_ccg_update_set_new_cam_cmd()
commit 7dd08a0b4193087976db6b3ee7807de7e8316f96 upstream.

The "*cmd" variable can be controlled by the user via debugfs.  That means
"new_cam" can be as high as 255 while the size of the uc->updated[] array
is UCSI_MAX_ALTMODES (30).

The call tree is:
ucsi_cmd() // val comes from simple_attr_write_xsigned()
-> ucsi_send_command()
   -> ucsi_send_command_common()
      -> ucsi_run_command() // calls ucsi->ops->sync_control()
         -> ucsi_ccg_sync_control()

Fixes: 170a6726d0e2 ("usb: typec: ucsi: add support for separate DP altmode devices")
Cc: stable <stable@kernel.org>
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/325102b3-eaa8-4918-a947-22aca1146586@stanley.mountain
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:26 +01:00
Zijun Hu
17666d0525 usb: musb: sunxi: Fix accessing an released usb phy
commit 498dbd9aea205db9da674994b74c7bf8e18448bd upstream.

Commit 6ed05c68cbca ("usb: musb: sunxi: Explicitly release USB PHY on
exit") will cause that usb phy @glue->xceiv is accessed after released.

1) register platform driver @sunxi_musb_driver
// get the usb phy @glue->xceiv
sunxi_musb_probe() -> devm_usb_get_phy().

2) register and unregister platform driver @musb_driver
musb_probe() -> sunxi_musb_init()
use the phy here
//the phy is released here
musb_remove() -> sunxi_musb_exit() -> devm_usb_put_phy()

3) register @musb_driver again
musb_probe() -> sunxi_musb_init()
use the phy here but the phy has been released at 2).
...

Fixed by reverting the commit, namely, removing devm_usb_put_phy()
from sunxi_musb_exit().

Fixes: 6ed05c68cbca ("usb: musb: sunxi: Explicitly release USB PHY on exit")
Cc: stable@vger.kernel.org
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/r/20241029-sunxi_fix-v1-1-9431ed2ab826@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:26 +01:00
Benoit Sevens
9084be5184 media: uvcvideo: Skip parsing frames of type UVC_VS_UNDEFINED in uvc_parse_format
commit ecf2b43018da9579842c774b7f35dbe11b5c38dd upstream.

This can lead to out of bounds writes since frames of this type were not
taken into account when calculating the size of the frames buffer in
uvc_parse_streaming.

Fixes: c0efd232929c ("V4L/DVB (8145a): USB Video Class driver")
Signed-off-by: Benoit Sevens <bsevens@google.com>
Cc: stable@vger.kernel.org
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:26 +01:00
Mark Brown
9f69ce235f spi: Fix deadlock when adding SPI controllers on SPI buses
commit 6098475d4cb48d821bdf453c61118c56e26294f0 upstream.

Currently we have a global spi_add_lock which we take when adding new
devices so that we can check that we're not trying to reuse a chip
select that's already controlled.  This means that if the SPI device is
itself a SPI controller and triggers the instantiation of further SPI
devices we trigger a deadlock as we try to register and instantiate
those devices while in the process of doing so for the parent controller
and hence already holding the global spi_add_lock.  Since we only care
about concurrency within a single SPI bus move the lock to be per
controller, avoiding the deadlock.

This can be easily triggered in the case of spi-mux.

Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Hardik Gohil <hgohil@mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:25 +01:00
Zichen Xie
3676f0afd7 dm-unstriped: cast an operand to sector_t to prevent potential uint32_t overflow
commit 5a4510c762fc04c74cff264cd4d9e9f5bf364bae upstream.

This was found by a static analyzer.
There may be a potential integer overflow issue in
unstripe_ctr(). uc->unstripe_offset and uc->unstripe_width are
defined as "sector_t"(uint64_t), while uc->unstripe,
uc->chunk_size and uc->stripes are all defined as "uint32_t".
The result of the calculation will be limited to "uint32_t"
without correct casting.
So, we recommend adding an extra cast to prevent potential
integer overflow.

Fixes: 18a5bf270532 ("dm: add unstriped target")
Signed-off-by: Zichen Xie <zichenxie0106@gmail.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:24 +01:00
Ming-Hung Tsai
ca35cfbb8b dm cache: fix potential out-of-bounds access on the first resume
commit c0ade5d98979585d4f5a93e4514c2e9a65afa08d upstream.

Out-of-bounds access occurs if the fast device is expanded unexpectedly
before the first-time resume of the cache table. This happens because
expanding the fast device requires reloading the cache table for
cache_create to allocate new in-core data structures that fit the new
size, and the check in cache_preresume is not performed during the
first resume, leading to the issue.

Reproduce steps:

1. prepare component devices:

dmsetup create cmeta --table "0 8192 linear /dev/sdc 0"
dmsetup create cdata --table "0 65536 linear /dev/sdc 8192"
dmsetup create corig --table "0 524288 linear /dev/sdc 262144"
dd if=/dev/zero of=/dev/mapper/cmeta bs=4k count=1 oflag=direct

2. load a cache table of 512 cache blocks, and deliberately expand the
   fast device before resuming the cache, making the in-core data
   structures inadequate.

dmsetup create cache --notable
dmsetup reload cache --table "0 524288 cache /dev/mapper/cmeta \
/dev/mapper/cdata /dev/mapper/corig 128 2 metadata2 writethrough smq 0"
dmsetup reload cdata --table "0 131072 linear /dev/sdc 8192"
dmsetup resume cdata
dmsetup resume cache

3. suspend the cache to write out the in-core dirty bitset and hint
   array, leading to out-of-bounds access to the dirty bitset at offset
   0x40:

dmsetup suspend cache

KASAN reports:

  BUG: KASAN: vmalloc-out-of-bounds in is_dirty_callback+0x2b/0x80
  Read of size 8 at addr ffffc90000085040 by task dmsetup/90

  (...snip...)
  The buggy address belongs to the virtual mapping at
   [ffffc90000085000, ffffc90000087000) created by:
   cache_ctr+0x176a/0x35f0

  (...snip...)
  Memory state around the buggy address:
   ffffc90000084f00: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
   ffffc90000084f80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
  >ffffc90000085000: 00 00 00 00 00 00 00 00 f8 f8 f8 f8 f8 f8 f8 f8
                                             ^
   ffffc90000085080: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
   ffffc90000085100: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8

Fix by checking the size change on the first resume.

Signed-off-by: Ming-Hung Tsai <mtsai@redhat.com>
Fixes: f494a9c6b1b6 ("dm cache: cache shrinking support")
Cc: stable@vger.kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Acked-by: Joe Thornber <thornber@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:24 +01:00
Ming-Hung Tsai
6ebcfe4aa8 dm cache: optimize dirty bit checking with find_next_bit when resizing
commit f484697e619a83ecc370443a34746379ad99d204 upstream.

When shrinking the fast device, dm-cache iteratively searches for a
dirty bit among the cache blocks to be dropped, which is less efficient.
Use find_next_bit instead, as it is twice as fast as the iterative
approach with test_bit.

Signed-off-by: Ming-Hung Tsai <mtsai@redhat.com>
Fixes: f494a9c6b1b6 ("dm cache: cache shrinking support")
Cc: stable@vger.kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Acked-by: Joe Thornber <thornber@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:24 +01:00
Ming-Hung Tsai
5b93a0a383 dm cache: fix out-of-bounds access to the dirty bitset when resizing
commit 792227719725497ce10a8039803bec13f89f8910 upstream.

dm-cache checks the dirty bits of the cache blocks to be dropped when
shrinking the fast device, but an index bug in bitset iteration causes
out-of-bounds access.

Reproduce steps:

1. create a cache device of 1024 cache blocks (128 bytes dirty bitset)

dmsetup create cmeta --table "0 8192 linear /dev/sdc 0"
dmsetup create cdata --table "0 131072 linear /dev/sdc 8192"
dmsetup create corig --table "0 524288 linear /dev/sdc 262144"
dd if=/dev/zero of=/dev/mapper/cmeta bs=4k count=1 oflag=direct
dmsetup create cache --table "0 524288 cache /dev/mapper/cmeta \
/dev/mapper/cdata /dev/mapper/corig 128 2 metadata2 writethrough smq 0"

2. shrink the fast device to 512 cache blocks, triggering out-of-bounds
   access to the dirty bitset (offset 0x80)

dmsetup suspend cache
dmsetup reload cdata --table "0 65536 linear /dev/sdc 8192"
dmsetup resume cdata
dmsetup resume cache

KASAN reports:

  BUG: KASAN: vmalloc-out-of-bounds in cache_preresume+0x269/0x7b0
  Read of size 8 at addr ffffc900000f3080 by task dmsetup/131

  (...snip...)
  The buggy address belongs to the virtual mapping at
   [ffffc900000f3000, ffffc900000f5000) created by:
   cache_ctr+0x176a/0x35f0

  (...snip...)
  Memory state around the buggy address:
   ffffc900000f2f80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
   ffffc900000f3000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  >ffffc900000f3080: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
                     ^
   ffffc900000f3100: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
   ffffc900000f3180: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8

Fix by making the index post-incremented.

Signed-off-by: Ming-Hung Tsai <mtsai@redhat.com>
Fixes: f494a9c6b1b6 ("dm cache: cache shrinking support")
Cc: stable@vger.kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Acked-by: Joe Thornber <thornber@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:24 +01:00
Ming-Hung Tsai
656ff2aa25 dm cache: correct the number of origin blocks to match the target length
commit 235d2e739fcbe964c9ce179b4c991025662dcdb6 upstream.

When creating a cache device, the actual size of the cache origin might
be greater than the specified cache target length. In such case, the
number of origin blocks should match the cache target length, not the
full size of the origin device, since access beyond the cache target is
not possible. This issue occurs when reducing the origin device size
using lvm, as lvreduce preloads the new cache table before resuming the
cache origin, which can result in incorrect sizes for the discard bitset
and smq hotspot blocks.

Reproduce steps:

1. create a cache device consists of 4096 origin blocks

dmsetup create cmeta --table "0 8192 linear /dev/sdc 0"
dmsetup create cdata --table "0 65536 linear /dev/sdc 8192"
dmsetup create corig --table "0 524288 linear /dev/sdc 262144"
dd if=/dev/zero of=/dev/mapper/cmeta bs=4k count=1 oflag=direct
dmsetup create cache --table "0 524288 cache /dev/mapper/cmeta \
/dev/mapper/cdata /dev/mapper/corig 128 2 metadata2 writethrough smq 0"

2. reduce the cache origin to 2048 oblocks, in lvreduce's approach

dmsetup reload corig --table "0 262144 linear /dev/sdc 262144"
dmsetup reload cache --table "0 262144 cache /dev/mapper/cmeta \
/dev/mapper/cdata /dev/mapper/corig 128 2 metadata2 writethrough smq 0"
dmsetup suspend cache
dmsetup suspend corig
dmsetup suspend cdata
dmsetup suspend cmeta
dmsetup resume corig
dmsetup resume cdata
dmsetup resume cmeta
dmsetup resume cache

3. shutdown the cache, and check the number of discard blocks in
   superblock. The value is expected to be 2048, but actually is 4096.

dmsetup remove cache corig cdata cmeta
dd if=/dev/sdc bs=1c count=8 skip=224 2>/dev/null | hexdump -e '1/8 "%u\n"'

Fix by correcting the origin_blocks initialization in cache_create and
removing the unused origin_sectors from struct cache_args accordingly.

Signed-off-by: Ming-Hung Tsai <mtsai@redhat.com>
Fixes: c6b4fcbad044 ("dm: add cache target")
Cc: stable@vger.kernel.org
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Acked-by: Joe Thornber <thornber@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:24 +01:00
Antonio Quartulli
aa6358430a drm/amdgpu: prevent NULL pointer dereference if ATIF is not supported
commit a6dd15981c03f2cdc9a351a278f09b5479d53d2e upstream.

acpi_evaluate_object() may return AE_NOT_FOUND (failure), which
would result in dereferencing buffer.pointer (obj) while being NULL.

Although this case may be unrealistic for the current code, it is
still better to protect against possible bugs.

Bail out also when status is AE_NOT_FOUND.

This fixes 1 FORWARD_NULL issue reported by Coverity
Report: CID 1600951:  Null pointer dereferences  (FORWARD_NULL)

Signed-off-by: Antonio Quartulli <antonio@mandelbit.com>
Fixes: c9b7c809b89f ("drm/amd: Guard against bad data for ATIF ACPI method")
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20241031152848.4716-1-antonio@mandelbit.com
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 91c9e221fe2553edf2db71627d8453f083de87a1)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:24 +01:00
Alex Deucher
f440f3ca1f drm/amdgpu: add missing size check in amdgpu_debugfs_gprwave_read()
commit 4d75b9468021c73108b4439794d69e892b1d24e3 upstream.

Avoid a possible buffer overflow if size is larger than 4K.

Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit f5d873f5825b40d886d03bd2aede91d4cf002434)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:24 +01:00
Erik Schumacher
ae14643f35 pwm: imx-tpm: Use correct MODULO value for EPWM mode
commit cc6a931d1f3b412263d515fd93b21fc0ca5147fe upstream.

The modulo register defines the period of the edge-aligned PWM mode
(which is the only mode implemented). The reference manual states:
"The EPWM period is determined by (MOD + 0001h) ..." So the value that
is written to the MOD register must therefore be one less than the
calculated period length. Return -EINVAL if the calculated length is
already zero.
A correct MODULO value is particularly relevant if the PWM has to output
a high frequency due to a low period value.

Fixes: 738a1cfec2ed ("pwm: Add i.MX TPM PWM driver support")
Cc: stable@vger.kernel.org
Signed-off-by: Erik Schumacher <erik.schumacher@iris-sensing.com>
Link: https://lore.kernel.org/r/1a3890966d68b9f800d457cbf095746627495e18.camel@iris-sensing.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:24 +01:00
Mauro Carvalho Chehab
5be6663698 media: v4l2-tpg: prevent the risk of a division by zero
commit e6a3ea83fbe15d4818d01804e904cbb0e64e543b upstream.

As reported by Coverity, the logic at tpg_precalculate_line()
blindly rescales the buffer even when scaled_witdh is equal to
zero. If this ever happens, this will cause a division by zero.

Instead, add a WARN_ON_ONCE() to trigger such cases and return
without doing any precalculation.

Fixes: 63881df94d3e ("[media] vivid: add the Test Pattern Generator")
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:23 +01:00
Mauro Carvalho Chehab
d38ace2857 media: pulse8-cec: fix data timestamp at pulse8_setup()
commit ba9cf6b430433e57bfc8072364e944b7c0eca2a4 upstream.

As pointed by Coverity, there is a hidden overflow condition there.
As date is signed and u8 is unsigned, doing:

	date = (data[0] << 24)

With a value bigger than 07f will make all upper bits of date
0xffffffff. This can be demonstrated with this small code:

<code>
typedef int64_t time64_t;
typedef uint8_t u8;

int main(void)
{
	u8 data[] = { 0xde ,0xad , 0xbe, 0xef };
	time64_t date;

	date = (data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3];
	printf("Invalid data = 0x%08lx\n", date);

	date = ((unsigned)data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3];
	printf("Expected data = 0x%08lx\n", date);

	return 0;
}
</code>

Fix it by converting the upper bit calculation to unsigned.

Fixes: cea28e7a55e7 ("media: pulse8-cec: reorganize function order")
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:23 +01:00
Mauro Carvalho Chehab
fd73218ffe media: cx24116: prevent overflows on SNR calculus
commit 576a307a7650bd544fbb24df801b9b7863b85e2f upstream.

as reported by Coverity, if reading SNR registers fail, a negative
number will be returned, causing an underflow when reading SNR
registers.

Prevent that.

Fixes: 8953db793d5b ("V4L/DVB (9178): cx24116: Add module parameter to return SNR as ESNO.")
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:23 +01:00
Mauro Carvalho Chehab
15ecef70ed media: s5p-jpeg: prevent buffer overflows
commit 14a22762c3daeac59a5a534e124acbb4d7a79b3a upstream.

The current logic allows word to be less than 2. If this happens,
there will be buffer overflows, as reported by smatch. Add extra
checks to prevent it.

While here, remove an unused word = 0 assignment.

Fixes: 6c96dbbc2aa9 ("[media] s5p-jpeg: add support for 5433")
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:23 +01:00
Johannes Thumshirn
7e989f7062 scsi: sd_zbc: Use kvzalloc() to allocate REPORT ZONES buffer
[ Upstream commit 7ce3e6107103214d354a16729a472f588be60572 ]

We have two reports of failed memory allocation in btrfs' code which is
calling into report zones.

Both of these reports have the following signature coming from
__vmalloc_area_node():

 kworker/u17:5: vmalloc error: size 0, failed to allocate pages, mode:0x10dc2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_NORETRY|__GFP_ZERO), nodemask=(null),cpuset=/,mems_allowed=0

Further debugging showed these where allocations of one sector (512
bytes) and at least one of the reporter's systems where low on memory,
so going through the overhead of allocating a vm area failed.

Switching the allocation from __vmalloc() to kvzalloc() avoids the
overhead of vmalloc() on small allocations and succeeds.

Note: the buffer is already freed using kvfree() so there's no need to
adjust the free path.

Cc: Qu Wenru <wqu@suse.com>
Cc: Naohiro Aota <naohiro.aota@wdc.com>
Link: https://github.com/kdave/btrfs-progs/issues/779
Link: https://github.com/kdave/btrfs-progs/issues/915
Fixes: 23a50861adda ("scsi: sd_zbc: Cleanup sd_zbc_alloc_report_buffer()")
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20241030110253.11718-1-jth@kernel.org
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-30 02:33:23 +01:00
Mauro Carvalho Chehab
fa3661d3c2 media: adv7604: prevent underflow condition when reporting colorspace
[ Upstream commit 50b9fa751d1aef5d262bde871c70a7f44262f0bc ]

Currently, adv76xx_log_status() reads some date using
io_read() which may return negative values. The current logic
doesn't check such errors, causing colorspace to be reported
on a wrong way at adv76xx_log_status(), as reported by Coverity.

If I/O error happens there, print a different message, instead
of reporting bogus messages to userspace.

Fixes: 54450f591c99 ("[media] adv7604: driver for the Analog Devices ADV7604 video decoder")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-30 02:33:23 +01:00
Mauro Carvalho Chehab
224f0ed85c media: dvb_frontend: don't play tricks with underflow values
[ Upstream commit 9883a4d41aba7612644e9bb807b971247cea9b9d ]

fepriv->auto_sub_step is unsigned. Setting it to -1 is just a
trick to avoid calling continue, as reported by Coverity.

It relies to have this code just afterwards:

	if (!ready) fepriv->auto_sub_step++;

Simplify the code by simply setting it to zero and use
continue to return to the while loop.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-30 02:33:23 +01:00
Mauro Carvalho Chehab
7bfceb4f48 media: dvbdev: prevent the risk of out of memory access
[ Upstream commit 972e63e895abbe8aa1ccbdbb4e6362abda7cd457 ]

The dvbdev contains a static variable used to store dvb minors.

The behavior of it depends if CONFIG_DVB_DYNAMIC_MINORS is set
or not. When not set, dvb_register_device() won't check for
boundaries, as it will rely that a previous call to
dvb_register_adapter() would already be enforcing it.

On a similar way, dvb_device_open() uses the assumption
that the register functions already did the needed checks.

This can be fragile if some device ends using different
calls. This also generate warnings on static check analysers
like Coverity.

So, add explicit guards to prevent potential risk of OOM issues.

Fixes: 5dd3f3071070 ("V4L/DVB (9361): Dynamic DVB minor allocation")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-30 02:33:23 +01:00
Mauro Carvalho Chehab
41e3a7ee95 media: stb0899_algo: initialize cfr before using it
commit 2d861977e7314f00bf27d0db17c11ff5e85e609a upstream.

The loop at stb0899_search_carrier() starts with a random
value for cfr, as reported by Coverity.

Initialize it to zero, just like stb0899_dvbs_algo() to ensure
that carrier search won't bail out.

Fixes: 8bd135bab91f ("V4L/DVB (9375): Add STB0899 support")
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:23 +01:00
Johan Jonker
062aa38d5b net: arc: fix the device for dma_map_single/dma_unmap_single
[ Upstream commit 71803c1dfa29e0d13b99e48fda11107cc8caebc7 ]

The ndev->dev and pdev->dev aren't the same device, use ndev->dev.parent
which has dma_mask, ndev->dev.parent is just pdev->dev.
Or it would cause the following issue:

[   39.933526] ------------[ cut here ]------------
[   39.938414] WARNING: CPU: 1 PID: 501 at kernel/dma/mapping.c:149 dma_map_page_attrs+0x90/0x1f8

Fixes: f959dcd6ddfd ("dma-direct: Fix potential NULL pointer dereference")
Signed-off-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-30 02:33:22 +01:00
Diogo Silva
7b0cca4552 net: phy: ti: add PHY_RST_AFTER_CLK_EN flag
[ Upstream commit 256748d5480bb3c4b731236c6d6fc86a8e2815d8 ]

DP83848	datasheet (section 4.7.2) indicates that the reset pin should be
toggled after the clocks are running. Add the PHY_RST_AFTER_CLK_EN to
make sure that this indication is respected.

In my experience not having this flag enabled would lead to, on some
boots, the wrong MII mode being selected if the PHY was initialized on
the bootloader and was receiving data during Linux boot.

Signed-off-by: Diogo Silva <diogompaissilva@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Fixes: 34e45ad9378c ("net: phy: dp83848: Add TI DP83848 Ethernet PHY")
Link: https://patch.msgid.link/20241102151504.811306-1-paissilva@ld-100007.ds1.internal
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-30 02:33:22 +01:00
Ioana Ciornei
a2b6d0907f net: phy: ti: implement generic .handle_interrupt() callback
[ Upstream commit 1d1ae3c6ca3ff49843d73852bb2a8153ce16f432 ]

In an attempt to actually support shared IRQs in phylib, we now move the
responsibility of triggering the phylib state machine or just returning
IRQ_NONE, based on the IRQ status register, to the PHY driver. Having
3 different IRQ handling callbacks (.handle_interrupt(),
.did_interrupt() and .ack_interrupt() ) is confusing so let the PHY
driver implement directly an IRQ handler like any other device driver.
Make this driver follow the new convention.

Cc: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: 256748d5480b ("net: phy: ti: add PHY_RST_AFTER_CLK_EN flag")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-30 02:33:22 +01:00
Ioana Ciornei
b1c86072e8 net: phy: export phy_error and phy_trigger_machine
[ Upstream commit 293e9a3d950dfebc76d9fa6931e6f91ef856b9ab ]

These functions are currently used by phy_interrupt() to either signal
an error condition or to trigger the link state machine. In an attempt
to actually support shared PHY IRQs, export these two functions so that
the actual PHY drivers can use them.

Cc: Alexandru Ardelean <alexandru.ardelean@analog.com>
Cc: Andre Edich <andre.edich@microchip.com>
Cc: Antoine Tenart <atenart@kernel.org>
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Dan Murphy <dmurphy@ti.com>
Cc: Divya Koppera <Divya.Koppera@microchip.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Jerome Brunet <jbrunet@baylibre.com>
Cc: Kavya Sree Kotagiri <kavyasree.kotagiri@microchip.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Marco Felsch <m.felsch@pengutronix.de>
Cc: Marek Vasut <marex@denx.de>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Mathias Kresin <dev@kresin.me>
Cc: Maxim Kochetkov <fido_max@inbox.ru>
Cc: Michael Walle <michael@walle.cc>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Nisar Sayed <Nisar.Sayed@microchip.com>
Cc: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Philippe Schenker <philippe.schenker@toradex.com>
Cc: Willy Liu <willy.liu@realtek.com>
Cc: Yuiko Oshino <yuiko.oshino@microchip.com>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: 256748d5480b ("net: phy: ti: add PHY_RST_AFTER_CLK_EN flag")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-30 02:33:22 +01:00
Peiyang Wang
4152c38410 net: hns3: fix kernel crash when uninstalling driver
[ Upstream commit df3dff8ab6d79edc942464999d06fbaedf8cdd18 ]

When the driver is uninstalled and the VF is disabled concurrently, a
kernel crash occurs. The reason is that the two actions call function
pci_disable_sriov(). The num_VFs is checked to determine whether to
release the corresponding resources. During the second calling, num_VFs
is not 0 and the resource release function is called. However, the
corresponding resource has been released during the first invoking.
Therefore, the problem occurs:

[15277.839633][T50670] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000020
...
[15278.131557][T50670] Call trace:
[15278.134686][T50670]  klist_put+0x28/0x12c
[15278.138682][T50670]  klist_del+0x14/0x20
[15278.142592][T50670]  device_del+0xbc/0x3c0
[15278.146676][T50670]  pci_remove_bus_device+0x84/0x120
[15278.151714][T50670]  pci_stop_and_remove_bus_device+0x6c/0x80
[15278.157447][T50670]  pci_iov_remove_virtfn+0xb4/0x12c
[15278.162485][T50670]  sriov_disable+0x50/0x11c
[15278.166829][T50670]  pci_disable_sriov+0x24/0x30
[15278.171433][T50670]  hnae3_unregister_ae_algo_prepare+0x60/0x90 [hnae3]
[15278.178039][T50670]  hclge_exit+0x28/0xd0 [hclge]
[15278.182730][T50670]  __se_sys_delete_module.isra.0+0x164/0x230
[15278.188550][T50670]  __arm64_sys_delete_module+0x1c/0x30
[15278.193848][T50670]  invoke_syscall+0x50/0x11c
[15278.198278][T50670]  el0_svc_common.constprop.0+0x158/0x164
[15278.203837][T50670]  do_el0_svc+0x34/0xcc
[15278.207834][T50670]  el0_svc+0x20/0x30

For details, see the following figure.

     rmmod hclge              disable VFs
----------------------------------------------------
hclge_exit()            sriov_numvfs_store()
  ...                     device_lock()
  pci_disable_sriov()     hns3_pci_sriov_configure()
                            pci_disable_sriov()
                              sriov_disable()
    sriov_disable()             if !num_VFs :
      if !num_VFs :               return;
        return;                 sriov_del_vfs()
      sriov_del_vfs()             ...
        ...                       klist_put()
        klist_put()               ...
        ...                     num_VFs = 0;
      num_VFs = 0;        device_unlock();

In this patch, when driver is removing, we get the device_lock()
to protect num_VFs, just like sriov_numvfs_store().

Fixes: 0dd8a25f355b ("net: hns3: disable sriov before unload hclge layer")
Signed-off-by: Peiyang Wang <wangpeiyang1@huawei.com>
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20241101091507.3644584-1-shaojijie@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-30 02:33:22 +01:00
Dario Binacchi
d16db102d1 can: c_can: fix {rx,tx}_errors statistics
[ Upstream commit 4d6d26537940f3b3e17138987ed9e4a334780bf7 ]

The c_can_handle_bus_err() function was incorrectly incrementing only the
receive error counter, even in cases of bit or acknowledgment errors that
occur during transmission. The patch fixes the issue by incrementing the
appropriate counter based on the type of error.

Fixes: 881ff67ad450 ("can: c_can: Added support for Bosch C_CAN controller")
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Link: https://patch.msgid.link/20241014135319.2009782-1-dario.binacchi@amarulasolutions.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-30 02:33:22 +01:00
Wei Fang
a704919ef0 net: enetc: set MAC address to the VF net_device
[ Upstream commit badccd49b93bb945bf4e5cc8707db67cdc5e27e5 ]

The MAC address of VF can be configured through the mailbox mechanism of
ENETC, but the previous implementation forgot to set the MAC address in
net_device, resulting in the SMAC of the sent frames still being the old
MAC address. Since the MAC address in the hardware has been changed, Rx
cannot receive frames with the DMAC address as the new MAC address. The
most obvious phenomenon is that after changing the MAC address, we can
see that the MAC address of eno0vf0 has not changed through the "ifconfig
eno0vf0" command and the IP address cannot be obtained .

root@ls1028ardb:~# ifconfig eno0vf0 down
root@ls1028ardb:~# ifconfig eno0vf0 hw ether 00:04:9f:3a:4d:56 up
root@ls1028ardb:~# ifconfig eno0vf0
eno0vf0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 66:36:2c:3b:87:76  txqueuelen 1000  (Ethernet)
        RX packets 794  bytes 69239 (69.2 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 11  bytes 2226 (2.2 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Fixes: beb74ac878c8 ("enetc: Add vf to pf messaging support")
Signed-off-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Link: https://patch.msgid.link/20241029090406.841836-1-wei.fang@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-30 02:33:22 +01:00
Jiri Kosina
47a69493d1 HID: core: zero-initialize the report buffer
[ Upstream commit 177f25d1292c7e16e1199b39c85480f7f8815552 ]

Since the report buffer is used by all kinds of drivers in various ways, let's
zero-initialize it during allocation to make sure that it can't be ever used
to leak kernel memory via specially-crafted report.

Fixes: 27ce405039bf ("HID: fix data access in implement()")
Reported-by: Benoît Sevens <bsevens@google.com>
Acked-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-30 02:33:21 +01:00
Karan
f11cfb0398 driver: pwm: Implement .apply() callback
To eventually get rid of all legacy drivers convert this driver to the
modern world implementing .apply(). The commit which brings these
changes is `5ec803edcb703fe379836f13560b79dfac79b01d` on the uplink
kernel.

Bug: 332793240
Change-Id: I385f487c474ca2d52a9f3bb4e8afc3843eb4d9f8
Signed-off-by: Karan Bhagoji <karan.rb@samsung.com>
Signed-off-by: Hyunki Koo <hyunki00.koo@samsung.com>
2024-11-30 02:19:17 +01:00
Woody Lin
f887b383c2 watchdog: s3c2410_wdt: Assign s3c_wdt[] until probe complete
Assigns device data to `s3c_wdt[cluster_index]` only when probe function
completes. Several functions of s3c2410_wdt use the existence of
`s3c_wdt[*]` to decide whether the device data is ready to be accessed.
This causes an invalid access issue as long as the probe function puts
device data to `s3c_wdt[cluster_index]` before completely preparing the
content. Fixes the issue by rearranging the assignment order.

Bug: 342585125
Change-Id: Idb4c3b71fb2e0518725c697db01e708aa0c7c86b
Signed-off-by: Woody Lin <woodylin@google.com>
(cherry picked from commit d7bd15571d51e658a081d98dfbcc17e3aa104585)
2024-11-30 02:18:58 +01:00
Secondarian
9c6c01a0bd zram: Set default compressor to zstd 2024-11-30 02:02:54 +01:00
Ksawlii
f9e1f3fa3a Revert "exynos_gpu: Don't allow userspace to control freqs"
This reverts commit fdef7b54c3.
2024-11-24 19:22:36 +01:00
Ksawlii
0f4d6c3c29 Revert "gpu/exynos: Make 'gpu_mm_min_clock' readonly too"
This reverts commit 9e6b7e114f.
2024-11-24 19:16:08 +01:00
Ksawlii
895709a281 drivers: samsung: scsc: Adapt scsc_wlbtd.c for Linux 5.10.229 2024-11-24 00:42:20 +01:00
Ksawlii
a5b7b870fc Revert "net: fec: Refactor: #define magic constants"
This reverts commit 64636f4e88.
2024-11-24 00:23:56 +01:00
Ksawlii
e7b1ec68bc Revert "net: fec: Fix FEC_ECR_EN1588 being cleared on link-down"
This reverts commit 132969266d.
2024-11-24 00:23:56 +01:00
Ksawlii
bfbdef95a1 Revert "wifi: virt_wifi: avoid reporting connection success with wrong SSID"
This reverts commit 1c786f1067.
2024-11-24 00:23:56 +01:00
Ksawlii
4f9bfbe9f1 Revert "wifi: virt_wifi: don't use strlen() in const context"
This reverts commit 8df54fa66a.
2024-11-24 00:23:56 +01:00
Ksawlii
683ecba589 Revert "net: dsa: mv88e6xxx: Limit chip-wide frame size config to CPU ports"
This reverts commit 4324f66a7a.
2024-11-24 00:23:56 +01:00
Ksawlii
2e56e9f4fd Revert "net: dsa: b53: Limit chip-wide jumbo frame config to CPU ports"
This reverts commit 23d58869be.
2024-11-24 00:23:56 +01:00
Ksawlii
d3f5815f54 Revert "wifi: mwifiex: Fix interface type change"
This reverts commit 64663028ab.
2024-11-24 00:23:56 +01:00
Ksawlii
fa72cb31d6 Revert "net: bonding: correctly annotate RCU in bond_should_notify_peers()"
This reverts commit 7dc1b04912.
2024-11-24 00:23:56 +01:00
Ksawlii
32d9b82df9 Revert "net: stmmac: Correct byte order of perfect_match"
This reverts commit 4e35d4a08d.
2024-11-24 00:23:55 +01:00
Ksawlii
eb36756b64 Revert "net/mlx5e: Add a check for the return value from mlx5_port_set_eth_ptys"
This reverts commit babb23917f.
2024-11-24 00:23:55 +01:00
Ksawlii
9b5b6a7525 Revert "net: usb: qmi_wwan: fix memory leak for not ip packets"
This reverts commit 3789fee8a8.
2024-11-24 00:23:55 +01:00
Ksawlii
97133e2e2e Revert "net: dsa: bcm_sf2: Fix a possible memory leak in bcm_sf2_mdio_register()"
This reverts commit be9d7e8db2.
2024-11-24 00:23:55 +01:00
Ksawlii
5c2a1132c9 Revert "net: fec: Stop PPS on driver remove"
This reverts commit e328279c90.
2024-11-24 00:23:55 +01:00
Ksawlii
4ec03bf3d0 Revert "media: uvcvideo: Use entity get_cur in uvc_ctrl_set"
This reverts commit db35ac122f.
2024-11-24 00:23:54 +01:00
Ksawlii
d8a23d1e51 Revert "nvme/pci: Add APST quirk for Lenovo N60z laptop"
This reverts commit c748a1f324.
2024-11-24 00:23:54 +01:00
Ksawlii
e89ee38649 Revert "media: Revert "media: dvb-usb: Fix unexpected infinite loop in dvb_usb_read_remote_control()""
This reverts commit bc158d0b3a.
2024-11-24 00:23:54 +01:00
Ksawlii
0b80835234 Revert "net/mlx5e: Correctly report errors for ethtool rx flows"
This reverts commit a1624526b7.
2024-11-24 00:23:54 +01:00
Ksawlii
11596bfd09 Revert "net: axienet: Fix register defines comment description"
This reverts commit fd86cc6597.
2024-11-24 00:23:54 +01:00
Ksawlii
7dd6e87cff Revert "net: dsa: vsc73xx: pass value in phy_write operation"
This reverts commit 3c0fd5c577.
2024-11-24 00:23:53 +01:00
Ksawlii
f4d0eedded Revert "net: dsa: vsc73xx: use read_poll_timeout instead delay loop"
This reverts commit 98c55bf660.
2024-11-24 00:23:53 +01:00
Ksawlii
36bbae2b95 Revert "net: dsa: vsc73xx: check busy flag in MDIO operations"
This reverts commit 509fc0dcd1.
2024-11-24 00:23:53 +01:00
Ksawlii
29c857027d Revert "net: hns3: fix wrong use of semaphore up"
This reverts commit deb6d455f4.
2024-11-24 00:23:53 +01:00
Ksawlii
39f88f5bf8 Revert "net: hns3: fix a deadlock problem when config TC during resetting"
This reverts commit 26a0b43c4b.
2024-11-24 00:23:53 +01:00
Ksawlii
038863cd84 Revert "wifi: cw1200: Avoid processing an invalid TIM IE"
This reverts commit 045e1a3f2e.
2024-11-24 00:23:53 +01:00
Ksawlii
911ea2912e Revert "wifi: iwlwifi: abort scan when rfkill on but device enabled"
This reverts commit a2e13a5078.
2024-11-24 00:23:53 +01:00
Ksawlii
52f4f64489 Revert "net/sun3_82586: Avoid reading past buffer in debug output"
This reverts commit 70d98df8ea.
2024-11-24 00:23:52 +01:00
Ksawlii
0eeaf7577a Revert "net: hns3: add checking for vf id of mailbox"
This reverts commit 7e18329b75.
2024-11-24 00:23:52 +01:00
Ksawlii
c3c4efe7b0 Revert "media: solo6x10: replace max(a, min(b, c)) by clamp(b, a, c)"
This reverts commit 0e0829bf72.
2024-11-24 00:23:52 +01:00
Ksawlii
68834d1c47 Revert "bonding: fix bond_ipsec_offload_ok return type"
This reverts commit 38a3a70b3e.
2024-11-24 00:23:51 +01:00
Ksawlii
6de0889cec Revert "bonding: fix null pointer deref in bond_ipsec_offload_ok"
This reverts commit 4552f9f0ae.
2024-11-24 00:23:51 +01:00
Ksawlii
0f85dd45e4 Revert "bonding: fix xfrm real_dev null pointer dereference"
This reverts commit 9fa8811d1a.
2024-11-24 00:23:51 +01:00
Ksawlii
b4e9e5b37a Revert "bonding: fix xfrm state handling when clearing active slave"
This reverts commit 08a3b787ac.
2024-11-24 00:23:51 +01:00
Ksawlii
5036a90d21 Revert "ice: fix ICE_LAST_OFFSET formula"
This reverts commit 9a98cb967c.
2024-11-24 00:23:51 +01:00
Ksawlii
091e8249c6 Revert "net: dsa: mv88e6xxx: read FID when handling ATU violations"
This reverts commit 6fad67a4c7.
2024-11-24 00:23:51 +01:00
Ksawlii
c346f9c457 Revert "net: dsa: mv88e6xxx: replace ATU violation prints with trace points"
This reverts commit f634cf4b40.
2024-11-24 00:23:51 +01:00
Ksawlii
6c2054cc66 Revert "net: dsa: mv88e6xxx: Fix out-of-bound access"
This reverts commit 2230f96d6c.
2024-11-24 00:23:51 +01:00
Ksawlii
6fe606a02b Revert "net: xilinx: axienet: Always disable promiscuous mode"
This reverts commit a7875446c0.
2024-11-24 00:23:51 +01:00
Ksawlii
09bc706e3c Revert "net: xilinx: axienet: Fix dangling multicast addresses"
This reverts commit ae9628b4fa.
2024-11-24 00:23:50 +01:00
Ksawlii
4791d94bc3 Revert "mmc: mmc_test: Fix NULL dereference on allocation failure"
This reverts commit b70b468ec3.
2024-11-24 00:23:50 +01:00
Ksawlii
10dedc6446 Revert "Bluetooth: hci_ldisc: check HCI_UART_PROTO_READY flag in HCIUARTGETPROTO"
This reverts commit fcac1fea69.
2024-11-24 00:23:50 +01:00
Ksawlii
8091d268fa Revert "pinctrl: rockchip: correct RK3328 iomux width flag for GPIO2-B pins"
This reverts commit 14eab2181c.
2024-11-24 00:23:50 +01:00
Ksawlii
cc2f1bd0df Revert "pinctrl: single: fix potential NULL dereference in pcs_get_function()"
This reverts commit d6e934ecd6.
2024-11-24 00:23:50 +01:00
Ksawlii
8b24cf4850 Revert "wifi: mwifiex: duplicate static structs used in driver instances"
This reverts commit b610ebf3a2.
2024-11-24 00:23:50 +01:00
Ksawlii
42755cc6a5 Revert "media: uvcvideo: Fix integer overflow calculating timestamp"
This reverts commit c5bc5ad44b.
2024-11-24 00:23:50 +01:00
Ksawlii
228acff879 Revert "ata: libata-core: Fix null pointer dereference on error"
This reverts commit c45f01f66c.
2024-11-24 00:23:50 +01:00
Ksawlii
cdca95f775 Revert "soundwire: stream: fix programming slave ports for non-continous port maps"
This reverts commit b3c3ea14b3.
2024-11-24 00:23:49 +01:00
Ksawlii
eac4761f23 Revert "gtp: fix a potential NULL pointer dereference"
This reverts commit fa13bd9705.
2024-11-24 00:23:49 +01:00
Ksawlii
8f5ba6f0d2 Revert "scsi: aacraid: Fix double-free on probe failure"
This reverts commit 8a4b738d45.
2024-11-24 00:23:49 +01:00
Ksawlii
1ffb9c4abb Revert "drm: panel-orientation-quirks: Add quirk for OrangePi Neo"
This reverts commit 7dc65657e4.
2024-11-24 00:23:49 +01:00
Ksawlii
4b0722c93f Revert "net: usb: qmi_wwan: add MeiG Smart SRM825L"
This reverts commit 00c231ae05.
2024-11-24 00:23:48 +01:00
Ksawlii
7473e7c839 Revert "hwspinlock: Introduce hwspin_lock_bust()"
This reverts commit 5bfff48f58.
2024-11-24 00:23:48 +01:00
Ksawlii
dd0cd80967 Revert "wifi: iwlwifi: remove fw_running op"
This reverts commit 16883bf3ae.
2024-11-24 00:23:48 +01:00
Ksawlii
7880ee3bdd Revert "media: uvcvideo: Enforce alignment of frame and interval"
This reverts commit 9ac71d6755.
2024-11-24 00:23:47 +01:00
Ksawlii
179a92ca0d Revert "virtio_net: Fix napi_skb_cache_put warning"
This reverts commit a5315ef480.
2024-11-24 00:23:46 +01:00
Ksawlii
7dc3729a31 Revert "ata: libata: Fix memory leak for error path in ata_host_alloc()"
This reverts commit f51ad3cb56.
2024-11-24 00:23:46 +01:00
Ksawlii
1061ec7626 Revert "irqchip/gic-v2m: Fix refcount leak in gicv2m_of_init()"
This reverts commit 273f9c0822.
2024-11-24 00:23:46 +01:00
Ksawlii
1e55dc00f6 Revert "can: mcp251x: fix deadlock if an interrupt occurs during mcp251x_open"
This reverts commit bd0d86f91e.
2024-11-24 00:23:45 +01:00
Ksawlii
9ef6f3ea9a Revert "irqchip/armada-370-xp: Do not allow mapping IRQ 0 and 1"
This reverts commit 885f9ed9d0.
2024-11-24 00:23:43 +01:00
Ksawlii
7af2ee528f Revert "iommu: sun50i: clear bypass register"
This reverts commit b20eddd632.
2024-11-24 00:23:43 +01:00
Ksawlii
23f35dbaf9 Revert "media: vivid: fix wrong sizeimage value for mplane"
This reverts commit fd87bc3da5.
2024-11-24 00:23:43 +01:00
Ksawlii
3c26f43512 Revert "leds: spi-byte: Call of_node_put() on error path"
This reverts commit 138edb23f7.
2024-11-24 00:23:43 +01:00
Ksawlii
9c8504d56e Revert "wifi: brcmsmac: advertise MFP_CAPABLE to enable WPA3"
This reverts commit 8ec1b558ee.
2024-11-24 00:23:42 +01:00
Ksawlii
92f524a047 Revert "usb: uas: set host status byte on data completion error"
This reverts commit 1192d08166.
2024-11-24 00:23:42 +01:00
Ksawlii
e348db18c0 Revert "media: vivid: don't set HDMI TX controls if there are no HDMI outputs"
This reverts commit fed608965d.
2024-11-24 00:23:42 +01:00
Ksawlii
2c757dbb98 Revert "PCI: keystone: Add workaround for Errata #i2037 (AM65x SR 1.0)"
This reverts commit 5738327c02.
2024-11-24 00:23:42 +01:00
Ksawlii
fb8a13301a Revert "media: qcom: camss: Add check for v4l2_fwnode_endpoint_parse"
This reverts commit 1e643cc6a8.
2024-11-24 00:23:42 +01:00
Ksawlii
d0f250e55f Revert "pcmcia: Use resource_size function on resource object"
This reverts commit f50e7b3305.
2024-11-24 00:23:42 +01:00
Ksawlii
35b8c8834d Revert "igb: Fix not clearing TimeSync interrupts for 82580"
This reverts commit 11b7218c81.
2024-11-24 00:23:42 +01:00
Ksawlii
a4bc5ebe94 Revert "igc: Unlock on error in igc_io_resume()"
This reverts commit d0a818c297.
2024-11-24 00:23:42 +01:00
Ksawlii
27364c06ed Revert "net: usb: don't write directly to netdev->dev_addr"
This reverts commit d16fdd827d.
2024-11-24 00:23:41 +01:00
Ksawlii
24a09ec9d4 Revert "usbnet: modern method to get random MAC"
This reverts commit dd010dbcce.
2024-11-24 00:23:41 +01:00
Ksawlii
2990a48a81 Revert "bareudp: Fix device stats updates."
This reverts commit 831b755d5b.
2024-11-24 00:23:41 +01:00
Ksawlii
e3f85dd1eb Revert "gro: remove rcu_read_lock/rcu_read_unlock from gro_receive handlers"
This reverts commit c35b04ae63.
2024-11-24 00:23:41 +01:00
Ksawlii
db38998ee6 Revert "gro: remove rcu_read_lock/rcu_read_unlock from gro_complete handlers"
This reverts commit db2af80170.
2024-11-24 00:23:41 +01:00
Ksawlii
ddc4bffd5d Revert "net: dsa: vsc73xx: fix possible subblocks range of CAPT block"
This reverts commit d94a0fcfb4.
2024-11-24 00:23:41 +01:00
Ksawlii
55a8ad0391 Revert "dm init: Handle minors larger than 255"
This reverts commit f0c0b03aca.
2024-11-24 00:23:41 +01:00
Ksawlii
9149b550c7 Revert "iommu/vt-d: Handle volatile descriptor status read"
This reverts commit 1780b7b977.
2024-11-24 00:23:40 +01:00
Ksawlii
10efc08feb Revert "devres: Initialize an uninitialized struct member"
This reverts commit 748a0b7fe1.
2024-11-24 00:23:40 +01:00
Ksawlii
4c6495b3d4 Revert "pci/hotplug/pnv_php: Fix hotplug driver crash on Powernv"
This reverts commit 967ec9a044.
2024-11-24 00:23:40 +01:00
Ksawlii
6eb656e2e3 Revert "hwmon: (adc128d818) Fix underflows seen when writing limit attributes"
This reverts commit d38974018c.
2024-11-24 00:23:40 +01:00
Ksawlii
849562406e Revert "hwmon: (lm95234) Fix underflows seen when writing limit attributes"
This reverts commit 05464792b1.
2024-11-24 00:23:40 +01:00
Ksawlii
434e0c060b Revert "hwmon: (nct6775-core) Fix underflows seen when writing limit attributes"
This reverts commit 8233145bc9.
2024-11-24 00:23:40 +01:00
Ksawlii
b6b1cfa179 Revert "hwmon: (w83627ehf) Fix underflows seen when writing limit attributes"
This reverts commit c02c186774.
2024-11-24 00:23:40 +01:00
Ksawlii
8cac0e6819 Revert "wifi: mwifiex: Do not return unused priv in mwifiex_get_priv_by_id()"
This reverts commit 1129f7beb1.
2024-11-24 00:23:40 +01:00
Ksawlii
f8bda51205 Revert "PCI: Add missing bridge lock to pci_bus_lock()"
This reverts commit 5450cc173d.
2024-11-24 00:23:39 +01:00
Ksawlii
279241fa19 Revert "net: dpaa: avoid on-stack arrays of NR_CPUS elements"
This reverts commit a0e5358edc.
2024-11-24 00:23:39 +01:00
Ksawlii
8e655e1dbc Revert "HID: cougar: fix slab-out-of-bounds Read in cougar_report_fixup"
This reverts commit ee2cecbb6d.
2024-11-24 00:23:39 +01:00
Ksawlii
0c220f8a78 Revert "Input: uinput - reject requests with unreasonable number of slots"
This reverts commit 5bf3db8b83.
2024-11-24 00:23:39 +01:00
Ksawlii
54b7a02bce Revert "usbnet: ipheth: race between ipheth_close and error handling"
This reverts commit 806a25636b.
2024-11-24 00:23:39 +01:00
Ksawlii
0c4f581c2d Revert "of/irq: Prevent device address out-of-bounds read in interrupt map walk"
This reverts commit 017b0a488a.
2024-11-24 00:23:38 +01:00
Ksawlii
6aaccefee5 Revert "ata: pata_macio: Use WARN instead of BUG"
This reverts commit f78466050f.
2024-11-24 00:23:38 +01:00
Ksawlii
f892b38843 Revert "staging: iio: frequency: ad9834: Validate frequency parameter value"
This reverts commit 46f65f7b83.
2024-11-24 00:23:38 +01:00
Ksawlii
caee88ae5f Revert "iio: buffer-dmaengine: fix releasing dma channel on error"
This reverts commit 776ddbde62.
2024-11-24 00:23:38 +01:00
Ksawlii
08390b1a41 Revert "iio: fix scale application in iio_convert_raw_to_processed_unlocked"
This reverts commit 7065933b99.
2024-11-24 00:23:38 +01:00
Ksawlii
47fd099684 Revert "iio: adc: ad7124: fix chip ID mismatch"
This reverts commit 2c98fab600.
2024-11-24 00:23:38 +01:00
Ksawlii
fa7cf55b44 Revert "binder: fix UAF caused by offsets overwrite"
This reverts commit 5a900b02fb.
2024-11-24 00:23:38 +01:00
Ksawlii
62198fea21 Revert "nvmem: Fix return type of devm_nvmem_device_get() in kerneldoc"
This reverts commit 84f73c7883.
2024-11-24 00:23:38 +01:00
Ksawlii
8223ecb73a Revert "uio_hv_generic: Fix kernel NULL pointer dereference in hv_uio_rescind"
This reverts commit 80b4034890.
2024-11-24 00:23:37 +01:00
Ksawlii
2fa99f4c04 Revert "Drivers: hv: vmbus: Fix rescind handling in uio_hv_generic"
This reverts commit e18149c5ff.
2024-11-24 00:23:37 +01:00
Ksawlii
cdd2f8b719 Revert "VMCI: Fix use-after-free when removing resource in vmci_resource_remove()"
This reverts commit 7cfe24a873.
2024-11-24 00:23:37 +01:00
Ksawlii
10e292d1f6 Revert "clocksource/drivers/imx-tpm: Fix return -ETIME when delta exceeds INT_MAX"
This reverts commit 36e2da06de.
2024-11-24 00:23:37 +01:00
Ksawlii
983be60aeb Revert "clocksource/drivers/imx-tpm: Fix next event not taking effect sometime"
This reverts commit 3157b81190.
2024-11-24 00:23:37 +01:00
Ksawlii
ad0197fe73 Revert "clocksource/drivers/timer-of: Remove percpu irq related code"
This reverts commit 0a821fa735.
2024-11-24 00:23:37 +01:00
Ksawlii
4a55e586a9 Revert "ACPI: processor: Return an error if acpi_processor_get_info() fails in processor_add()"
This reverts commit feb1c4c885.
2024-11-24 00:23:37 +01:00
Ksawlii
7f9358fa8c Revert "ACPI: processor: Fix memory leaks in error paths of processor_add()"
This reverts commit bf6acb113e.
2024-11-24 00:23:37 +01:00
Ksawlii
4063b09e58 Revert "nvmet-tcp: fix kernel crash if commands allocation fails"
This reverts commit e7261a6c8e.
2024-11-24 00:23:36 +01:00
Ksawlii
c187eb4fd5 Revert "drm/i915/fence: Mark debug_fence_init_onstack() with __maybe_unused"
This reverts commit 3ee84729fc.
2024-11-24 00:23:36 +01:00
Ksawlii
2d9bc5b4af Revert "drm/i915/fence: Mark debug_fence_free() with __maybe_unused"
This reverts commit 0bb1e0a912.
2024-11-24 00:23:36 +01:00
Ksawlii
de3207402a Revert "mmc: cqhci: Fix checking of CQHCI_HALT state"
This reverts commit 8762442fe9.
2024-11-24 00:23:36 +01:00
Ksawlii
f2e6512f69 Revert "usb: dwc3: core: Enable GUCTL1 bit 10 for fixing termination error after resume bug"
This reverts commit db4ac425de.
2024-11-24 00:23:36 +01:00
Ksawlii
ae1d76ae91 Revert "usb: dwc3: core: update LC timer as per USB Spec V3.2"
This reverts commit cf08a3aa97.
2024-11-24 00:23:36 +01:00
Ksawlii
21aef4054e Revert "usbnet: ipheth: fix carrier detection in modes 1 and 4"
This reverts commit ee4da2f98f.
2024-11-24 00:23:36 +01:00
Ksawlii
13a9224eff Revert "net: ethernet: use ip_hdrlen() instead of bit shift"
This reverts commit e9c6237f35.
2024-11-24 00:23:36 +01:00
Ksawlii
dda6252518 Revert "net: phy: vitesse: repair vsc73xx autonegotiation"
This reverts commit 7ba04fa7a8.
2024-11-24 00:23:36 +01:00
Ksawlii
457e8e4a8e Revert "Input: ads7846 - ratelimit the spi_sync error message"
This reverts commit 1d76f9917e.
2024-11-24 00:23:35 +01:00
Ksawlii
322e1c22c6 Revert "Input: synaptics - enable SMBus for HP Elitebook 840 G2"
This reverts commit 6557ddc215.
2024-11-24 00:23:35 +01:00
Ksawlii
37e508a03b Revert "drm/msm/adreno: Fix error return if missing firmware-name"
This reverts commit 114e57cc55.
2024-11-24 00:23:35 +01:00
Ksawlii
baed530a0b Revert "Input: i8042 - add Fujitsu Lifebook E756 to i8042 quirk table"
This reverts commit 17026c4b16.
2024-11-24 00:23:35 +01:00
Ksawlii
911600bccd Revert "minmax: reduce min/max macro expansion in atomisp driver"
This reverts commit d545865498.
2024-11-24 00:23:35 +01:00
Ksawlii
ac0f56f632 Revert "hwmon: (pmbus) Introduce and use write_byte_data callback"
This reverts commit cbbc2c6747.
2024-11-24 00:23:35 +01:00
Ksawlii
909ef4903f Revert "hwmon: (pmbus) Conditionally clear individual status bits for pmbus rev >= 1.2"
This reverts commit 32dddc06e5.
2024-11-24 00:23:35 +01:00
Ksawlii
1ba1b1e7b3 Revert "ice: fix accounting for filters shared by multiple VSIs"
This reverts commit 14c7602518.
2024-11-24 00:23:35 +01:00
Ksawlii
4f4fca3a0f Revert "net/mlx5: Update the list of the PCI supported devices"
This reverts commit 5faf98b4ac.
2024-11-24 00:23:34 +01:00
Ksawlii
551674c42e Revert "net/mlx5e: Add missing link modes to ptys2ethtool_map"
This reverts commit e25fd0c3e1.
2024-11-24 00:23:34 +01:00
Ksawlii
d85c07139d Revert "net: ftgmac100: Enable TX interrupt to avoid TX timeout"
This reverts commit eb248351db.
2024-11-24 00:23:34 +01:00
Ksawlii
b73b428f1d Revert "net: dpaa: Pad packets to ETH_ZLEN"
This reverts commit 3ad5828caa.
2024-11-24 00:23:34 +01:00
Ksawlii
9d83979a0a Revert "spi: nxp-fspi: fix the KASAN report out-of-bounds bug"
This reverts commit cf311de33d.
2024-11-24 00:23:34 +01:00
Ksawlii
23b583a310 Revert "soundwire: stream: Revert "soundwire: stream: fix programming slave ports for non-continous port maps""
This reverts commit 34cb54b644.
2024-11-24 00:23:34 +01:00
Ksawlii
41978fa471 Revert "pinctrl: at91: make it work with current gpiolib"
This reverts commit 9e70c59329.
2024-11-24 00:23:33 +01:00
Ksawlii
d4c68e1fc4 Revert "net: ftgmac100: Ensure tx descriptor updates are visible"
This reverts commit f48cec25ee.
2024-11-24 00:23:33 +01:00
Ksawlii
41c096fbd1 Revert "wifi: iwlwifi: lower message level for FW buffer destination"
This reverts commit 5b1fe09fed.
2024-11-24 00:23:33 +01:00
Ksawlii
b93dfe3647 Revert "wifi: iwlwifi: mvm: don't wait for tx queues if firmware is dead"
This reverts commit 793a26784e.
2024-11-24 00:23:33 +01:00
Ksawlii
3a0492cae8 Revert "drm: komeda: Fix an issue related to normalized zpos"
This reverts commit f98965500e.
2024-11-24 00:23:33 +01:00
Ksawlii
a07cc604fc Revert "spi: bcm63xx: Enable module autoloading"
This reverts commit 3df481428c.
2024-11-24 00:23:33 +01:00
Ksawlii
147ce5e81c Revert "gpio: prevent potential speculation leaks in gpio_device_get_desc()"
This reverts commit fc35a684e9.
2024-11-24 00:23:32 +01:00
Ksawlii
0f1229f8a4 Revert "gpiolib: cdev: Ignore reconfiguration without direction"
This reverts commit e527ce3745.
2024-11-24 00:23:31 +01:00
Ksawlii
ffa9062c50 Revert "usb: dwc3: Fix a typo in field name"
This reverts commit b291f0bf0d.
2024-11-24 00:23:31 +01:00
Ksawlii
859bc903c9 Revert "USB: serial: pl2303: add device id for Macrosilicon MS3020"
This reverts commit c023c1f169.
2024-11-24 00:23:31 +01:00
Ksawlii
bb47ce07e5 Revert "USB: usbtmc: prevent kernel-usb-infoleak"
This reverts commit d3fd52ffc5.
2024-11-24 00:23:31 +01:00