Files
linux/net
Petr Malat 64752f5cfd sctp: Fix COMM_LOST/CANT_STR_ASSOC err reporting on big-endian platforms
[ Upstream commit b6df8c8141 ]

Commit 978aa04741 ("sctp: fix some type cast warnings introduced since
very beginning")' broke err reading from sctp_arg, because it reads the
value as 32-bit integer, although the value is stored as 16-bit integer.
Later this value is passed to the userspace in 16-bit variable, thus the
user always gets 0 on big-endian platforms. Fix it by reading the __u16
field of sctp_arg union, as reading err field would produce a sparse
warning.

Fixes: 978aa04741 ("sctp: fix some type cast warnings introduced since very beginning")
Signed-off-by: Petr Malat <oss@malat.biz>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Link: https://lore.kernel.org/r/20201030132633.7045-1-oss@malat.biz
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-11-10 12:35:54 +01:00
..
2019-06-22 08:15:13 +02:00
2020-07-22 09:31:58 +02:00
2019-12-05 09:21:30 +01:00
2020-10-14 10:31:26 +02:00
2020-10-29 09:54:55 +01:00
2018-07-24 14:10:42 -07:00
2020-06-25 15:33:05 +02:00
2018-07-24 14:10:43 -07:00