diff options
author | Zach Brown <zach.brown@oracle.com> | 2010-07-23 10:32:31 -0700 |
---|---|---|
committer | Andy Grover <andy.grover@oracle.com> | 2010-09-08 18:16:47 -0700 |
commit | 5adb5bc65f93e52341c3fc9d03d4030dd375e256 (patch) | |
tree | 55b19c7757ccd64f58169a05cd63e91bee409bad /net/rds/rds.h | |
parent | 77510481c0c3980c8979ed236d63e59221fb8ce5 (diff) | |
download | talos-obmc-linux-5adb5bc65f93e52341c3fc9d03d4030dd375e256.tar.gz talos-obmc-linux-5adb5bc65f93e52341c3fc9d03d4030dd375e256.zip |
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>
Diffstat (limited to 'net/rds/rds.h')
-rw-r--r-- | net/rds/rds.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/rds/rds.h b/net/rds/rds.h index 2ff7fc9f0539..aab5e949fa93 100644 --- a/net/rds/rds.h +++ b/net/rds/rds.h @@ -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); |