summaryrefslogtreecommitdiffstats
path: root/net/smc/smc_diag.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-09 08:41:53 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-09 08:41:53 +0100
commit9a2dd570591ea1d53284208ab8838c0ab2a08340 (patch)
tree19bdbaded0ca8717198067911a1a91c3d7731a3b /net/smc/smc_diag.c
parent9211f0a6a91ada1ee28b3fb5f30d79c8a67c73b1 (diff)
parent2c523b344dfa65a3738e7039832044aa133c75fb (diff)
downloadlinux-9a2dd570591ea1d53284208ab8838c0ab2a08340.tar.bz2
Merge 5.6-rc5 into driver-core-next
We need the driver core and debugfs changes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/smc/smc_diag.c')
-rw-r--r--net/smc/smc_diag.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/smc/smc_diag.c b/net/smc/smc_diag.c
index f38727ecf8b2..e1f64f4ba236 100644
--- a/net/smc/smc_diag.c
+++ b/net/smc/smc_diag.c
@@ -39,16 +39,15 @@ static void smc_diag_msg_common_fill(struct smc_diag_msg *r, struct sock *sk)
{
struct smc_sock *smc = smc_sk(sk);
+ memset(r, 0, sizeof(*r));
r->diag_family = sk->sk_family;
+ sock_diag_save_cookie(sk, r->id.idiag_cookie);
if (!smc->clcsock)
return;
r->id.idiag_sport = htons(smc->clcsock->sk->sk_num);
r->id.idiag_dport = smc->clcsock->sk->sk_dport;
r->id.idiag_if = smc->clcsock->sk->sk_bound_dev_if;
- sock_diag_save_cookie(sk, r->id.idiag_cookie);
if (sk->sk_protocol == SMCPROTO_SMC) {
- memset(&r->id.idiag_src, 0, sizeof(r->id.idiag_src));
- memset(&r->id.idiag_dst, 0, sizeof(r->id.idiag_dst));
r->id.idiag_src[0] = smc->clcsock->sk->sk_rcv_saddr;
r->id.idiag_dst[0] = smc->clcsock->sk->sk_daddr;
#if IS_ENABLED(CONFIG_IPV6)