diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-09-17 00:14:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-09-17 00:14:54 -0400 |
commit | edb1e9671a990e6eb9f593636deed7ac43ba9084 (patch) | |
tree | 1b8b592411d9d7e4321479f57cb6d1f38ec483e3 /include/net/sctp/structs.h | |
parent | fa890d586cc127ce72597ba0a909bfecf784e10c (diff) | |
parent | d9f30ec0b0d129b9cbf2b041a6a3159aa24592f6 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
[VLAN]: Fix net_device leak.
[PPP] generic: Fix receive path data clobbering & non-linear handling
[PPP] generic: Call skb_cow_head before scribbling over skb
[NET] skbuff: Add skb_cow_head
[BRIDGE]: Kill clone argument to br_flood_*
[PPP] pppoe: Fill in header directly in __pppoe_xmit
[PPP] pppoe: Fix data clobbering in __pppoe_xmit and return value
[PPP] pppoe: Fix skb_unshare_check call position
[SCTP]: Convert bind_addr_list locking to RCU
[SCTP]: Add RCU synchronization around sctp_localaddr_list
[PKT_SCHED]: sch_cbq.c: Shut up uninitialized variable warning
[PKTGEN]: srcmac fix
[IPV6]: Fix source address selection.
[IPV4]: Just increment OutDatagrams once per a datagram.
[IPV6]: Just increment OutDatagrams once per a datagram.
[IPV6]: Fix unbalanced socket reference with MSG_CONFIRM.
[NET_SCHED] protect action config/dump from irqs
[NET]: Fix two issues wrt. SO_BINDTODEVICE.
Diffstat (limited to 'include/net/sctp/structs.h')
-rw-r--r-- | include/net/sctp/structs.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index c0d5848c33dc..c2fe2dcc9afc 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -207,6 +207,9 @@ extern struct sctp_globals { | |||
207 | * It is a list of sctp_sockaddr_entry. | 207 | * It is a list of sctp_sockaddr_entry. |
208 | */ | 208 | */ |
209 | struct list_head local_addr_list; | 209 | struct list_head local_addr_list; |
210 | |||
211 | /* Lock that protects the local_addr_list writers */ | ||
212 | spinlock_t addr_list_lock; | ||
210 | 213 | ||
211 | /* Flag to indicate if addip is enabled. */ | 214 | /* Flag to indicate if addip is enabled. */ |
212 | int addip_enable; | 215 | int addip_enable; |
@@ -242,6 +245,7 @@ extern struct sctp_globals { | |||
242 | #define sctp_port_alloc_lock (sctp_globals.port_alloc_lock) | 245 | #define sctp_port_alloc_lock (sctp_globals.port_alloc_lock) |
243 | #define sctp_port_hashtable (sctp_globals.port_hashtable) | 246 | #define sctp_port_hashtable (sctp_globals.port_hashtable) |
244 | #define sctp_local_addr_list (sctp_globals.local_addr_list) | 247 | #define sctp_local_addr_list (sctp_globals.local_addr_list) |
248 | #define sctp_local_addr_lock (sctp_globals.addr_list_lock) | ||
245 | #define sctp_addip_enable (sctp_globals.addip_enable) | 249 | #define sctp_addip_enable (sctp_globals.addip_enable) |
246 | #define sctp_prsctp_enable (sctp_globals.prsctp_enable) | 250 | #define sctp_prsctp_enable (sctp_globals.prsctp_enable) |
247 | 251 | ||
@@ -737,8 +741,10 @@ const union sctp_addr *sctp_source(const struct sctp_chunk *chunk); | |||
737 | /* This is a structure for holding either an IPv6 or an IPv4 address. */ | 741 | /* This is a structure for holding either an IPv6 or an IPv4 address. */ |
738 | struct sctp_sockaddr_entry { | 742 | struct sctp_sockaddr_entry { |
739 | struct list_head list; | 743 | struct list_head list; |
744 | struct rcu_head rcu; | ||
740 | union sctp_addr a; | 745 | union sctp_addr a; |
741 | __u8 use_as_src; | 746 | __u8 use_as_src; |
747 | __u8 valid; | ||
742 | }; | 748 | }; |
743 | 749 | ||
744 | typedef struct sctp_chunk *(sctp_packet_phandler_t)(struct sctp_association *); | 750 | typedef struct sctp_chunk *(sctp_packet_phandler_t)(struct sctp_association *); |
@@ -1149,7 +1155,9 @@ int sctp_bind_addr_copy(struct sctp_bind_addr *dest, | |||
1149 | int flags); | 1155 | int flags); |
1150 | int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *, | 1156 | int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *, |
1151 | __u8 use_as_src, gfp_t gfp); | 1157 | __u8 use_as_src, gfp_t gfp); |
1152 | int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *); | 1158 | int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *, |
1159 | void (*rcu_call)(struct rcu_head *, | ||
1160 | void (*func)(struct rcu_head *))); | ||
1153 | int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *, | 1161 | int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *, |
1154 | struct sctp_sock *); | 1162 | struct sctp_sock *); |
1155 | union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp, | 1163 | union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp, |
@@ -1220,9 +1228,6 @@ struct sctp_ep_common { | |||
1220 | * bind_addr.address_list is our set of local IP addresses. | 1228 | * bind_addr.address_list is our set of local IP addresses. |
1221 | */ | 1229 | */ |
1222 | struct sctp_bind_addr bind_addr; | 1230 | struct sctp_bind_addr bind_addr; |
1223 | |||
1224 | /* Protection during address list comparisons. */ | ||
1225 | rwlock_t addr_lock; | ||
1226 | }; | 1231 | }; |
1227 | 1232 | ||
1228 | 1233 | ||