[kernel] r22106 - in dists/squeeze-security/linux-2.6/debian: . patches/features/all/openvz

Ben Hutchings benh at moszumanska.debian.org
Sat Dec 6 02:58:16 UTC 2014


Author: benh
Date: Sat Dec  6 02:58:16 2014
New Revision: 22106

Log:
[openvz] tcp: Fix beancounting for tcp_unclone() calls introduced in 2.6.32.62

Modified:
   dists/squeeze-security/linux-2.6/debian/changelog
   dists/squeeze-security/linux-2.6/debian/patches/features/all/openvz/openvz.patch

Modified: dists/squeeze-security/linux-2.6/debian/changelog
==============================================================================
--- dists/squeeze-security/linux-2.6/debian/changelog	Wed Dec  3 17:11:15 2014	(r22105)
+++ dists/squeeze-security/linux-2.6/debian/changelog	Sat Dec  6 02:58:16 2014	(r22106)
@@ -429,6 +429,10 @@
   [ Raphael Geissert ]
   * CVE-2014-4943: net: ppol2tp: don't fall back on UDP [get|set]sockopt
 
+  [ Ben Hutchings ]
+  * [openvz] tcp: Fix beancounting for tcp_unclone() calls introduced
+    in 2.6.32.62
+
  -- Holger Levsen <holger at debian.org>  Sun, 30 Nov 2014 15:57:49 +0100
 
 linux-2.6 (2.6.32-48squeeze8) squeeze-lts; urgency=high

Modified: dists/squeeze-security/linux-2.6/debian/patches/features/all/openvz/openvz.patch
==============================================================================
--- dists/squeeze-security/linux-2.6/debian/patches/features/all/openvz/openvz.patch	Wed Dec  3 17:11:15 2014	(r22105)
+++ dists/squeeze-security/linux-2.6/debian/patches/features/all/openvz/openvz.patch	Sat Dec  6 02:58:16 2014	(r22106)
@@ -30173,7 +30173,7 @@
 +#endif /* __task.h_ */
 --- /dev/null
 +++ b/include/bc/tcp.h
-@@ -0,0 +1,76 @@
+@@ -0,0 +1,88 @@
 +/*
 + *  include/bc/tcp.h
 + *
@@ -30249,6 +30249,18 @@
 +	return 0;
 +}
 +
++/* bwh: skb_unclone() plus beancounting */
++static inline int ub_tcp_unclone(struct sock *sk, struct sk_buff *skb, gfp_t pri)
++{
++	if (skb_cloned(skb)) {
++		if (pskb_expand_head(skb, 0, 0, GFP_ATOMIC))
++			return -ENOMEM;
++		ub_skb_uncharge(skb);
++		ub_tcpsndbuf_charge_forced(sk, skb);
++	}
++
++	return 0;
++}
 +#endif
 --- /dev/null
 +++ b/include/bc/vmpages.h
@@ -84938,17 +84950,13 @@
  	if (tcp_packets_in_flight(tp) == 0)
  		tcp_ca_event(sk, CA_EVENT_TX_START);
  
-@@ -829,11 +849,22 @@ int tcp_fragment(struct sock *sk, struct
+@@ -824,13 +844,17 @@ int tcp_fragment(struct sock *sk, struct
+ 	if (nsize < 0)
+ 		nsize = 0;
  
- 	if (skb_unclone(skb, GFP_ATOMIC))
+-	if (skb_unclone(skb, GFP_ATOMIC))
++	if (ub_tcp_unclone(sk, skb, GFP_ATOMIC))
  		return -ENOMEM;
-+	/* XXX: OPENVZ patch used to do this in the case where the skb was
-+	 * cloned:
-+	 * ub_skb_uncharge(skb);
-+	 * ub_tcpsndbuf_charge_forced(sk, skb);
-+	 *
-+	 * I assume it's no longer needed. -- Raphaël Hertzog
-+	 */
  
  	/* Get a new skb... force flag on. */
  	buff = sk_stream_alloc_skb(sk, nsize, GFP_ATOMIC);
@@ -84982,6 +84990,15 @@
  			tp->rcv_ssthresh = min(tp->rcv_ssthresh,
  					       4U * tp->advmss);
  
+@@ -1931,7 +1967,7 @@
+ 		int oldpcount = tcp_skb_pcount(skb);
+ 
+ 		if (unlikely(oldpcount > 1)) {
+-			if (skb_unclone(skb, GFP_ATOMIC))
++			if (ub_tcp_unclone(sk, skb, GFP_ATOMIC))
+ 				return -ENOMEM;
+ 			tcp_init_tso_segs(sk, skb, cur_mss);
+ 			tcp_adjust_pcount(sk, skb, oldpcount - tcp_skb_pcount(skb));
 @@ -2149,6 +2185,7 @@ void tcp_send_fin(struct sock *sk)
  				break;
  			yield();



More information about the Kernel-svn-changes mailing list