mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
Merge branch 'net-rds-bug-fix-ports-part-2'
Allison Henderson says:
====================
net/rds: Bug fix ports, part 2
This is the next batch of net/rds fixes ported from the Oracle UEK
kernel, following up on the first set now in net-next [1].
This is v2 of patches 1 and 2 of "net/rds: Bug fix ports, part 2"
[2], which contained two initialization-hardening ports. While
re-reviewing v1's patches 3 and 4 (the fastpath-lock teardown changes)
I found their locking needs more rework than a respin should carry, so
they are split out and will return as their own series together with
two companion fixes. The two patches here are independent of them.
[PATCH net 1/2] net/rds: reinitialize to_be_dropped on rds_send_xmit() restart
Port commit 7f52b9968d79 ("net/rds: rds_send_xmit should INIT_LIST_HEAD (&to_be_dropped) on restart")
https://github.com/oracle/linux-uek/commit/7f52b9968d79
[PATCH net 2/2] net/rds: initialize i_conn_path in rds_inc_init()
Port commit 0ec6a520da4f ("rds: rds_inc_init() should initialize the inc->i_conn_path field")
https://github.com/oracle/linux-uek/commit/0ec6a520da4f
Questions and comments appreciated!
====================
Link: https://patch.msgid.link/20260809005103.82371-1-achender@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
commit
782de55a8f
|
|
@ -89,7 +89,11 @@ static int rds_loop_xmit(struct rds_connection *conn, struct rds_message *rm,
|
|||
|
||||
BUG_ON(hdr_off || sg || off);
|
||||
|
||||
rds_inc_init(&rm->m_inc, conn, &conn->c_laddr);
|
||||
/* rds_send_queue_rm() stored the connection path in this embedded
|
||||
* inc; use the path init so the re-initialization keeps the field
|
||||
* valid instead of discarding it.
|
||||
*/
|
||||
rds_inc_path_init(&rm->m_inc, &conn->c_path[0], &conn->c_laddr);
|
||||
/* For the embedded inc. Matching put is in loop_inc_free() */
|
||||
rds_message_addref(rm);
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ void rds_inc_init(struct rds_incoming *inc, struct rds_connection *conn,
|
|||
refcount_set(&inc->i_refcount, 1);
|
||||
INIT_LIST_HEAD(&inc->i_item);
|
||||
inc->i_conn = conn;
|
||||
inc->i_conn_path = NULL;
|
||||
inc->i_saddr = *saddr;
|
||||
inc->i_usercopy.rdma_cookie = 0;
|
||||
inc->i_usercopy.rx_tstamp = ktime_set(0, 0);
|
||||
|
|
|
|||
|
|
@ -200,6 +200,14 @@ int rds_send_xmit(struct rds_conn_path *cp)
|
|||
restart:
|
||||
batch_count = 0;
|
||||
|
||||
/* The drop processing after over_batch relies on
|
||||
* rds_send_remove_from_sock() emptying to_be_dropped entry by
|
||||
* entry; warn if that post-condition ever stops holding, and
|
||||
* re-initialize the list head.
|
||||
*/
|
||||
WARN_ON_ONCE(!list_empty(&to_be_dropped));
|
||||
INIT_LIST_HEAD(&to_be_dropped);
|
||||
|
||||
/*
|
||||
* sendmsg calls here after having queued its message on the send
|
||||
* queue. We only have one task feeding the connection at a time. If
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user