sctp: Add RCU protection to assoc->transport_addr_list
peer.transport_addr_list is currently only protected by sk_sock which is inpractical to acquire for procfs dumping purposes. This patch adds RCU protection allowing for the procfs readers to enter RCU read-side critical sections. Modification of the list continues to be serialized via sk_lock. V2: Use list_del_rcu() in sctp_association_free() to be safe Skip transports marked dead when dumping for procfs Cc: Vlad Yasevich <vyasevich@gmail.com> Cc: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Thomas Graf <tgraf@suug.ch> Acked-by: Vlad Yasevich <vyasevich@gmail.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Šī revīzija ir iekļauta:

revīziju iesūtīja
David S. Miller

vecāks
0b0fe913bf
revīzija
45122ca26c
@@ -949,6 +949,8 @@ struct sctp_transport {
|
||||
|
||||
/* 64-bit random number sent with heartbeat. */
|
||||
__u64 hb_nonce;
|
||||
|
||||
struct rcu_head rcu;
|
||||
};
|
||||
|
||||
struct sctp_transport *sctp_transport_new(struct net *, const union sctp_addr *,
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user