linux_dsm_epyc7002/drivers/net/ethernet/qlogic/qede
Colin Ian King 1dc2b3d655 qede: fix write to free'd pointer error and double free of ptp
The err2 error return path calls qede_ptp_disable that cleans up
on an error and frees ptp. After this, the free'd ptp is dereferenced
when ptp->clock is set to NULL and the code falls-through to error
path err1 that frees ptp again.

Fix this by calling qede_ptp_disable and exiting via an error
return path that does not set ptp->clock or kfree ptp.

Addresses-Coverity: ("Write to pointer after free")
Fixes: 035744975a ("qede: Add support for PTP resource locking.")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-12 16:55:47 -07:00
..
Makefile
qede_dcbnl.c
qede_ethtool.c qede: Fix internal loopback failure with jumbo mtu configuration 2019-03-07 09:43:30 -08:00
qede_filter.c qede: use ethtool_rx_flow_rule() to remove duplicated parser code 2019-02-06 10:38:26 -08:00
qede_fp.c qede: Fix system crash on configuring channels. 2019-02-06 16:53:33 -08:00
qede_main.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-02-08 15:00:17 -08:00
qede_ptp.c qede: fix write to free'd pointer error and double free of ptp 2019-04-12 16:55:47 -07:00
qede_ptp.h
qede_rdma.c qede: Error recovery process 2019-01-28 10:58:41 -08:00
qede.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-02-08 15:00:17 -08:00