Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net/rds: rds_sendmsg should not discard payload_len

Commit 3db6e0d172c9 ("rds: use RCU to synchronize work-enqueue with
connection teardown") modifies rds_sendmsg to avoid enqueueing work
while a tear down is in progress. However, it also changed the return
value of rds_sendmsg to that of rds_send_xmit instead of the
payload_len. This means the user may incorrectly receive errno values
when it should have simply received a payload of 0 while the peer
attempts a reconnections. So this patch corrects the teardown handling
code to only use the out error path in that case, thus restoring the
original payload_len return value.

Fixes: 3db6e0d172c9 ("rds: use RCU to synchronize work-enqueue with connection teardown")
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Allison Henderson <achender@kernel.org>
Link: https://patch.msgid.link/20260213035409.1963391-1-achender@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Allison Henderson and committed by
Paolo Abeni
da29e453 6d1dc801

+4 -2
+4 -2
net/rds/send.c
··· 1431 1431 else 1432 1432 queue_delayed_work(cpath->cp_wq, &cpath->cp_send_w, 1); 1433 1433 rcu_read_unlock(); 1434 + 1435 + if (ret) 1436 + goto out; 1434 1437 } 1435 - if (ret) 1436 - goto out; 1438 + 1437 1439 rds_message_put(rm); 1438 1440 1439 1441 for (ind = 0; ind < vct.indx; ind++)