Re: [syzbot] [rds?] WARNING in rds_conn_connect_if_down

From: Edward Adam Davis
Date: Sat Mar 02 2024 - 22:04:20 EST


please test mp capable for rds

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master

diff --git a/net/rds/rdma.c b/net/rds/rdma.c
index fba82d36593a..7fe1a79bd63d 100644
--- a/net/rds/rdma.c
+++ b/net/rds/rdma.c
@@ -301,6 +301,10 @@ static int __rds_rdma_map(struct rds_sock *rs, struct rds_get_mr_args *args,
kfree(sg);
}
ret = PTR_ERR(trans_private);
+ printk("ret: %d, %s\n", ret, __func__);
+ /* Trigger connection so that its ready for the next retry */
+ if (ret == -ENODEV)
+ rds_conn_connect_if_down(cp->cp_conn);
goto out;
}

diff --git a/net/rds/send.c b/net/rds/send.c
index 5e57a1581dc6..9efda3283753 100644
--- a/net/rds/send.c
+++ b/net/rds/send.c
@@ -1314,9 +1314,6 @@ int rds_sendmsg(struct socket *sock, struct msghdr *msg, size_t payload_len)
/* Parse any control messages the user may have included. */
ret = rds_cmsg_send(rs, rm, msg, &allocated_mr, &vct);
if (ret) {
- /* Trigger connection so that its ready for the next retry */
- if (ret == -EAGAIN)
- rds_conn_connect_if_down(conn);
goto out;
}