aboutsummaryrefslogtreecommitdiffstats
path: root/net/decnet
diff options
context:
space:
mode:
authorDave Watson <davejwatson@fb.com>2018-03-26 12:31:21 -0700
committerDavid S. Miller <davem@davemloft.net>2018-03-27 11:00:18 -0400
commitcd00edc179863848abab5cc5683de5b7b5f70954 (patch)
treec11ac851909a6456a87b4308b26963fbf0ecd2bf /net/decnet
parentnet sched actions: fix dumping which requires several messages to user space (diff)
downloadlinux-dev-cd00edc179863848abab5cc5683de5b7b5f70954.tar.xz
linux-dev-cd00edc179863848abab5cc5683de5b7b5f70954.zip
strparser: Fix sign of err codes
strp_parser_err is called with a negative code everywhere, which then calls abort_parser with a negative code. strp_msg_timeout calls abort_parser directly with a positive code. Negate ETIMEDOUT to match signed-ness of other calls. The default abort_parser callback, strp_abort_strp, sets sk->sk_err to err. Also negate the error here so sk_err always holds a positive value, as the rest of the net code expects. Currently a negative sk_err can result in endless loops, or user code that thinks it actually sent/received err bytes. Found while testing net/tls_sw recv path. Fixes: 43a0c6751a322847 ("strparser: Stream parser for messages") Signed-off-by: Dave Watson <davejwatson@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/decnet')
0 files changed, 0 insertions, 0 deletions