diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-05-04 08:48:26 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-05-04 08:48:26 +0200 |
commit | d63c214b0a39e7e92fbae2a47b66e8145c3c9c81 (patch) | |
tree | ca797379eeb01c96308c8e2abdcea3b55040d489 /net/sctp/output.c | |
parent | x86/platform: Remove unused get_bios_ebda_length() function (diff) | |
parent | Linux 4.6-rc6 (diff) | |
download | linux-d63c214b0a39e7e92fbae2a47b66e8145c3c9c81.tar.xz linux-d63c214b0a39e7e92fbae2a47b66e8145c3c9c81.zip |
Merge tag 'v4.6-rc6' into x86/platform, to refresh the tree
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/sctp/output.c')
-rw-r--r-- | net/sctp/output.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/sctp/output.c b/net/sctp/output.c index 736c004abfbc..9844fe573029 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c @@ -401,7 +401,7 @@ int sctp_packet_transmit(struct sctp_packet *packet, gfp_t gfp) sk = chunk->skb->sk; /* Allocate the new skb. */ - nskb = alloc_skb(packet->size + MAX_HEADER, GFP_ATOMIC); + nskb = alloc_skb(packet->size + MAX_HEADER, gfp); if (!nskb) goto nomem; @@ -523,8 +523,8 @@ int sctp_packet_transmit(struct sctp_packet *packet, gfp_t gfp) */ if (auth) sctp_auth_calculate_hmac(asoc, nskb, - (struct sctp_auth_chunk *)auth, - GFP_ATOMIC); + (struct sctp_auth_chunk *)auth, + gfp); /* 2) Calculate the Adler-32 checksum of the whole packet, * including the SCTP common header and all the @@ -705,7 +705,8 @@ static sctp_xmit_t sctp_packet_can_append_data(struct sctp_packet *packet, /* Check whether this chunk and all the rest of pending data will fit * or delay in hopes of bundling a full sized packet. */ - if (chunk->skb->len + q->out_qlen >= transport->pathmtu - packet->overhead) + if (chunk->skb->len + q->out_qlen > + transport->pathmtu - packet->overhead - sizeof(sctp_data_chunk_t) - 4) /* Enough data queued to fill a packet */ return SCTP_XMIT_OK; |