aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/minisocks.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/minisocks.c')
-rw-r--r--net/dccp/minisocks.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c
index 9e1de5919ee5..5324fcacb34d 100644
--- a/net/dccp/minisocks.c
+++ b/net/dccp/minisocks.c
@@ -121,23 +121,21 @@ struct sock *dccp_create_openreq_child(struct sock *sk,
121 if (newdp->dccps_options.dccpo_send_ack_vector) { 121 if (newdp->dccps_options.dccpo_send_ack_vector) {
122 newdp->dccps_hc_rx_ackvec = 122 newdp->dccps_hc_rx_ackvec =
123 dccp_ackvec_alloc(GFP_ATOMIC); 123 dccp_ackvec_alloc(GFP_ATOMIC);
124 /*
125 * XXX: We're using the same CCIDs set on the parent,
126 * i.e. sk_clone copied the master sock and left the
127 * CCID pointers for this child, that is why we do the
128 * __ccid_get calls.
129 */
130 if (unlikely(newdp->dccps_hc_rx_ackvec == NULL)) 124 if (unlikely(newdp->dccps_hc_rx_ackvec == NULL))
131 goto out_free; 125 goto out_free;
132 } 126 }
133 127
134 if (unlikely(ccid_hc_rx_init(newdp->dccps_hc_rx_ccid, 128 newdp->dccps_hc_rx_ccid =
135 newsk) != 0 || 129 ccid_hc_rx_new(newdp->dccps_options.dccpo_rx_ccid,
136 ccid_hc_tx_init(newdp->dccps_hc_tx_ccid, 130 newsk, GFP_ATOMIC);
137 newsk) != 0)) { 131 newdp->dccps_hc_tx_ccid =
132 ccid_hc_tx_new(newdp->dccps_options.dccpo_tx_ccid,
133 newsk, GFP_ATOMIC);
134 if (unlikely(newdp->dccps_hc_rx_ccid == NULL ||
135 newdp->dccps_hc_tx_ccid == NULL)) {
138 dccp_ackvec_free(newdp->dccps_hc_rx_ackvec); 136 dccp_ackvec_free(newdp->dccps_hc_rx_ackvec);
139 ccid_hc_rx_exit(newdp->dccps_hc_rx_ccid, newsk); 137 ccid_hc_rx_delete(newdp->dccps_hc_rx_ccid, newsk);
140 ccid_hc_tx_exit(newdp->dccps_hc_tx_ccid, newsk); 138 ccid_hc_tx_delete(newdp->dccps_hc_tx_ccid, newsk);
141out_free: 139out_free:
142 /* It is still raw copy of parent, so invalidate 140 /* It is still raw copy of parent, so invalidate
143 * destructor and make plain sk_free() */ 141 * destructor and make plain sk_free() */
@@ -146,9 +144,6 @@ out_free:
146 return NULL; 144 return NULL;
147 } 145 }
148 146
149 __ccid_get(newdp->dccps_hc_rx_ccid);
150 __ccid_get(newdp->dccps_hc_tx_ccid);
151
152 /* 147 /*
153 * Step 3: Process LISTEN state 148 * Step 3: Process LISTEN state
154 * 149 *