sctp: handle errors when updating asoc
authorXin Long <lucien.xin@gmail.com>
Tue, 20 Jun 2017 08:05:11 +0000 (16:05 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Jun 2017 19:32:55 +0000 (15:32 -0400)
commit5ee8aa689780f2c19702fe3768a3103b9c07d72e
tree51756f9ea4bb01a443a783b5cb22f0f587dcff9b
parent8cd5c25f2db03306727d2f6b8f28956169dc1123
sctp: handle errors when updating asoc

It's a bad thing not to handle errors when updating asoc. The memory
allocation failure in any of the functions called in sctp_assoc_update()
would cause sctp to work unexpectedly.

This patch is to fix it by aborting the asoc and reporting the error when
any of these functions fails.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sctp/structs.h
net/sctp/associola.c
net/sctp/sm_sideeffect.c