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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 16 Jul 2014 15:10:50 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	jon.maloy@...csson.com
Cc:	netdev@...r.kernel.org, paul.gortmaker@...driver.com,
	erik.hugne@...csson.com, ying.xue@...driver.com, maloy@...jonn.com,
	tipc-discussion@...ts.sourceforge.net
Subject: Re: [PATCH net-next 3/7] tipc: add new functions for multicast and
 broadcast distribution

From: Jon Maloy <jon.maloy@...csson.com>
Date: Tue, 15 Jul 2014 13:46:06 -0400

> +	/* Copy header if single buffer */
> +	if (!buf->next) {
> +		hdr_sz = skb_headroom(buf) + msg_hdr_sz(buf_msg(buf));
> +		head = __pskb_copy(buf, hdr_sz, GFP_ATOMIC);
> +		if (likely(head))
> +			return head;
> +		return NULL;

These last four lines are simply:

		return __pskb_copy(buf, hdr_sz, GFP_ATOMIC);

Don't make this code more complicated than necessary :)
--
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