sctp: fix erroneous inc of snmp SctpFragUsrMsgs
authorMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Wed, 20 Jun 2018 15:47:52 +0000 (12:47 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Aug 2018 11:09:03 +0000 (13:09 +0200)
commit8fb20507bca0f610b44e5c38c9052a03f8225dfe
tree8c11eea93cb6ec6f6e74abc876b7b961e2b756e6
parent363b8de31ac91621865c3bc4e9838be86f64519f
sctp: fix erroneous inc of snmp SctpFragUsrMsgs

[ Upstream commit fedb1bd3d274b33c432cb83c80c6b3cf54d509c8 ]

Currently it is incrementing SctpFragUsrMsgs when the user message size
is of the exactly same size as the maximum fragment size, which is wrong.

The fix is to increment it only when user message is bigger than the
maximum fragment size.

Fixes: bfd2e4b8734d ("sctp: refactor sctp_datamsg_from_user")
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Neil Horman <nhorman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sctp/chunk.c