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:	Fri, 21 Mar 2014 10:35:13 +0000
From:	Zoltan Kiss <zoltan.kiss@...rix.com>
To:	Thomas Graf <tgraf@...hat.com>, Jesse Gross <jesse@...ira.com>,
	<pshelar@...ira.com>, <dev@...nvswitch.org>
CC:	"David S. Miller" <davem@...emloft.net>,
	Pablo Neira Ayuso <pablo@...filter.org>,
	Jozsef Kadlecsik <kadlec@...ckhole.kfki.hu>,
	Eric Dumazet <edumazet@...gle.com>,
	Daniel Borkmann <dborkman@...hat.com>,
	Tom Herbert <therbert@...gle.com>,
	Jason Wang <jasowang@...hat.com>,
	Florian Westphal <fw@...len.de>, Joe Perches <joe@...ches.com>,
	Simon Horman <horms@...ge.net.au>,
	Jiri Pirko <jiri@...nulli.us>,
	"Michael S. Tsirkin" <mst@...hat.com>,
	Paul Durrant <Paul.Durrant@...rix.com>,
	Jan Beulich <JBeulich@...e.com>,
	Herbert Xu <herbert@...dor.apana.org.au>,
	Miklos Szeredi <mszeredi@...e.cz>,
	<netfilter-devel@...r.kernel.org>, <netfilter@...r.kernel.org>,
	<xen-devel@...ts.xenproject.org>, <netdev@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <kvm@...r.kernel.org>
Subject: Re: [PATCH v3] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy
 and handle errors

On 20/03/14 22:22, Thomas Graf wrote:
> On 03/20/2014 05:02 PM, Zoltan Kiss wrote:
>> --- a/net/openvswitch/datapath.c
>> +++ b/net/openvswitch/datapath.c
>> @@ -464,7 +464,9 @@ static int queue_userspace_packet(struct datapath
>> *dp, struct sk_buff *skb,
>>       }
>>       nla->nla_len = nla_attr_size(skb->len);
>>
>> -    skb_zerocopy(user_skb, skb, skb->len, hlen);
>> +    err = skb_zerocopy(user_skb, skb, skb->len, hlen);
>> +    if (err)
>> +        goto out;
>>
>>       /* Pad OVS_PACKET_ATTR_PACKET if linear copy was performed */
>>       if (!(dp->user_features & OVS_DP_F_UNALIGNED)) {
>> @@ -478,6 +480,7 @@ static int queue_userspace_packet(struct datapath
>> *dp, struct sk_buff *skb,
>>
>>       err = genlmsg_unicast(ovs_dp_get_net(dp), user_skb,
>> upcall_info->portid);
>>   out:
>> +    skb_tx_error(skb);
>
> Really sorry to bug you again. We'll get this right ;-)
>
> Patch looks great except for this call to skb_tx_error() which is now
> done in the error *and* success path. Make the call conditional on
> if (err) and we're good.
Ah, sorry, I'm really sloppy with this patch. I've sent a fixed one.

Zoli
--
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