OpenCloudOS-Kernel/drivers/net
Subbaraya Sundeep 699af748c6 octeontx2-pf: mcs: Fix NULL pointer dereferences
When system is rebooted after creating macsec interface
below NULL pointer dereference crashes occurred. This
patch fixes those crashes by using correct order of teardown

[ 3324.406942] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
[ 3324.415726] Mem abort info:
[ 3324.418510]   ESR = 0x96000006
[ 3324.421557]   EC = 0x25: DABT (current EL), IL = 32 bits
[ 3324.426865]   SET = 0, FnV = 0
[ 3324.429913]   EA = 0, S1PTW = 0
[ 3324.433047] Data abort info:
[ 3324.435921]   ISV = 0, ISS = 0x00000006
[ 3324.439748]   CM = 0, WnR = 0
....
[ 3324.575915] Call trace:
[ 3324.578353]  cn10k_mdo_del_secy+0x24/0x180
[ 3324.582440]  macsec_common_dellink+0xec/0x120
[ 3324.586788]  macsec_notify+0x17c/0x1c0
[ 3324.590529]  raw_notifier_call_chain+0x50/0x70
[ 3324.594965]  call_netdevice_notifiers_info+0x34/0x7c
[ 3324.599921]  rollback_registered_many+0x354/0x5bc
[ 3324.604616]  unregister_netdevice_queue+0x88/0x10c
[ 3324.609399]  unregister_netdev+0x20/0x30
[ 3324.613313]  otx2_remove+0x8c/0x310
[ 3324.616794]  pci_device_shutdown+0x30/0x70
[ 3324.620882]  device_shutdown+0x11c/0x204

[  966.664930] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
[  966.673712] Mem abort info:
[  966.676497]   ESR = 0x96000006
[  966.679543]   EC = 0x25: DABT (current EL), IL = 32 bits
[  966.684848]   SET = 0, FnV = 0
[  966.687895]   EA = 0, S1PTW = 0
[  966.691028] Data abort info:
[  966.693900]   ISV = 0, ISS = 0x00000006
[  966.697729]   CM = 0, WnR = 0
[  966.833467] Call trace:
[  966.835904]  cn10k_mdo_stop+0x20/0xa0
[  966.839557]  macsec_dev_stop+0xe8/0x11c
[  966.843384]  __dev_close_many+0xbc/0x140
[  966.847298]  dev_close_many+0x84/0x120
[  966.851039]  rollback_registered_many+0x114/0x5bc
[  966.855735]  unregister_netdevice_many.part.0+0x14/0xa0
[  966.860952]  unregister_netdevice_many+0x18/0x24
[  966.865560]  macsec_notify+0x1ac/0x1c0
[  966.869303]  raw_notifier_call_chain+0x50/0x70
[  966.873738]  call_netdevice_notifiers_info+0x34/0x7c
[  966.878694]  rollback_registered_many+0x354/0x5bc
[  966.883390]  unregister_netdevice_queue+0x88/0x10c
[  966.888173]  unregister_netdev+0x20/0x30
[  966.892090]  otx2_remove+0x8c/0x310
[  966.895571]  pci_device_shutdown+0x30/0x70
[  966.899660]  device_shutdown+0x11c/0x204
[  966.903574]  __do_sys_reboot+0x208/0x290
[  966.907487]  __arm64_sys_reboot+0x20/0x30
[  966.911489]  el0_svc_handler+0x80/0x1c0
[  966.915316]  el0_svc+0x8/0x180
[  966.918362] Code: f9400000 f9400a64 91220014 f94b3403 (f9400060)
[  966.924448] ---[ end trace 341778e799c3d8d7 ]---

Fixes: c54ffc7360 ("octeontx2-pf: mcs: Introduce MACSEC hardware offloading")
Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: Geetha sowjanya <gakula@marvell.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2023-04-27 12:38:11 +02:00
..
appletalk
arcnet
bonding Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-04-20 16:29:51 -07:00
caif
can kvaser_usb: convert USB IDs to hexadecimal values 2023-04-04 16:48:45 +02:00
dsa net: dsa: qca8k: fix LEDS_CLASS dependency 2023-04-21 20:26:41 -07:00
ethernet octeontx2-pf: mcs: Fix NULL pointer dereferences 2023-04-27 12:38:11 +02:00
fddi net: fddi: skfp: rmt: Clean up some inconsistent indenting 2023-04-11 12:46:26 +02:00
fjes
hamradio hamradio: drop ISA_DMA_API dependency 2023-04-19 13:11:41 +01:00
hippi
hyperv Networking changes for 6.3. 2023-02-21 18:24:12 -08:00
ieee802154 Networking changes for 6.4. 2023-04-26 16:07:23 -07:00
ipa Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-03-30 14:43:03 -07:00
ipvlan ipvlan: Make skb->skb_iif track skb->dev for l3s mode 2023-03-10 21:27:15 -08:00
mctp
mdio net: ethernet: Add missing depends on MDIO_DEVRES 2023-04-12 20:38:48 -07:00
netdevsim
pcs net: pcs: xpcs: use Autoneg bit rather than an_enabled 2023-03-22 22:43:05 -07:00
phy net: phy: hide the PHYLIB_LEDS knob 2023-04-26 11:54:50 +02:00
plip
ppp
pse-pd
slip
team
thunderbolt net: thunderbolt: Fix typos in comments 2023-04-12 21:09:12 -07:00
usb r8152: Add __GFP_NOWARN to big allocations 2023-04-07 20:12:46 -07:00
vmxnet3 net: vmxnet3: Fix NULL pointer dereference in vmxnet3_rq_rx_complete() 2023-04-19 09:03:05 +01:00
vxlan vxlan: Expose helper vxlan_build_gbp_hdr 2023-03-17 22:41:16 -07:00
wan net: Use of_property_read_bool() for boolean properties 2023-03-16 17:41:28 +00:00
wireguard cpumask: fix incorrect cpumask scanning result checks 2023-03-06 12:15:13 -08:00
wireless Networking changes for 6.4. 2023-04-26 16:07:23 -07:00
wwan wwan: core: add print for wwan port attach/disconnect 2023-04-20 19:57:43 -07:00
xen-netback xen/netback: use same error messages for same errors 2023-03-30 15:39:23 +02:00
Kconfig net: veth: add page_pool stats 2023-04-24 18:07:08 -07:00
LICENSE.SRC
Makefile
Space.c
amt.c
bareudp.c
dummy.c
eql.c
geneve.c net: geneve: accept every ethertype 2023-03-21 13:39:29 +01:00
gtp.c
ifb.c
loopback.c
macsec.c macsec: Don't rely solely on the dst MAC address to identify destination MACsec device 2023-04-21 08:22:15 +01:00
macvlan.c macvlan: Fix mc_filter calculation 2023-03-31 08:56:42 +01:00
macvtap.c
mdio.c
mhi_net.c
mii.c
net_failover.c net/net_failover: fix txq exceeding warning 2023-03-27 08:08:57 +01:00
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c tap: add support for IOCB_NOWAIT 2023-03-10 16:48:32 -08:00
tun.c Networking changes for 6.4. 2023-04-26 16:07:23 -07:00
veth.c net: veth: add page_pool stats 2023-04-24 18:07:08 -07:00
virtio_net.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-04-20 16:29:51 -07:00
vrf.c
vsockmon.c
xen-netfront.c