aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/output.c
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2014-12-03 06:13:58 -0500
committerDavid S. Miller <davem@davemloft.net>2014-12-09 13:24:03 -0500
commit9772b54c55266ce80c639a80aa68eeb908f8ecf5 (patch)
tree96357f13612d6efa940701d881a1524cdb75c986 /net/sctp/output.c
parentc5ac97042aea4c358c5124119fdb98cc79bb9144 (diff)
net: sctp: use MAX_HEADER for headroom reserve in output path
To accomodate for enough headroom for tunnels, use MAX_HEADER instead of LL_MAX_HEADER. Robert reported that he has hit after roughly 40hrs of trinity an skb_under_panic() via SCTP output path (see reference). I couldn't reproduce it from here, but not using MAX_HEADER as elsewhere in other protocols might be one possible cause for this. In any case, it looks like accounting on chunks themself seems to look good as the skb already passed the SCTP output path and did not hit any skb_over_panic(). Given tunneling was enabled in his .config, the headroom would have been expanded by MAX_HEADER in this case. Reported-by: Robert Święcki <robert@swiecki.net> Reference: https://lkml.org/lkml/2014/12/1/507 Fixes: 594ccc14dfe4d ("[SCTP] Replace incorrect use of dev_alloc_skb with alloc_skb in sctp_packet_transmit().") Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Acked-by: Vlad Yasevich <vyasevich@gmail.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/output.c')
-rw-r--r--net/sctp/output.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sctp/output.c b/net/sctp/output.c
index 42dffd428389..fc5e45b8a832 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -401,12 +401,12 @@ int sctp_packet_transmit(struct sctp_packet *packet)
401 sk = chunk->skb->sk; 401 sk = chunk->skb->sk;
402 402
403 /* Allocate the new skb. */ 403 /* Allocate the new skb. */
404 nskb = alloc_skb(packet->size + LL_MAX_HEADER, GFP_ATOMIC); 404 nskb = alloc_skb(packet->size + MAX_HEADER, GFP_ATOMIC);
405 if (!nskb) 405 if (!nskb)
406 goto nomem; 406 goto nomem;
407 407
408 /* Make sure the outbound skb has enough header room reserved. */ 408 /* Make sure the outbound skb has enough header room reserved. */
409 skb_reserve(nskb, packet->overhead + LL_MAX_HEADER); 409 skb_reserve(nskb, packet->overhead + MAX_HEADER);
410 410
411 /* Set the owning socket so that we know where to get the 411 /* Set the owning socket so that we know where to get the
412 * destination IP address. 412 * destination IP address.