RDS: have sockets get transport module references
Right now there's nothing to stop the various paths that use rs->rs_transport from racing with rmmod and executing freed transport code. The simple fix is to have binding to a transport also hold a reference to the transport's module, removing this class of races. We already had an unused t_owner field which was set for the modular transports and which wasn't set for the built-in loop transport. Signed-off-by: Zach Brown <zach.brown@oracle.com>
This commit is contained in:
@@ -798,6 +798,7 @@ void rds_connect_complete(struct rds_connection *conn);
|
||||
int rds_trans_register(struct rds_transport *trans);
|
||||
void rds_trans_unregister(struct rds_transport *trans);
|
||||
struct rds_transport *rds_trans_get_preferred(__be32 addr);
|
||||
void rds_trans_put(struct rds_transport *trans);
|
||||
unsigned int rds_trans_stats_info_copy(struct rds_info_iterator *iter,
|
||||
unsigned int avail);
|
||||
int rds_trans_init(void);
|
||||
|
Reference in New Issue
Block a user