diff options
| author | Colin Ian King <colin.king@canonical.com> | 2019-04-12 15:13:27 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-05-16 19:41:21 +0200 |
| commit | 08f2c299b38ccd63b3ad7b84f5f31e38aa9486b9 (patch) | |
| tree | cb757b2ffae9c0e4dc4ed9ff5948fdfd5ed10e07 /drivers/gpu | |
| parent | 090b740200147839228a019b2ed80d139398e095 (diff) | |
qede: fix write to free'd pointer error and double free of ptp
[ Upstream commit 1dc2b3d65523780ed1972d446c76e62e13f3e8f5 ]
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: 035744975aec ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/gpu')
0 files changed, 0 insertions, 0 deletions
