]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
sctp: force SCTP_ERROR_INV_STRM with __u32 when calling sctp_chunk_fail
authorXin Long <lucien.xin@gmail.com>
Sun, 26 Nov 2017 12:16:06 +0000 (20:16 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Nov 2017 16:00:13 +0000 (11:00 -0500)
This patch is to force SCTP_ERROR_INV_STRM with right type to
fit in sctp_chunk_fail to avoid the sparse error.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/stream.c

index a20145b3a94947f2ffe463c59a5082f6f3b2f1c7..76ea66be0bbee7d3f018676d52c8b95ba06dbcb1 100644 (file)
@@ -64,7 +64,7 @@ static void sctp_stream_outq_migrate(struct sctp_stream *stream,
                 */
 
                /* Mark as failed send. */
-               sctp_chunk_fail(ch, SCTP_ERROR_INV_STRM);
+               sctp_chunk_fail(ch, (__force __u32)SCTP_ERROR_INV_STRM);
                if (asoc->peer.prsctp_capable &&
                    SCTP_PR_PRIO_ENABLED(ch->sinfo.sinfo_flags))
                        asoc->sent_cnt_removable--;