diff options
author | Ursula Braun <ubraun@linux.vnet.ibm.com> | 2017-12-07 13:38:45 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-07 15:03:12 -0500 |
commit | 0c9f1515aa80f12734123e5fcc50ffe525e1d533 (patch) | |
tree | 559d8883699d9f7ce4e3ff2e90300914ef5cee58 /net/smc/smc_clc.c | |
parent | a8ae890b9c5f0d812337d97f2552c0d772957dc2 (diff) | |
download | lwn-0c9f1515aa80f12734123e5fcc50ffe525e1d533.tar.gz lwn-0c9f1515aa80f12734123e5fcc50ffe525e1d533.zip |
smc: improve smc_clc_send_decline() error handling
Let smc_clc_send_decline() return with an error, if the amount
sent is smaller than the length of an smc decline message.
Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_clc.c')
-rw-r--r-- | net/smc/smc_clc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/smc/smc_clc.c b/net/smc/smc_clc.c index 1800e16b2a02..f5e17d29112b 100644 --- a/net/smc/smc_clc.c +++ b/net/smc/smc_clc.c @@ -133,7 +133,7 @@ int smc_clc_send_decline(struct smc_sock *smc, u32 peer_diag_info) smc->sk.sk_err = EPROTO; if (len < 0) smc->sk.sk_err = -len; - return len; + return sock_error(&smc->sk); } /* send CLC PROPOSAL message across internal TCP socket */ |