Ubuntu-focal-kernel/drivers/net
Neta Ostrovsky cc5b9646fe net/mlx5: Update error handler for UCTX and UMEM
In the fast unload flow, the device state is set to internal error,
which indicates that the driver started the destroy process.
In this case, when a destroy command is being executed, it should return
MLX5_CMD_STAT_OK.
Fix MLX5_CMD_OP_DESTROY_UCTX and MLX5_CMD_OP_DESTROY_UMEM to return OK
instead of EIO.

This fixes a call trace in the umem release process -
[ 2633.536695] Call Trace:
[ 2633.537518]  ib_uverbs_remove_one+0xc3/0x140 [ib_uverbs]
[ 2633.538596]  remove_client_context+0x8b/0xd0 [ib_core]
[ 2633.539641]  disable_device+0x8c/0x130 [ib_core]
[ 2633.540615]  __ib_unregister_device+0x35/0xa0 [ib_core]
[ 2633.541640]  ib_unregister_device+0x21/0x30 [ib_core]
[ 2633.542663]  __mlx5_ib_remove+0x38/0x90 [mlx5_ib]
[ 2633.543640]  auxiliary_bus_remove+0x1e/0x30 [auxiliary]
[ 2633.544661]  device_release_driver_internal+0x103/0x1f0
[ 2633.545679]  bus_remove_device+0xf7/0x170
[ 2633.546640]  device_del+0x181/0x410
[ 2633.547606]  mlx5_rescan_drivers_locked.part.10+0x63/0x160 [mlx5_core]
[ 2633.548777]  mlx5_unregister_device+0x27/0x40 [mlx5_core]
[ 2633.549841]  mlx5_uninit_one+0x21/0xc0 [mlx5_core]
[ 2633.550864]  remove_one+0x69/0xe0 [mlx5_core]
[ 2633.551819]  pci_device_remove+0x3b/0xc0
[ 2633.552731]  device_release_driver_internal+0x103/0x1f0
[ 2633.553746]  unbind_store+0xf6/0x130
[ 2633.554657]  kernfs_fop_write+0x116/0x190
[ 2633.555567]  vfs_write+0xa5/0x1a0
[ 2633.556407]  ksys_write+0x4f/0xb0
[ 2633.557233]  do_syscall_64+0x5b/0x1a0
[ 2633.558071]  entry_SYSCALL_64_after_hwframe+0x65/0xca
[ 2633.559018] RIP: 0033:0x7f9977132648
[ 2633.559821] Code: 89 02 48 c7 c0 ff ff ff ff eb b3 0f 1f 80 00 00 00 00 f3 0f 1e fa 48 8d 05 55 6f 2d 00 8b 00 85 c0 75 17 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 58 c3 0f 1f 80 00 00 00 00 41 54 49 89 d4 55
[ 2633.562332] RSP: 002b:00007fffb1a83888 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[ 2633.563472] RAX: ffffffffffffffda RBX: 000000000000000c RCX: 00007f9977132648
[ 2633.564541] RDX: 000000000000000c RSI: 000055b90546e230 RDI: 0000000000000001
[ 2633.565596] RBP: 000055b90546e230 R08: 00007f9977406860 R09: 00007f9977a54740
[ 2633.566653] R10: 0000000000000000 R11: 0000000000000246 R12: 00007f99774056e0
[ 2633.567692] R13: 000000000000000c R14: 00007f9977400880 R15: 000000000000000c
[ 2633.568725] ---[ end trace 10b4fe52945e544d ]---

Fixes: 6a6fabbfa3 ("net/mlx5: Update pci error handler entries and command translation")
Signed-off-by: Neta Ostrovsky <netao@nvidia.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>

CVE-2021-47212
(backported from commit ba50cd9451f6c49cf0841c0a4a146ff6a2822699)
[koichiroden: Adjusted context due to missing commit 8f01054186
 ("net/mlx5: SF, Add port add delete functionality")]
Signed-off-by: Koichiro Den <koichiro.den@canonical.com>
Acked-by: Thibault Ferrante <thibault.ferrante@canonical.com>
Acked-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
2024-09-27 10:50:35 +02:00
..
appletalk
arcnet
bonding net: bonding: correctly annotate RCU in bond_should_notify_peers() 2024-09-27 10:50:16 +02:00
caif
can can: kvaser_usb: fix return value for hif_usb_send_regout 2024-09-27 10:50:09 +02:00
dsa net: dsa: vsc73xx: fix possible subblocks range of CAPT block 2024-09-27 10:50:32 +02:00
ethernet net/mlx5: Update error handler for UCTX and UMEM 2024-09-27 10:50:35 +02:00
fddi
fjes
hamradio
hippi
hyperv hv_netvsc: Register VF in netvsc_probe if NET_DEVICE_REGISTER missed 2024-06-07 15:01:22 +02:00
ieee802154
ipvlan ipvlan: Dont Use skb->sk in ipvlan_process_v{4,6}_outbound 2024-07-05 10:52:02 +02:00
netdevsim
phy net: phy: micrel: add Microchip KSZ 9477 to the device table 2024-08-02 16:16:21 +02:00
plip
ppp ppp: reject claimed-as-LCP but actually malformed packets 2024-08-02 16:16:32 +02:00
slip
team
usb cx82310_eth: fix error return code in cx82310_bind() 2024-09-27 10:50:35 +02:00
vmxnet3
wan net: remove unneeded break 2024-03-28 15:18:38 +01:00
wimax
wireless wifi: mwifiex: Do not return unused priv in mwifiex_get_priv_by_id() 2024-09-27 10:50:33 +02:00
xen-netback xen-netback: properly sync TX responses 2024-03-28 15:18:42 +01:00
Kconfig
LICENSE.SRC
Makefile
Space.c
dummy.c
eql.c
geneve.c geneve: fix header validation in geneve[6]_xmit_skb 2024-06-07 15:01:43 +02:00
gtp.c gtp: fix a potential NULL pointer dereference 2024-09-27 10:50:27 +02:00
ifb.c
loopback.c
macsec.c
macvlan.c
macvtap.c
mdio.c
mii.c
net_failover.c
netconsole.c net: netconsole: Disable target before netpoll cleanup 2024-09-27 10:50:14 +02:00
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c tap: add missing verification for short frame 2024-09-27 10:50:10 +02:00
thunderbolt.c
tun.c tun: add missing verification for short frame 2024-09-27 10:50:10 +02:00
veth.c
virtio_net.c virtio_net: Fix napi_skb_cache_put warning 2024-09-27 10:50:30 +02:00
vrf.c
vsockmon.c
vxlan.c vxlan: Fix regression when dropping packets due to invalid src addresses 2024-08-02 16:16:09 +02:00
xen-netfront.c