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:	Wed, 10 Aug 2016 12:40:33 +0100
From:	Stefan Hajnoczi <stefanha@...hat.com>
To:	ggarcia@...a.uab.cat
Cc:	netdev@...r.kernel.org, jhansen@...are.com, mst@...hat.com
Subject: Re: [PATCH 1/3] vsockmon: Add tap functions.

On Mon, Aug 08, 2016 at 06:14:40PM +0200, ggarcia@...a.uab.cat wrote:
> +static int __vsock_deliver_tap_skb(struct sk_buff *skb,
> +				     struct net_device *dev)
> +{
> +	int ret = 0;
> +
> +	if (skb) {
> +		dev_hold(dev);
> +		/* Take skb ownership so it is not consumed in dev_queue_xmit.
> +		 * dev_queue_xmit will drop a reference so the reference count
> +		 * will reset.
> +		 */
> +		skb_get(skb);

Netlink clones the skb instead of adding a reference.  I guess this is
because the skb might be modified later on?  Perhaps there are race
conditions if the original skb is shared.

Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ