From: David Miller <davem@davemloft.net>
To: davejwatson@fb.com
Cc: tom@quantonium.net, netdev@vger.kernel.org
Subject: Re: [PATCH v2 net] strparser: Fix sign of err codes
Date: Tue, 27 Mar 2018 13:29:34 -0400 (EDT) [thread overview]
Message-ID: <20180327.132934.1073739597914168404.davem@davemloft.net> (raw)
In-Reply-To: <20180327152352.GA35552@davejwatson-mba.local>
From: Dave Watson <davejwatson@fb.com>
Date: Tue, 27 Mar 2018 08:23:52 -0700
> 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>
Your v1 patch was already applied to my net tree, so you'll have to
send any further changes as a relative patch.
prev parent reply other threads:[~2018-03-27 17:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-27 15:23 [PATCH v2 net] strparser: Fix sign of err codes Dave Watson
2018-03-27 17:29 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180327.132934.1073739597914168404.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=davejwatson@fb.com \
--cc=netdev@vger.kernel.org \
--cc=tom@quantonium.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox