]> git.baikalelectronics.ru Git - kernel.git/commit
RDS: have sockets get transport module references
authorZach Brown <zach.brown@oracle.com>
Fri, 23 Jul 2010 17:32:31 +0000 (10:32 -0700)
committerAndy Grover <andy.grover@oracle.com>
Thu, 9 Sep 2010 01:16:47 +0000 (18:16 -0700)
commite8f5a281e224f5464ce5b1a49bef33c84a4b5a35
tree55b19c7757ccd64f58169a05cd63e91bee409bad
parent7531ea1eb3b6a39ae78b4de476db9813caf9c31b
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>
net/rds/af_rds.c
net/rds/connection.c
net/rds/rds.h
net/rds/transport.c