aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-01 17:08:52 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-01 17:08:52 -0400
commit73287a43cc79ca06629a88d1a199cd283f42456a (patch)
treeacf4456e260115bea77ee31a29f10ce17f0db45c /net/sctp
parent251df49db3327c64bf917bfdba94491fde2b4ee0 (diff)
parent20074f357da4a637430aec2879c9d864c5d2c23c (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller: "Highlights (1721 non-merge commits, this has to be a record of some sort): 1) Add 'random' mode to team driver, from Jiri Pirko and Eric Dumazet. 2) Make it so that any driver that supports configuration of multiple MAC addresses can provide the forwarding database add and del calls by providing a default implementation and hooking that up if the driver doesn't have an explicit set of handlers. From Vlad Yasevich. 3) Support GSO segmentation over tunnels and other encapsulating devices such as VXLAN, from Pravin B Shelar. 4) Support L2 GRE tunnels in the flow dissector, from Michael Dalton. 5) Implement Tail Loss Probe (TLP) detection in TCP, from Nandita Dukkipati. 6) In the PHY layer, allow supporting wake-on-lan in situations where the PHY registers have to be written for it to be configured. Use it to support wake-on-lan in mv643xx_eth. From Michael Stapelberg. 7) Significantly improve firewire IPV6 support, from YOSHIFUJI Hideaki. 8) Allow multiple packets to be sent in a single transmission using network coding in batman-adv, from Martin Hundebøll. 9) Add support for T5 cxgb4 chips, from Santosh Rastapur. 10) Generalize the VXLAN forwarding tables so that there is more flexibility in configurating various aspects of the endpoints. From David Stevens. 11) Support RSS and TSO in hardware over GRE tunnels in bxn2x driver, from Dmitry Kravkov. 12) Zero copy support in nfnelink_queue, from Eric Dumazet and Pablo Neira Ayuso. 13) Start adding networking selftests. 14) In situations of overload on the same AF_PACKET fanout socket, or per-cpu packet receive queue, minimize drop by distributing the load to other cpus/fanouts. From Willem de Bruijn and Eric Dumazet. 15) Add support for new payload offset BPF instruction, from Daniel Borkmann. 16) Convert several drivers over to mdoule_platform_driver(), from Sachin Kamat. 17) Provide a minimal BPF JIT image disassembler userspace tool, from Daniel Borkmann. 18) Rewrite F-RTO implementation in TCP to match the final specification of it in RFC4138 and RFC5682. From Yuchung Cheng. 19) Provide netlink socket diag of netlink sockets ("Yo dawg, I hear you like netlink, so I implemented netlink dumping of netlink sockets.") From Andrey Vagin. 20) Remove ugly passing of rtnetlink attributes into rtnl_doit functions, from Thomas Graf. 21) Allow userspace to be able to see if a configuration change occurs in the middle of an address or device list dump, from Nicolas Dichtel. 22) Support RFC3168 ECN protection for ipv6 fragments, from Hannes Frederic Sowa. 23) Increase accuracy of packet length used by packet scheduler, from Jason Wang. 24) Beginning set of changes to make ipv4/ipv6 fragment handling more scalable and less susceptible to overload and locking contention, from Jesper Dangaard Brouer. 25) Get rid of using non-type-safe NLMSG_* macros and use nlmsg_*() instead. From Hong Zhiguo. 26) Optimize route usage in IPVS by avoiding reference counting where possible, from Julian Anastasov. 27) Convert IPVS schedulers to RCU, also from Julian Anastasov. 28) Support cpu fanouts in xt_NFQUEUE netfilter target, from Holger Eitzenberger. 29) Network namespace support for nf_log, ebt_log, xt_LOG, ipt_ULOG, nfnetlink_log, and nfnetlink_queue. From Gao feng. 30) Implement RFC3168 ECN protection, from Hannes Frederic Sowa. 31) Support several new r8169 chips, from Hayes Wang. 32) Support tokenized interface identifiers in ipv6, from Daniel Borkmann. 33) Use usbnet_link_change() helper in USB net driver, from Ming Lei. 34) Add 802.1ad vlan offload support, from Patrick McHardy. 35) Support mmap() based netlink communication, also from Patrick McHardy. 36) Support HW timestamping in mlx4 driver, from Amir Vadai. 37) Rationalize AF_PACKET packet timestamping when transmitting, from Willem de Bruijn and Daniel Borkmann. 38) Bring parity to what's provided by /proc/net/packet socket dumping and the info provided by netlink socket dumping of AF_PACKET sockets. From Nicolas Dichtel. 39) Fix peeking beyond zero sized SKBs in AF_UNIX, from Benjamin Poirier" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1722 commits) filter: fix va_list build error af_unix: fix a fatal race with bit fields bnx2x: Prevent memory leak when cnic is absent bnx2x: correct reading of speed capabilities net: sctp: attribute printl with __printf for gcc fmt checks netlink: kconfig: move mmap i/o into netlink kconfig netpoll: convert mutex into a semaphore netlink: Fix skb ref counting. net_sched: act_ipt forward compat with xtables mlx4_en: fix a build error on 32bit arches Revert "bnx2x: allow nvram test to run when device is down" bridge: avoid OOPS if root port not found drivers: net: cpsw: fix kernel warn on cpsw irq enable sh_eth: use random MAC address if no valid one supplied 3c509.c: call SET_NETDEV_DEV for all device types (ISA/ISAPnP/EISA) tg3: fix to append hardware time stamping flags unix/stream: fix peeking with an offset larger than data in queue unix/dgram: fix peeking with an offset larger than data in queue unix/dgram: peek beyond 0-sized skbs openvswitch: Remove unneeded ovs_netdev_get_ifindex() ...
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/associola.c12
-rw-r--r--net/sctp/bind_addr.c7
-rw-r--r--net/sctp/endpointola.c14
-rw-r--r--net/sctp/inqueue.c7
-rw-r--r--net/sctp/output.c5
-rw-r--r--net/sctp/outqueue.c11
-rw-r--r--net/sctp/probe.c2
-rw-r--r--net/sctp/proc.c12
-rw-r--r--net/sctp/socket.c8
-rw-r--r--net/sctp/ssnmap.c23
-rw-r--r--net/sctp/transport.c1
-rw-r--r--net/sctp/ulpqueue.c3
12 files changed, 39 insertions, 66 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index fa261a3594c2..91cfd8f94a19 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -97,8 +97,7 @@ static struct sctp_association *sctp_association_init(struct sctp_association *a
97 97
98 /* Initialize the object handling fields. */ 98 /* Initialize the object handling fields. */
99 atomic_set(&asoc->base.refcnt, 1); 99 atomic_set(&asoc->base.refcnt, 1);
100 asoc->base.dead = 0; 100 asoc->base.dead = false;
101 asoc->base.malloced = 0;
102 101
103 /* Initialize the bind addr area. */ 102 /* Initialize the bind addr area. */
104 sctp_bind_addr_init(&asoc->base.bind_addr, ep->base.bind_addr.port); 103 sctp_bind_addr_init(&asoc->base.bind_addr, ep->base.bind_addr.port);
@@ -364,7 +363,6 @@ struct sctp_association *sctp_association_new(const struct sctp_endpoint *ep,
364 if (!sctp_association_init(asoc, ep, sk, scope, gfp)) 363 if (!sctp_association_init(asoc, ep, sk, scope, gfp))
365 goto fail_init; 364 goto fail_init;
366 365
367 asoc->base.malloced = 1;
368 SCTP_DBG_OBJCNT_INC(assoc); 366 SCTP_DBG_OBJCNT_INC(assoc);
369 SCTP_DEBUG_PRINTK("Created asoc %p\n", asoc); 367 SCTP_DEBUG_PRINTK("Created asoc %p\n", asoc);
370 368
@@ -402,7 +400,7 @@ void sctp_association_free(struct sctp_association *asoc)
402 /* Mark as dead, so other users can know this structure is 400 /* Mark as dead, so other users can know this structure is
403 * going away. 401 * going away.
404 */ 402 */
405 asoc->base.dead = 1; 403 asoc->base.dead = true;
406 404
407 /* Dispose of any data lying around in the outqueue. */ 405 /* Dispose of any data lying around in the outqueue. */
408 sctp_outq_free(&asoc->outqueue); 406 sctp_outq_free(&asoc->outqueue);
@@ -477,10 +475,8 @@ static void sctp_association_destroy(struct sctp_association *asoc)
477 475
478 WARN_ON(atomic_read(&asoc->rmem_alloc)); 476 WARN_ON(atomic_read(&asoc->rmem_alloc));
479 477
480 if (asoc->base.malloced) { 478 kfree(asoc);
481 kfree(asoc); 479 SCTP_DBG_OBJCNT_DEC(assoc);
482 SCTP_DBG_OBJCNT_DEC(assoc);
483 }
484} 480}
485 481
486/* Change the primary destination address for the peer. */ 482/* Change the primary destination address for the peer. */
diff --git a/net/sctp/bind_addr.c b/net/sctp/bind_addr.c
index d886b3bf84f5..41145fe31813 100644
--- a/net/sctp/bind_addr.c
+++ b/net/sctp/bind_addr.c
@@ -131,8 +131,6 @@ int sctp_bind_addr_dup(struct sctp_bind_addr *dest,
131 */ 131 */
132void sctp_bind_addr_init(struct sctp_bind_addr *bp, __u16 port) 132void sctp_bind_addr_init(struct sctp_bind_addr *bp, __u16 port)
133{ 133{
134 bp->malloced = 0;
135
136 INIT_LIST_HEAD(&bp->address_list); 134 INIT_LIST_HEAD(&bp->address_list);
137 bp->port = port; 135 bp->port = port;
138} 136}
@@ -155,11 +153,6 @@ void sctp_bind_addr_free(struct sctp_bind_addr *bp)
155{ 153{
156 /* Empty the bind address list. */ 154 /* Empty the bind address list. */
157 sctp_bind_addr_clean(bp); 155 sctp_bind_addr_clean(bp);
158
159 if (bp->malloced) {
160 kfree(bp);
161 SCTP_DBG_OBJCNT_DEC(bind_addr);
162 }
163} 156}
164 157
165/* Add an address to the bind address list in the SCTP_bind_addr structure. */ 158/* Add an address to the bind address list in the SCTP_bind_addr structure. */
diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c
index 12ed45dbe75d..5fbd7bc6bb11 100644
--- a/net/sctp/endpointola.c
+++ b/net/sctp/endpointola.c
@@ -121,8 +121,7 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep,
121 121
122 /* Initialize the basic object fields. */ 122 /* Initialize the basic object fields. */
123 atomic_set(&ep->base.refcnt, 1); 123 atomic_set(&ep->base.refcnt, 1);
124 ep->base.dead = 0; 124 ep->base.dead = false;
125 ep->base.malloced = 1;
126 125
127 /* Create an input queue. */ 126 /* Create an input queue. */
128 sctp_inq_init(&ep->base.inqueue); 127 sctp_inq_init(&ep->base.inqueue);
@@ -198,7 +197,7 @@ struct sctp_endpoint *sctp_endpoint_new(struct sock *sk, gfp_t gfp)
198 goto fail; 197 goto fail;
199 if (!sctp_endpoint_init(ep, sk, gfp)) 198 if (!sctp_endpoint_init(ep, sk, gfp))
200 goto fail_init; 199 goto fail_init;
201 ep->base.malloced = 1; 200
202 SCTP_DBG_OBJCNT_INC(ep); 201 SCTP_DBG_OBJCNT_INC(ep);
203 return ep; 202 return ep;
204 203
@@ -234,7 +233,7 @@ void sctp_endpoint_add_asoc(struct sctp_endpoint *ep,
234 */ 233 */
235void sctp_endpoint_free(struct sctp_endpoint *ep) 234void sctp_endpoint_free(struct sctp_endpoint *ep)
236{ 235{
237 ep->base.dead = 1; 236 ep->base.dead = true;
238 237
239 ep->base.sk->sk_state = SCTP_SS_CLOSED; 238 ep->base.sk->sk_state = SCTP_SS_CLOSED;
240 239
@@ -279,11 +278,8 @@ static void sctp_endpoint_destroy(struct sctp_endpoint *ep)
279 if (ep->base.sk) 278 if (ep->base.sk)
280 sock_put(ep->base.sk); 279 sock_put(ep->base.sk);
281 280
282 /* Finally, free up our memory. */ 281 kfree(ep);
283 if (ep->base.malloced) { 282 SCTP_DBG_OBJCNT_DEC(ep);
284 kfree(ep);
285 SCTP_DBG_OBJCNT_DEC(ep);
286 }
287} 283}
288 284
289/* Hold a reference to an endpoint. */ 285/* Hold a reference to an endpoint. */
diff --git a/net/sctp/inqueue.c b/net/sctp/inqueue.c
index 2d5ad280de38..3221d073448c 100644
--- a/net/sctp/inqueue.c
+++ b/net/sctp/inqueue.c
@@ -58,8 +58,6 @@ void sctp_inq_init(struct sctp_inq *queue)
58 58
59 /* Create a task for delivering data. */ 59 /* Create a task for delivering data. */
60 INIT_WORK(&queue->immediate, NULL); 60 INIT_WORK(&queue->immediate, NULL);
61
62 queue->malloced = 0;
63} 61}
64 62
65/* Release the memory associated with an SCTP inqueue. */ 63/* Release the memory associated with an SCTP inqueue. */
@@ -80,11 +78,6 @@ void sctp_inq_free(struct sctp_inq *queue)
80 sctp_chunk_free(queue->in_progress); 78 sctp_chunk_free(queue->in_progress);
81 queue->in_progress = NULL; 79 queue->in_progress = NULL;
82 } 80 }
83
84 if (queue->malloced) {
85 /* Dump the master memory segment. */
86 kfree(queue);
87 }
88} 81}
89 82
90/* Put a new packet in an SCTP inqueue. 83/* Put a new packet in an SCTP inqueue.
diff --git a/net/sctp/output.c b/net/sctp/output.c
index f5200a2ad852..bbef4a7a9b56 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -136,7 +136,7 @@ struct sctp_packet *sctp_packet_init(struct sctp_packet *packet,
136 packet->overhead = overhead; 136 packet->overhead = overhead;
137 sctp_packet_reset(packet); 137 sctp_packet_reset(packet);
138 packet->vtag = 0; 138 packet->vtag = 0;
139 packet->malloced = 0; 139
140 return packet; 140 return packet;
141} 141}
142 142
@@ -151,9 +151,6 @@ void sctp_packet_free(struct sctp_packet *packet)
151 list_del_init(&chunk->list); 151 list_del_init(&chunk->list);
152 sctp_chunk_free(chunk); 152 sctp_chunk_free(chunk);
153 } 153 }
154
155 if (packet->malloced)
156 kfree(packet);
157} 154}
158 155
159/* This routine tries to append the chunk to the offered packet. If adding 156/* This routine tries to append the chunk to the offered packet. If adding
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
index 01dca753db16..32a4625fef77 100644
--- a/net/sctp/outqueue.c
+++ b/net/sctp/outqueue.c
@@ -217,8 +217,6 @@ void sctp_outq_init(struct sctp_association *asoc, struct sctp_outq *q)
217 q->outstanding_bytes = 0; 217 q->outstanding_bytes = 0;
218 q->empty = 1; 218 q->empty = 1;
219 q->cork = 0; 219 q->cork = 0;
220
221 q->malloced = 0;
222 q->out_qlen = 0; 220 q->out_qlen = 0;
223} 221}
224 222
@@ -295,10 +293,6 @@ void sctp_outq_free(struct sctp_outq *q)
295{ 293{
296 /* Throw away leftover chunks. */ 294 /* Throw away leftover chunks. */
297 __sctp_outq_teardown(q); 295 __sctp_outq_teardown(q);
298
299 /* If we were kmalloc()'d, free the memory. */
300 if (q->malloced)
301 kfree(q);
302} 296}
303 297
304/* Put a new chunk in an sctp_outq. */ 298/* Put a new chunk in an sctp_outq. */
@@ -707,11 +701,10 @@ redo:
707/* Cork the outqueue so queued chunks are really queued. */ 701/* Cork the outqueue so queued chunks are really queued. */
708int sctp_outq_uncork(struct sctp_outq *q) 702int sctp_outq_uncork(struct sctp_outq *q)
709{ 703{
710 int error = 0;
711 if (q->cork) 704 if (q->cork)
712 q->cork = 0; 705 q->cork = 0;
713 error = sctp_outq_flush(q, 0); 706
714 return error; 707 return sctp_outq_flush(q, 0);
715} 708}
716 709
717 710
diff --git a/net/sctp/probe.c b/net/sctp/probe.c
index ad0dba870341..e62c22535be4 100644
--- a/net/sctp/probe.c
+++ b/net/sctp/probe.c
@@ -63,7 +63,7 @@ static struct {
63 struct timespec tstart; 63 struct timespec tstart;
64} sctpw; 64} sctpw;
65 65
66static void printl(const char *fmt, ...) 66static __printf(1, 2) void printl(const char *fmt, ...)
67{ 67{
68 va_list args; 68 va_list args;
69 int len; 69 int len;
diff --git a/net/sctp/proc.c b/net/sctp/proc.c
index ab3bba8cb0a8..4e45ee35d0db 100644
--- a/net/sctp/proc.c
+++ b/net/sctp/proc.c
@@ -295,7 +295,8 @@ static void * sctp_assocs_seq_start(struct seq_file *seq, loff_t *pos)
295 seq_printf(seq, " ASSOC SOCK STY SST ST HBKT " 295 seq_printf(seq, " ASSOC SOCK STY SST ST HBKT "
296 "ASSOC-ID TX_QUEUE RX_QUEUE UID INODE LPORT " 296 "ASSOC-ID TX_QUEUE RX_QUEUE UID INODE LPORT "
297 "RPORT LADDRS <-> RADDRS " 297 "RPORT LADDRS <-> RADDRS "
298 "HBINT INS OUTS MAXRT T1X T2X RTXC\n"); 298 "HBINT INS OUTS MAXRT T1X T2X RTXC "
299 "wmema wmemq sndbuf rcvbuf\n");
299 300
300 return (void *)pos; 301 return (void *)pos;
301} 302}
@@ -349,11 +350,16 @@ static int sctp_assocs_seq_show(struct seq_file *seq, void *v)
349 sctp_seq_dump_local_addrs(seq, epb); 350 sctp_seq_dump_local_addrs(seq, epb);
350 seq_printf(seq, "<-> "); 351 seq_printf(seq, "<-> ");
351 sctp_seq_dump_remote_addrs(seq, assoc); 352 sctp_seq_dump_remote_addrs(seq, assoc);
352 seq_printf(seq, "\t%8lu %5d %5d %4d %4d %4d %8d ", 353 seq_printf(seq, "\t%8lu %5d %5d %4d %4d %4d %8d "
354 "%8d %8d %8d %8d",
353 assoc->hbinterval, assoc->c.sinit_max_instreams, 355 assoc->hbinterval, assoc->c.sinit_max_instreams,
354 assoc->c.sinit_num_ostreams, assoc->max_retrans, 356 assoc->c.sinit_num_ostreams, assoc->max_retrans,
355 assoc->init_retries, assoc->shutdown_retries, 357 assoc->init_retries, assoc->shutdown_retries,
356 assoc->rtx_data_chunks); 358 assoc->rtx_data_chunks,
359 atomic_read(&sk->sk_wmem_alloc),
360 sk->sk_wmem_queued,
361 sk->sk_sndbuf,
362 sk->sk_rcvbuf);
357 seq_printf(seq, "\n"); 363 seq_printf(seq, "\n");
358 } 364 }
359 read_unlock(&head->lock); 365 read_unlock(&head->lock);
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index b9070736b8d9..f631c5ff4dbf 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -1119,9 +1119,10 @@ static int __sctp_connect(struct sock* sk,
1119 /* Make sure the destination port is correctly set 1119 /* Make sure the destination port is correctly set
1120 * in all addresses. 1120 * in all addresses.
1121 */ 1121 */
1122 if (asoc && asoc->peer.port && asoc->peer.port != port) 1122 if (asoc && asoc->peer.port && asoc->peer.port != port) {
1123 err = -EINVAL;
1123 goto out_free; 1124 goto out_free;
1124 1125 }
1125 1126
1126 /* Check if there already is a matching association on the 1127 /* Check if there already is a matching association on the
1127 * endpoint (other than the one created here). 1128 * endpoint (other than the one created here).
@@ -6185,7 +6186,8 @@ unsigned int sctp_poll(struct file *file, struct socket *sock, poll_table *wait)
6185 6186
6186 /* Is there any exceptional events? */ 6187 /* Is there any exceptional events? */
6187 if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue)) 6188 if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue))
6188 mask |= POLLERR; 6189 mask |= POLLERR |
6190 sock_flag(sk, SOCK_SELECT_ERR_QUEUE) ? POLLPRI : 0;
6189 if (sk->sk_shutdown & RCV_SHUTDOWN) 6191 if (sk->sk_shutdown & RCV_SHUTDOWN)
6190 mask |= POLLRDHUP | POLLIN | POLLRDNORM; 6192 mask |= POLLRDHUP | POLLIN | POLLRDNORM;
6191 if (sk->sk_shutdown == SHUTDOWN_MASK) 6193 if (sk->sk_shutdown == SHUTDOWN_MASK)
diff --git a/net/sctp/ssnmap.c b/net/sctp/ssnmap.c
index 825ea94415b3..da8603523808 100644
--- a/net/sctp/ssnmap.c
+++ b/net/sctp/ssnmap.c
@@ -74,7 +74,6 @@ struct sctp_ssnmap *sctp_ssnmap_new(__u16 in, __u16 out,
74 if (!sctp_ssnmap_init(retval, in, out)) 74 if (!sctp_ssnmap_init(retval, in, out))
75 goto fail_map; 75 goto fail_map;
76 76
77 retval->malloced = 1;
78 SCTP_DBG_OBJCNT_INC(ssnmap); 77 SCTP_DBG_OBJCNT_INC(ssnmap);
79 78
80 return retval; 79 return retval;
@@ -118,14 +117,16 @@ void sctp_ssnmap_clear(struct sctp_ssnmap *map)
118/* Dispose of a ssnmap. */ 117/* Dispose of a ssnmap. */
119void sctp_ssnmap_free(struct sctp_ssnmap *map) 118void sctp_ssnmap_free(struct sctp_ssnmap *map)
120{ 119{
121 if (map && map->malloced) { 120 int size;
122 int size; 121
123 122 if (unlikely(!map))
124 size = sctp_ssnmap_size(map->in.len, map->out.len); 123 return;
125 if (size <= KMALLOC_MAX_SIZE) 124
126 kfree(map); 125 size = sctp_ssnmap_size(map->in.len, map->out.len);
127 else 126 if (size <= KMALLOC_MAX_SIZE)
128 free_pages((unsigned long)map, get_order(size)); 127 kfree(map);
129 SCTP_DBG_OBJCNT_DEC(ssnmap); 128 else
130 } 129 free_pages((unsigned long)map, get_order(size));
130
131 SCTP_DBG_OBJCNT_DEC(ssnmap);
131} 132}
diff --git a/net/sctp/transport.c b/net/sctp/transport.c
index fafd2a461ba0..098f1d5f769e 100644
--- a/net/sctp/transport.c
+++ b/net/sctp/transport.c
@@ -123,7 +123,6 @@ struct sctp_transport *sctp_transport_new(struct net *net,
123 if (!sctp_transport_init(net, transport, addr, gfp)) 123 if (!sctp_transport_init(net, transport, addr, gfp))
124 goto fail_init; 124 goto fail_init;
125 125
126 transport->malloced = 1;
127 SCTP_DBG_OBJCNT_INC(transport); 126 SCTP_DBG_OBJCNT_INC(transport);
128 127
129 return transport; 128 return transport;
diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c
index 0fd5b3d2df03..04e3d470f877 100644
--- a/net/sctp/ulpqueue.c
+++ b/net/sctp/ulpqueue.c
@@ -68,7 +68,6 @@ struct sctp_ulpq *sctp_ulpq_init(struct sctp_ulpq *ulpq,
68 skb_queue_head_init(&ulpq->reasm); 68 skb_queue_head_init(&ulpq->reasm);
69 skb_queue_head_init(&ulpq->lobby); 69 skb_queue_head_init(&ulpq->lobby);
70 ulpq->pd_mode = 0; 70 ulpq->pd_mode = 0;
71 ulpq->malloced = 0;
72 71
73 return ulpq; 72 return ulpq;
74} 73}
@@ -96,8 +95,6 @@ void sctp_ulpq_flush(struct sctp_ulpq *ulpq)
96void sctp_ulpq_free(struct sctp_ulpq *ulpq) 95void sctp_ulpq_free(struct sctp_ulpq *ulpq)
97{ 96{
98 sctp_ulpq_flush(ulpq); 97 sctp_ulpq_flush(ulpq);
99 if (ulpq->malloced)
100 kfree(ulpq);
101} 98}
102 99
103/* Process an incoming DATA chunk. */ 100/* Process an incoming DATA chunk. */