Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4518071a authored by Zach Brown's avatar Zach Brown Committed by Andy Grover
Browse files

RDS: cancel connection work structs as we shut down



Nothing was canceling the send and receive work that might have been
queued as a conn was being destroyed.

Signed-off-by: default avatarZach Brown <zach.brown@oracle.com>
parent ffcec0e1
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -336,6 +336,10 @@ void rds_conn_destroy(struct rds_connection *conn)
	rds_conn_drop(conn);
	rds_conn_drop(conn);
	flush_work(&conn->c_down_w);
	flush_work(&conn->c_down_w);


	/* make sure lingering queued work won't try to ref the conn */
	cancel_delayed_work_sync(&conn->c_send_w);
	cancel_delayed_work_sync(&conn->c_recv_w);

	/* tear down queued messages */
	/* tear down queued messages */
	list_for_each_entry_safe(rm, rtmp,
	list_for_each_entry_safe(rm, rtmp,
				 &conn->c_send_queue,
				 &conn->c_send_queue,