mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
sctp: free msg->chunks when sctp_primitive_SEND return err
Last patch "sctp: do not return the transmit err back to sctp_sendmsg" made sctp_primitive_SEND return err only when asoc state is unavailable. In this case, chunks are not enqueued, they have no chance to be freed if we don't take care of them later. This Patch is actually to revert commit1cd4d5c432
("sctp: remove the unused sctp_datamsg_free()"), commit69b5777f2e
("sctp: hold the chunks only after the chunk is enqueued in outq") and commit8b570dc9f7
("sctp: only drop the reference on the datamsg after sending a msg"), to use sctp_datamsg_free to free the chunks of current msg. Fixes:8b570dc9f7
("sctp: only drop the reference on the datamsg after sending a msg") Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
66388f2c08
commit
b61c654f9b
4 changed files with 20 additions and 3 deletions
|
@ -304,7 +304,6 @@ int sctp_outq_tail(struct sctp_outq *q, struct sctp_chunk *chunk, gfp_t gfp)
|
|||
sctp_cname(SCTP_ST_CHUNK(chunk->chunk_hdr->type)) :
|
||||
"illegal chunk");
|
||||
|
||||
sctp_chunk_hold(chunk);
|
||||
sctp_outq_tail_data(q, chunk);
|
||||
if (chunk->asoc->prsctp_enable &&
|
||||
SCTP_PR_PRIO_ENABLED(chunk->sinfo.sinfo_flags))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue