lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 12 May 2014 14:38:18 +0200
From:	Stefan Richter <stefanr@...6.in-berlin.de>
To:	Daeseok Youn <daeseok.youn@...il.com>
Cc:	linux1394-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] firewire: fix NULL derefencing in fwnet_probe()

On Apr 29 Daeseok Youn wrote:
> "dev" and "net" are NULL when alloc_netdev() is failed.
> So just unlock and return an error.
> 
> Signed-off-by: Daeseok Youn <daeseok.youn@...il.com>

Pushed to linux1394.git.  Thank you.

> ---
>  drivers/firewire/net.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c
> index 4af0a7b..c398645 100644
> --- a/drivers/firewire/net.c
> +++ b/drivers/firewire/net.c
> @@ -1462,8 +1462,8 @@ static int fwnet_probe(struct fw_unit *unit,
>  
>  	net = alloc_netdev(sizeof(*dev), "firewire%d", fwnet_init_dev);
>  	if (net == NULL) {
> -		ret = -ENOMEM;
> -		goto out;
> +		mutex_unlock(&fwnet_device_mutex);
> +		return -ENOMEM;
>  	}
>  
>  	allocated_netdev = true;

-- 
Stefan Richter
-=====-====- -=-= -==--
http://arcgraph.de/sr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ