Commit 7a5000fd authored by Eric Dumazet's avatar Eric Dumazet Committed by Liu Jian
Browse files

tcp: check local var (timeo) before socket fields in one test

mainline inclusion
from mainline-v5.17-rc1
commit 8bd172b7
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I65HYE

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8bd172b787298124ef75c0e466101107c036d54d



---------------------------

Testing timeo before sk_err/sk_state/sk_shutdown makes more sense.

Modern applications use non-blocking IO, while a socket is terminated
only once during its life time.

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
(cherry picked from commit 8bd172b7)
Signed-off-by: default avatarLiu Jian <liujian56@huawei.com>
parent 4aa64fad
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment