1
linux/drivers
Wei Fang e15c5506dd net: enetc: allocate vf_state during PF probes
In the previous implementation, vf_state is allocated memory only when VF
is enabled. However, net_device_ops::ndo_set_vf_mac() may be called before
VF is enabled to configure the MAC address of VF. If this is the case,
enetc_pf_set_vf_mac() will access vf_state, resulting in access to a null
pointer. The simplified error log is as follows.

root@ls1028ardb:~# ip link set eno0 vf 1 mac 00:0c:e7:66:77:89
[  173.543315] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000004
[  173.637254] pc : enetc_pf_set_vf_mac+0x3c/0x80 Message from sy
[  173.641973] lr : do_setlink+0x4a8/0xec8
[  173.732292] Call trace:
[  173.734740]  enetc_pf_set_vf_mac+0x3c/0x80
[  173.738847]  __rtnl_newlink+0x530/0x89c
[  173.742692]  rtnl_newlink+0x50/0x7c
[  173.746189]  rtnetlink_rcv_msg+0x128/0x390
[  173.750298]  netlink_rcv_skb+0x60/0x130
[  173.754145]  rtnetlink_rcv+0x18/0x24
[  173.757731]  netlink_unicast+0x318/0x380
[  173.761665]  netlink_sendmsg+0x17c/0x3c8

Fixes: d4fd0404c1 ("enetc: Introduce basic PF and VF ENETC ethernet drivers")
Signed-off-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20241031060247.1290941-2-wei.fang@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-11-03 12:50:53 -08:00
..
accel accel/qaic: Fix the for loop used to walk SG table 2024-10-12 14:55:55 -06:00
accessibility
acpi ACPI updates for 6.12-rc5 2024-10-25 11:04:34 -07:00
amba
android
ata ata: libata: Set DID_TIME_OUT for commands that actually timed out 2024-10-24 11:14:00 +02:00
atm
auxdisplay move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
base pmdomain core: 2024-10-11 11:26:15 -07:00
bcma
block block-6.12-20241018 2024-10-18 15:53:00 -07:00
bluetooth Bluetooth: btusb: Fix regression with fake CSR controllers 0a12:0001 2024-10-16 16:10:25 -04:00
bus
cache
cdrom cdrom: Avoid barrier_nospec() in cdrom_ioctl_media_changed() 2024-10-17 19:47:15 -06:00
cdx
char tpm: Lazily flush the auth session 2024-10-29 00:46:20 +02:00
clk Two clk driver fixes and a unit test fix: 2024-10-17 16:24:42 -07:00
clocksource
comedi move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
connector
counter move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
cpufreq cpufreq/amd-pstate: Use nominal perf for limits when boost is disabled 2024-10-15 23:54:15 -05:00
cpuidle
crypto This push fixes the following issues: 2024-10-16 08:42:54 -07:00
cxl move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
dax device-dax: correct pgoff align in dax_set_mapping() 2024-10-09 12:47:19 -07:00
dca
devfreq
dio
dma dmaengine: cirrus: check that output may be truncated 2024-10-11 09:55:47 +00:00
dma-buf
dpll
edac
eisa
extcon
firewire firewire: core: fix invalid port index for parent device 2024-10-27 11:14:35 +09:00
firmware Arm SCMI fixes for v6.12 2024-10-15 20:39:43 +00:00
fpga move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
fsi move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
gnss
gpio gpio: aspeed: Use devm_clk api to manage clock source 2024-10-08 16:01:58 +02:00
gpu Driver Changes: 2024-10-25 16:55:39 +10:00
greybus move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hid hid-for-linus-20241024 2024-10-24 16:31:58 -07:00
hsi
hte
hv
hwmon [PATCH} hwmon: (jc42) Properly detect TSE2004-compliant devices again 2024-10-14 19:14:08 -07:00
hwspinlock
hwtracing
i2c i2c-for-6.12-rc2 2024-10-05 10:31:04 -07:00
i3c
idle
iio IIO: 1st set of fixes for the 6.12 cycle. 2024-10-13 17:23:47 +02:00
infiniband RDMA/bnxt_re: Fix the GID table length 2024-10-11 20:49:02 -03:00
input Input updates for v6.12-rc3 2024-10-19 10:18:03 -07:00
interconnect
iommu iommu/vt-d: Fix incorrect pci_for_each_dma_alias() for non-PCI devices 2024-10-15 10:17:54 +02:00
ipack
irqchip irqchip/renesas-rzg2l: Fix missing put_device 2024-10-15 23:54:35 +02:00
isdn move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
leds move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
macintosh move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
mailbox
mcb
md block-6.12-20241026 2024-10-27 08:29:36 -10:00
media move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
memory
memstick move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
message
mfd move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
misc Char/Misc/IIO fixes for 6.12-rc4 2024-10-20 13:10:44 -07:00
mmc MMC core: 2024-10-11 11:23:21 -07:00
most
mtd move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
mux
net net: enetc: allocate vf_state during PF probes 2024-11-03 12:50:53 -08:00
nfc move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
ntb
nubus
nvdimm
nvme block-6.12-20241018 2024-10-18 15:53:00 -07:00
nvmem
of of: Skip kunit tests when arm64+ACPI doesn't populate root node 2024-10-10 12:43:01 -05:00
opp OPP: fix error code in dev_pm_opp_set_config() 2024-10-02 01:27:50 +02:00
parisc
parport parport: Proper fix for array out-of-bounds access 2024-10-13 18:17:35 +02:00
pci pci-v6.12-fixes-1 2024-10-25 10:56:06 -07:00
pcmcia move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
peci move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
perf drivers/perf: riscv: Align errno for unsupported perf event 2024-10-01 02:47:39 -07:00
phy
pinctrl pinctrl: ocelot: fix system hang on level based interrupts 2024-10-12 22:04:38 +02:00
platform platform-drivers-x86 for v6.12-3 2024-10-27 08:40:33 -10:00
pmdomain pmdomain: qcom-cpr: Fix the return of uninitialized variable 2024-10-02 12:38:53 +02:00
pnp
power move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
powercap powercap: dtpm_devfreq: Fix error check against dev_pm_qos_add_request() 2024-10-21 13:23:06 +02:00
pps
ps3
ptp move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
s390 s390/sclp_vt220: Convert newlines to CRLF instead of LFCR 2024-10-16 11:32:32 +02:00
sbus
scsi SCSI fixes on 20241030 2024-10-30 08:16:23 -10:00
sh
siox
slimbus
soc FSL SOC fixes for v6.12: 2024-10-11 10:03:13 +00:00
soundwire soundwire: intel_ace2x: Send PDI stream number during prepare 2024-10-17 12:11:19 +01:00
spi spi: spi-fsl-dspi: Fix crash when not using GPIO chip select 2024-10-23 22:37:54 +01:00
spmi
ssb
staging move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
target SCSI fixes on 20241019 2024-10-19 12:52:19 -07:00
tc
tee
thermal Power management updates for 6.12-rc3 2024-10-11 11:41:20 -07:00
thunderbolt
tty serial: qcom-geni: rename suspend functions 2024-10-11 08:39:24 +02:00
ufs SCSI fixes on 20241030 2024-10-30 08:16:23 -10:00
uio
usb USB-serial device ids for 6.12-rc4 2024-10-18 12:11:28 +02:00
vdpa virtio: bugfixes 2024-10-07 11:33:26 -07:00
vfio
vhost virtio: bugfixes 2024-10-07 11:33:26 -07:00
video fbdev: wm8505fb: select CONFIG_FB_IOMEM_FOPS 2024-10-21 11:16:51 +02:00
virt
virtio virtio: bugfixes 2024-10-07 11:33:26 -07:00
w1
watchdog move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
xen xen: Remove dependency between pciback and privcmd 2024-10-18 11:59:04 +02:00
zorro
Kconfig
Makefile