]> www.infradead.org Git - users/jedix/linux-maple.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)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 7 Jul 2015 23:41:26 +0000 (16:41 -0700)
commitb768e45d4be0a49525bfb8fed1c1af21616172d2
tree5d7877e232ed3aabb37b9da9cda8476cd9e89b8e
parent95cc51e303c4c3c290434a7984dc513491465e3b
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>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Signed-off-by: Bang Nguyen <bang.nguyen@oracle.com>
net/rds/af_rds.c
net/rds/rds.h
net/rds/transport.c