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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 7 Nov 2013 09:17:13 +0100
From:	Alexander Aring <alex.aring@...il.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	Alexander Smirnov <alex.bluesman.smirnov@...il.com>,
	Alan Ott <alan@...nal11.us>, netdev@...r.kernel.org,
	kernel-janitors@...r.kernel.org,
	"David S. Miller" <davem@...emloft.net>,
	linux-zigbee-devel@...ts.sourceforge.net
Subject: Re: [Linux-zigbee-devel] [patch] 6lowpan: release device on error
 path

On Thu, Nov 07, 2013 at 10:44:45AM +0300, Dan Carpenter wrote:
> We recently added a new error path and it needs a dev_put().
> 
> Fixes: 7adac1ec8198 ('6lowpan: Only make 6lowpan links to IEEE802154 devices')
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> ---
> Compile tested only.  Please review carefully.
> 
> diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
> index 9497c6f..426b5df 100644
> --- a/net/ieee802154/6lowpan.c
> +++ b/net/ieee802154/6lowpan.c
> @@ -1358,8 +1358,10 @@ static int lowpan_newlink(struct net *src_net, struct net_device *dev,
>  	real_dev = dev_get_by_index(src_net, nla_get_u32(tb[IFLA_LINK]));
>  	if (!real_dev)
>  		return -ENODEV;
> -	if (real_dev->type != ARPHRD_IEEE802154)
> +	if (real_dev->type != ARPHRD_IEEE802154) {
> +		dev_put(real_dev);
>  		return -EINVAL;
> +	}
looks correct for me.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ