From: Max Filippov <jcmvbkbc@gmail.com>
To: Colin King <colin.king@canonical.com>
Cc: "David S . Miller" <davem@davemloft.net>,
Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Tobias Klauser <tklauser@distanz.ch>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][V2] net/ethoc: fix null dereference on error exit path
Date: Thu, 2 Jun 2016 00:25:37 +0300 [thread overview]
Message-ID: <20160601212537.GA14527@octofox.metropolis> (raw)
In-Reply-To: <1464787010-3089-1-git-send-email-colin.king@canonical.com>
On Wed, Jun 01, 2016 at 02:16:50PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> priv is assigned to NULL however some of the early error exit paths to
> label 'free' dereference priv, causing a null pointer dereference.
>
> Move the label 'free' to just the free_netdev statement, and add a new
> exit path 'free2' for the error cases were clk_disable_unprepare needs
> calling before the final free.
>
> Fixes issue found by CoverityScan, CID#113260
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/net/ethernet/ethoc.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
Reviewed-by: Max Filippov <jcmvbkbc@gmail.com>
--
Thanks.
-- Max
next prev parent reply other threads:[~2016-06-01 21:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-01 13:16 [PATCH][V2] net/ethoc: fix null dereference on error exit path Colin King
2016-06-01 21:25 ` Max Filippov [this message]
2016-06-02 5:02 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160601212537.GA14527@octofox.metropolis \
--to=jcmvbkbc@gmail.com \
--cc=andrew@lunn.ch \
--cc=colin.king@canonical.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tklauser@distanz.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).