Skip to content

Commit 907e51e

Browse files
committed
Merge branch 'smc-fixes'
Karsten Graul says: ==================== net/smc: fixes for -net Fix a syzbot finding and a problem with the CLC handshake content. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents dc221a2 + 369537c commit 907e51e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

net/smc/af_smc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,8 @@ static void smc_switch_to_fallback(struct smc_sock *smc)
470470
if (smc->sk.sk_socket && smc->sk.sk_socket->file) {
471471
smc->clcsock->file = smc->sk.sk_socket->file;
472472
smc->clcsock->file->private_data = smc->clcsock;
473+
smc->clcsock->wq.fasync_list =
474+
smc->sk.sk_socket->wq.fasync_list;
473475
}
474476
}
475477

net/smc/smc_clc.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,9 @@ int smc_clc_send_decline(struct smc_sock *smc, u32 peer_diag_info)
372372
dclc.hdr.length = htons(sizeof(struct smc_clc_msg_decline));
373373
dclc.hdr.version = SMC_CLC_V1;
374374
dclc.hdr.flag = (peer_diag_info == SMC_CLC_DECL_SYNCERR) ? 1 : 0;
375-
memcpy(dclc.id_for_peer, local_systemid, sizeof(local_systemid));
375+
if (smc->conn.lgr && !smc->conn.lgr->is_smcd)
376+
memcpy(dclc.id_for_peer, local_systemid,
377+
sizeof(local_systemid));
376378
dclc.peer_diagnosis = htonl(peer_diag_info);
377379
memcpy(dclc.trl.eyecatcher, SMC_EYECATCHER, sizeof(SMC_EYECATCHER));
378380

0 commit comments

Comments
 (0)