OpenCloudOS-Kernel/drivers
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
..
accel hwmon updates for v6.4 2023-04-25 17:43:44 -07:00
accessibility
acpi Power management updates for 6.4-rc1 2023-04-25 18:44:10 -07:00
amba ARM: tegra: Remove MODULE_LICENSE in non-modules 2023-04-05 15:03:17 +02:00
android Char/Misc and other driver subsystem changes for 6.3-rc1 2023-02-24 12:47:33 -08:00
ata SCSI misc on 20230426 2023-04-26 15:39:25 -07:00
atm atm: idt77252: fix kmemleak when rmmod idt77252 2023-03-21 20:19:28 -07:00
auxdisplay
base Power management updates for 6.4-rc1 2023-04-25 18:44:10 -07:00
bcma bcma: Add explicit of_device.h include 2023-04-14 15:32:56 +03:00
block for-6.4/block-2023-04-21 2023-04-26 12:52:58 -07:00
bluetooth Bluetooth: btusb: Add WCN6855 devcoredump support 2023-04-23 22:07:27 -07:00
bus asm-generic updates for 6.4 2023-04-25 12:22:11 -07:00
cdrom
char This update includes the following changes: 2023-04-26 08:32:52 -07:00
clk clk: rs9: Fix suspend/resume 2023-03-21 10:47:06 -07:00
clocksource RISC-V: Allow marking IPIs as suitable for remote FENCEs 2023-04-08 11:26:24 +01:00
comedi
connector
counter counter: 104-quad-8: Fix Synapse action reported for Index signals 2023-03-18 09:26:40 -04:00
cpufreq Power management updates for 6.4-rc1 2023-04-25 18:44:10 -07:00
cpuidle cpuidle: Use of_property_present() for testing DT property presence 2023-03-27 19:08:12 +02:00
crypto This update includes the following changes: 2023-04-26 08:32:52 -07:00
cxl Merge branch 'for-6.3/cxl-doe-fixes' into for-6.3/cxl 2023-04-04 15:37:25 -07:00
dax cxl for v6.3 2023-02-25 09:19:23 -08:00
dca
devfreq PM / devfreq: exynos-ppmu: Use devm_platform_get_and_ioremap_resource() 2023-04-04 00:09:32 +09:00
dio
dma dmaengine: apple-admac: Fix 'current_tx' not getting freed 2023-03-31 18:17:21 +05:30
dma-buf Merge tag 'dma-fence-deadline' of https://gitlab.freedesktop.org/drm/msm into drm-next 2023-03-29 15:45:38 +02:00
edac ARM: SoC drivers for v6.4 2023-04-25 12:02:16 -07:00
eisa
extcon
firewire scsi: firewire: sbp2: Declare the SCSI host template const 2023-03-24 19:19:19 -04:00
firmware arm64 updates for 6.4 2023-04-25 12:39:01 -07:00
fpga ACPI updates for 6.4-rc1 2023-04-25 18:37:41 -07:00
fsi
gnss
gpio gpio updates for v6.4-rc1 2023-04-25 17:18:18 -07:00
gpu flexible-array transformations for 6.4-rc1 2023-04-26 08:25:57 -07:00
greybus
hid bpf-next-for-netdev 2023-04-13 16:43:38 -07:00
hsi Driver core changes for 6.3-rc1 2023-02-24 12:58:55 -08:00
hte hte: tegra-194: Use proper includes 2023-03-06 12:33:01 +02:00
hv - Add the necessary glue so that the kernel can run as a confidential 2023-04-25 10:48:08 -07:00
hwmon Thermal control updates for 6.4-rc1 2023-04-25 18:32:43 -07:00
hwspinlock
hwtracing coresight: etm4x: Do not access TRCIDR1 for identification 2023-03-21 12:31:02 +00:00
i2c This update includes the following changes: 2023-04-26 08:32:52 -07:00
i3c I3C for 6.3 2023-02-28 16:05:01 -08:00
idle Power management updates for 6.3-rc1 2023-02-21 12:13:58 -08:00
iio ACPI updates for 6.4-rc1 2023-04-25 18:37:41 -07:00
infiniband SCSI misc on 20230426 2023-04-26 15:39:25 -07:00
input Thermal control updates for 6.4-rc1 2023-04-25 18:32:43 -07:00
interconnect interconnect: exynos: drop redundant link destroy 2023-03-13 21:13:48 +02:00
iommu iommufd: Do not corrupt the pfn list when doing batch carry 2023-04-04 09:10:55 -03:00
ipack Driver core changes for 6.3-rc1 2023-02-24 12:58:55 -08:00
irqchip Merge branch irq/misc-6.4 into irq/irqchip-next 2023-04-21 14:05:31 +01:00
isdn mISDN: remove unused vpm_read_address and cpld_read_reg functions 2023-03-24 19:09:57 -07:00
leds - Remove Drivers 2023-02-23 15:09:31 -08:00
macintosh powerpc updates for 6.3 2023-02-25 11:00:06 -08:00
mailbox remoteproc updates for v6.4 2023-04-25 17:38:25 -07:00
mcb
md - Split dm-bufio's rw_semaphore and rbtree. Offers improvements to 2023-04-26 13:05:21 -07:00
media gpio updates for v6.4-rc1 2023-04-25 17:18:18 -07:00
memory ARM: SoC drivers for v6.4 2023-04-25 12:02:16 -07:00
memstick mmc: Merge branch fixes into next 2023-04-05 11:45:35 +02:00
message scsi: message: mptlan: Fix use after free bug in mptlan_remove() due to race condition 2023-03-24 20:38:50 -04:00
mfd Networking changes for 6.4. 2023-04-26 16:07:23 -07:00
misc drm next for 6.4-rc1 2023-04-25 16:12:15 -07:00
mmc mmc: vub300: remove unreachable code 2023-04-17 11:51:14 +02:00
most
mtd Core MTD changes: 2023-04-25 17:23:42 -07:00
mux
net octeontx2-pf: mcs: Fix NULL pointer dereferences 2023-04-27 12:38:11 +02:00
nfc drivers: nfc: nfcsim: remove return value check of `dev_dir` 2023-04-24 18:12:42 -07:00
ntb
nubus nubus: Drop noop match function 2023-03-20 15:39:14 +01:00
nvdimm virtio,vhost,vdpa: features, fixes 2023-02-25 11:48:02 -08:00
nvme for-6.4/block-2023-04-21 2023-04-26 12:52:58 -07:00
nvmem nvmem: core: return -ENOENT if nvmem cell is not found 2023-03-10 10:55:49 +01:00
of Devicetree fixes for v6.2, part 3: 2023-04-13 15:21:56 -07:00
opp OPP: Move required opps configuration to specialized callback 2023-04-03 09:45:09 +05:30
parisc Kconfig: introduce HAS_IOPORT option and select it as necessary 2023-04-05 22:15:19 +02:00
parport ata: parport_pc: add 16-bit and 8-bit fast EPP transfer flags 2023-03-23 12:22:19 +09:00
pci - Remove an over-zealous sanity check of the array of MSI-X vectors to 2023-04-23 08:15:33 -07:00
pcmcia Driver core changes for 6.3-rc1 2023-02-24 12:58:55 -08:00
peci
perf arm64 updates for 6.4 2023-04-25 12:39:01 -07:00
phy phy: phy-ocelot-serdes: add ability to be used in a non-syscon configuration 2023-03-20 09:08:48 +00:00
pinctrl gpio updates for v6.4-rc1 2023-04-25 17:18:18 -07:00
platform Power management updates for 6.4-rc1 2023-04-25 18:44:10 -07:00
pnp
power Merge back Intel thermal driver changes for 6.4-rc1. 2023-03-31 19:32:43 +02:00
powercap More power management updates for 6.3-rc1 2023-03-03 10:30:58 -08:00
pps
ps3 driver/ps3: Include <video/cmdline.h> for mode parsing 2023-02-20 14:56:51 +01:00
ptp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-03-30 14:43:03 -07:00
pwm pwm: Zero-initialize the pwm_state passed to driver's .get_state() 2023-03-23 14:44:43 +01:00
rapidio
ras
regulator Thermal control updates for 6.4-rc1 2023-04-25 18:32:43 -07:00
remoteproc remoteproc updates for v6.4 2023-04-25 17:38:25 -07:00
reset
rpmsg rpmsg: glink: Consolidate TX_DATA and TX_DATA_CONT 2023-04-19 12:43:19 -07:00
rtc RTC for 6.3 2023-03-03 09:15:50 -08:00
s390 Networking changes for 6.4. 2023-04-26 16:07:23 -07:00
sbus docs: move sparc documentation under Documentation/arch/ 2023-03-30 13:00:34 -06:00
scsi Networking changes for 6.4. 2023-04-26 16:07:23 -07:00
sh sh updates for v6.3 2023-03-01 09:44:22 -08:00
siox
slimbus
soc gpio updates for v6.4-rc1 2023-04-25 17:18:18 -07:00
soundwire soundwire updates for 6.3 2023-02-24 17:29:52 -08:00
spi spi: One small fix for v6.3 2023-04-19 13:49:31 -07:00
spmi
ssb
staging Networking changes for 6.4. 2023-04-26 16:07:23 -07:00
target scsi: target: core: Fix invalid memory access 2023-04-11 20:49:43 -04:00
tc
tee This update includes the following changes: 2023-04-26 08:32:52 -07:00
thermal thermal: intel: int340x: Add DLVR support for RFIM control 2023-04-18 15:24:40 +02:00
thunderbolt thunderbolt: Rename shadowed variables bit to interrupt_bit and auto_clear_bit 2023-03-20 19:00:58 +02:00
tty Networking changes for 6.4. 2023-04-26 16:07:23 -07:00
ufs SCSI misc on 20230426 2023-04-26 15:39:25 -07:00
uio - Daniel Verkamp has contributed a memfd series ("mm/memfd: add 2023-02-23 17:09:35 -08:00
usb Networking changes for 6.4. 2023-04-26 16:07:23 -07:00
vdpa vdpa_sim_net: complete the initialization before register the device 2023-04-04 14:22:12 -04:00
vfio vfio/mlx5: Fix the report of dirty_bytes upon pre-copy 2023-03-13 12:50:59 -06:00
vhost Networking changes for 6.4. 2023-04-26 16:07:23 -07:00
video platform-drivers-x86 for v6.4-1 2023-04-25 16:59:48 -07:00
virt x86/sev: Change snp_guest_issue_request()'s fw_err argument 2023-03-21 15:43:19 +01:00
virtio virtio-mmio: Add explicit include for of.h 2023-04-06 20:36:27 +02:00
vlynq
w1 w1: ds2482: Convert to i2c's .probe_new() 2023-03-09 21:58:57 +01:00
watchdog linux-watchdog 6.3-rc1 tag 2023-03-02 11:12:01 -08:00
xen SCSI misc on 20230426 2023-04-26 15:39:25 -07:00
zorro
Kconfig
Makefile Kbuild updates for v6.3 2023-02-26 11:53:25 -08:00