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]
Message-ID: <5e18f58d-fe50-73a9-3c64-d67e36b78257@nvidia.com>
Date: Sun, 16 Jul 2023 09:53:36 +0300
From: Gal Pressman <gal@...dia.com>
To: Simon Horman <simon.horman@...igine.com>
Cc: "David S. Miller" <davem@...emloft.net>, Jakub Kicinski
 <kuba@...nel.org>, netdev@...r.kernel.org, Paolo Abeni <pabeni@...hat.com>,
 Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH net-next] rtnetlink: Move nesting cancellation rollback to
 proper function

On 15/07/2023 13:11, Simon Horman wrote:
> On Thu, Jul 13, 2023 at 05:16:52PM +0300, Gal Pressman wrote:
>> Make rtnl_fill_vf() cancel the vfinfo attribute on error instead of the
>> inner rtnl_fill_vfinfo(), as it is the function that starts it.
>>
>> Signed-off-by: Gal Pressman <gal@...dia.com>
>> ---
>>  net/core/rtnetlink.c | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
>> index 3ad4e030846d..ed9b41ab9afc 100644
>> --- a/net/core/rtnetlink.c
>> +++ b/net/core/rtnetlink.c
>> @@ -1343,7 +1343,7 @@ static noinline_for_stack int rtnl_fill_vfinfo(struct sk_buff *skb,
>>  	vf_trust.setting = ivi.trusted;
>>  	vf = nla_nest_start_noflag(skb, IFLA_VF_INFO);
>>  	if (!vf)
>> -		goto nla_put_vfinfo_failure;
>> +		return -EMSGSIZE;
>>  	if (nla_put(skb, IFLA_VF_MAC, sizeof(vf_mac), &vf_mac) ||
>>  	    nla_put(skb, IFLA_VF_BROADCAST, sizeof(vf_broadcast), &vf_broadcast) ||
>>  	    nla_put(skb, IFLA_VF_VLAN, sizeof(vf_vlan), &vf_vlan) ||
>> @@ -1414,8 +1414,6 @@ static noinline_for_stack int rtnl_fill_vfinfo(struct sk_buff *skb,
>>  
>>  nla_put_vf_failure:
>>  	nla_nest_cancel(skb, vf);
>> -nla_put_vfinfo_failure:
>> -	nla_nest_cancel(skb, vfinfo);
> 
> It seems that the vfinfo parameter of rtnl_fill_vfinfo() is now unused.
> Can it be removed?

Good catch, will do, thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ