aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/loopback.c
diff options
context:
space:
mode:
authorPetr Machata <[email protected]>2019-07-02 19:06:47 +0000
committerDavid S. Miller <[email protected]>2019-07-02 22:31:20 +0000
commitdbcdb61aaf1add3fb15f24f7fcbf30c17d5c11db (patch)
tree2e58130f3ed86d3847890a1421ee6ff053cb9760 /drivers/net/loopback.c
parentr8169: add random MAC address fallback (diff)
downloadkernel-dbcdb61aaf1add3fb15f24f7fcbf30c17d5c11db.tar.gz
kernel-dbcdb61aaf1add3fb15f24f7fcbf30c17d5c11db.zip
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: d92e4e6e33c8 ("mlxsw: spectrum: PTP: Support timestamping on Spectrum-1") Reported-by: Colin Ian King <[email protected]> Signed-off-by: Petr Machata <[email protected]> Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/loopback.c')
0 files changed, 0 insertions, 0 deletions