[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190412.165609.2012085988991418522.davem@davemloft.net>
Date: Fri, 12 Apr 2019 16:56:09 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: colin.king@...onical.com
Cc: aelior@...vell.com, GR-everest-linux-l2@...vell.com,
netdev@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] qede: fix write to free'd pointer error and double
free of ptp
From: Colin King <colin.king@...onical.com>
Date: Fri, 12 Apr 2019 15:13:27 +0100
> From: Colin Ian King <colin.king@...onical.com>
>
> 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@...onical.com>
Also applied, thanks Colin.
Powered by blists - more mailing lists