Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1411548

Re: [PATCH][V2] net/ethoc: fix null dereference on error exit path

From Max Filippov <jcmvbkbc@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH][V2] net/ethoc: fix null dereference on error exit path
Date 2016-06-01 23:30 +0200
Message-ID <rFlSa-5vL-31@gated-at.bofh.it> (permalink)
References <rFedX-qG-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH][V2] net/ethoc: fix null dereference on error exit path Colin King <colin.king@canonical.com> - 2016-06-01 15:20 +0200
  Re: [PATCH][V2] net/ethoc: fix null dereference on error exit path Max Filippov <jcmvbkbc@gmail.com> - 2016-06-01 23:30 +0200
  Re: [PATCH][V2] net/ethoc: fix null dereference on error exit path David Miller <davem@davemloft.net> - 2016-06-02 07:10 +0200

csiph-web