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, 21 Sep 2017 11:24:49 -0600
From:   David Ahern <dsahern@...il.com>
To:     Florian Westphal <fw@...len.de>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 7/7] rtnetlink: rtnl_have_link_slave_info doesn't
 need rtnl

On 9/21/17 10:59 AM, Florian Westphal wrote:
> @@ -539,6 +543,8 @@ static int rtnl_link_slave_info_fill(struct sk_buff *skb,
>  	struct nlattr *slave_data;
>  	int err;
>  
> +	ASSERT_RTNL();
> +
>  	master_dev = netdev_master_upper_dev_get((struct net_device *) dev);
>  	if (!master_dev)
>  		return 0;
> @@ -570,6 +576,8 @@ static int rtnl_link_info_fill(struct sk_buff *skb,
>  	struct nlattr *data;
>  	int err;
>  
> +	ASSERT_RTNL();
> +
>  	if (!ops)
>  		return 0;
>  	if (nla_put_string(skb, IFLA_INFO_KIND, ops->kind) < 0)
> @@ -600,6 +608,8 @@ static int rtnl_link_fill(struct sk_buff *skb, const struct net_device *dev)
>  	struct nlattr *linkinfo;
>  	int err = -EMSGSIZE;
>  
> +	ASSERT_RTNL();
> +
>  	linkinfo = nla_nest_start(skb, IFLA_LINKINFO);
>  	if (linkinfo == NULL)
>  		goto out;
> 


Since rtnl_link_slave_info_fill and rtnl_link_info_fill are only called
by rtnl_link_fill and rtnl_link_fill is only called rtnl_fill_ifinfo
which as the ASSERT_RTNL why add to these lower functions as well?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ