alistair23-linux/drivers/net
Petr Machata dbcdb61aaf mlxsw: spectrum_ptp: Fix validation in mlxsw_sp1_ptp_packet_finish()
Before mlxsw_sp1_ptp_packet_finish() sends the packet back, it validates
whether the corresponding port is still valid. However the condition is
incorrect: when mlxsw_sp_port == NULL, the code dereferences the port to
compare it to skb->dev.

The condition needs to check whether the port is present and skb->dev still
refers to that port (or else is NULL). If that does not hold, bail out.
Add a pair of parentheses to fix the condition.

Fixes: d92e4e6e33 ("mlxsw: spectrum: PTP: Support timestamping on Spectrum-1")
Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-07-02 15:31:20 -07:00
..
appletalk
arcnet
bonding bonding/main: fix NULL dereference in bond_select_active_slave() 2019-07-02 15:14:48 -07:00
caif
can SPDX update for 5.2-rc6 2019-06-21 09:58:42 -07:00
dsa net: dsa: sja1105: Mark in-band AN modes not supported for PHYLINK 2019-06-28 09:31:31 -07:00
ethernet mlxsw: spectrum_ptp: Fix validation in mlxsw_sp1_ptp_packet_finish() 2019-07-02 15:31:20 -07:00
fddi net: fddi: skfp: Remove unused private PCI definitions 2019-06-26 13:05:42 -07:00
fjes fjes: no need to check return value of debugfs_create functions 2019-06-22 16:43:08 -07:00
hamradio
hippi
hyperv
ieee802154
ipvlan
netdevsim
phy
plip
ppp ppp: mppe: Add softdep to arc4 2019-06-22 09:44:23 -04:00
slip
team Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-06-27 21:06:39 -07:00
usb qmi_wwan: Fix out-of-bounds read 2019-06-24 10:07:12 -07:00
vmxnet3
wan
wimax
wireless wireless-drivers-next patches for 5.3 2019-06-26 10:12:17 -07:00
xen-netback
dummy.c
eql.c
geneve.c SPDX update for 5.2-rc6 2019-06-21 09:58:42 -07:00
gtp.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c loopback: create blackhole net device similar to loopack. 2019-07-01 19:34:46 -07:00
macsec.c
macvlan.c
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c
veth.c veth: use xdp_release_frame for XDP_PASS 2019-06-19 11:23:13 -04:00
virtio_net.c
vrf.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-06-27 21:06:39 -07:00
vsockmon.c
vxlan.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-06-22 08:59:24 -04:00
xen-netfront.c