diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-sparc64/oplib.h | 4 | ||||
| -rw-r--r-- | include/linux/isa.h | 11 | ||||
| -rw-r--r-- | include/linux/skbuff.h | 40 | ||||
| -rw-r--r-- | include/net/sctp/sctp.h | 1 | ||||
| -rw-r--r-- | include/net/sctp/structs.h | 13 |
5 files changed, 52 insertions, 17 deletions
diff --git a/include/asm-sparc64/oplib.h b/include/asm-sparc64/oplib.h index 86dc5c018a19..55c5bb27e4da 100644 --- a/include/asm-sparc64/oplib.h +++ b/include/asm-sparc64/oplib.h | |||
| @@ -297,11 +297,7 @@ extern void prom_sun4v_guest_soft_state(void); | |||
| 297 | extern int prom_ihandle2path(int handle, char *buffer, int bufsize); | 297 | extern int prom_ihandle2path(int handle, char *buffer, int bufsize); |
| 298 | 298 | ||
| 299 | /* Client interface level routines. */ | 299 | /* Client interface level routines. */ |
| 300 | extern void prom_set_trap_table(unsigned long tba); | ||
| 301 | extern void prom_set_trap_table_sun4v(unsigned long tba, unsigned long mmfsa); | ||
| 302 | |||
| 303 | extern long p1275_cmd(const char *, long, ...); | 300 | extern long p1275_cmd(const char *, long, ...); |
| 304 | |||
| 305 | 301 | ||
| 306 | #if 0 | 302 | #if 0 |
| 307 | #define P1275_SIZE(x) ((((long)((x) / 32)) << 32) | (x)) | 303 | #define P1275_SIZE(x) ((((long)((x) / 32)) << 32) | (x)) |
diff --git a/include/linux/isa.h b/include/linux/isa.h index 1b855335cb11..b0270e3814c8 100644 --- a/include/linux/isa.h +++ b/include/linux/isa.h | |||
| @@ -22,7 +22,18 @@ struct isa_driver { | |||
| 22 | 22 | ||
| 23 | #define to_isa_driver(x) container_of((x), struct isa_driver, driver) | 23 | #define to_isa_driver(x) container_of((x), struct isa_driver, driver) |
| 24 | 24 | ||
| 25 | #ifdef CONFIG_ISA | ||
| 25 | int isa_register_driver(struct isa_driver *, unsigned int); | 26 | int isa_register_driver(struct isa_driver *, unsigned int); |
| 26 | void isa_unregister_driver(struct isa_driver *); | 27 | void isa_unregister_driver(struct isa_driver *); |
| 28 | #else | ||
| 29 | static inline int isa_register_driver(struct isa_driver *d, unsigned int i) | ||
| 30 | { | ||
| 31 | return 0; | ||
| 32 | } | ||
| 33 | |||
| 34 | static inline void isa_unregister_driver(struct isa_driver *d) | ||
| 35 | { | ||
| 36 | } | ||
| 37 | #endif | ||
| 27 | 38 | ||
| 28 | #endif /* __LINUX_ISA_H */ | 39 | #endif /* __LINUX_ISA_H */ |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 93c27f71122a..a656cecd373c 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
| @@ -1352,6 +1352,22 @@ static inline int skb_clone_writable(struct sk_buff *skb, int len) | |||
| 1352 | skb_headroom(skb) + len <= skb->hdr_len; | 1352 | skb_headroom(skb) + len <= skb->hdr_len; |
| 1353 | } | 1353 | } |
| 1354 | 1354 | ||
| 1355 | static inline int __skb_cow(struct sk_buff *skb, unsigned int headroom, | ||
| 1356 | int cloned) | ||
| 1357 | { | ||
| 1358 | int delta = 0; | ||
| 1359 | |||
| 1360 | if (headroom < NET_SKB_PAD) | ||
| 1361 | headroom = NET_SKB_PAD; | ||
| 1362 | if (headroom > skb_headroom(skb)) | ||
| 1363 | delta = headroom - skb_headroom(skb); | ||
| 1364 | |||
| 1365 | if (delta || cloned) | ||
| 1366 | return pskb_expand_head(skb, ALIGN(delta, NET_SKB_PAD), 0, | ||
| 1367 | GFP_ATOMIC); | ||
| 1368 | return 0; | ||
| 1369 | } | ||
| 1370 | |||
| 1355 | /** | 1371 | /** |
| 1356 | * skb_cow - copy header of skb when it is required | 1372 | * skb_cow - copy header of skb when it is required |
| 1357 | * @skb: buffer to cow | 1373 | * @skb: buffer to cow |
| @@ -1366,16 +1382,22 @@ static inline int skb_clone_writable(struct sk_buff *skb, int len) | |||
| 1366 | */ | 1382 | */ |
| 1367 | static inline int skb_cow(struct sk_buff *skb, unsigned int headroom) | 1383 | static inline int skb_cow(struct sk_buff *skb, unsigned int headroom) |
| 1368 | { | 1384 | { |
| 1369 | int delta = (headroom > NET_SKB_PAD ? headroom : NET_SKB_PAD) - | 1385 | return __skb_cow(skb, headroom, skb_cloned(skb)); |
| 1370 | skb_headroom(skb); | 1386 | } |
| 1371 | |||
| 1372 | if (delta < 0) | ||
| 1373 | delta = 0; | ||
| 1374 | 1387 | ||
| 1375 | if (delta || skb_cloned(skb)) | 1388 | /** |
| 1376 | return pskb_expand_head(skb, (delta + (NET_SKB_PAD-1)) & | 1389 | * skb_cow_head - skb_cow but only making the head writable |
| 1377 | ~(NET_SKB_PAD-1), 0, GFP_ATOMIC); | 1390 | * @skb: buffer to cow |
| 1378 | return 0; | 1391 | * @headroom: needed headroom |
| 1392 | * | ||
| 1393 | * This function is identical to skb_cow except that we replace the | ||
| 1394 | * skb_cloned check by skb_header_cloned. It should be used when | ||
| 1395 | * you only need to push on some header and do not need to modify | ||
| 1396 | * the data. | ||
| 1397 | */ | ||
| 1398 | static inline int skb_cow_head(struct sk_buff *skb, unsigned int headroom) | ||
| 1399 | { | ||
| 1400 | return __skb_cow(skb, headroom, skb_header_cloned(skb)); | ||
| 1379 | } | 1401 | } |
| 1380 | 1402 | ||
| 1381 | /** | 1403 | /** |
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index d529045c1679..c9cc00c85782 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
| @@ -123,6 +123,7 @@ | |||
| 123 | * sctp/protocol.c | 123 | * sctp/protocol.c |
| 124 | */ | 124 | */ |
| 125 | extern struct sock *sctp_get_ctl_sock(void); | 125 | extern struct sock *sctp_get_ctl_sock(void); |
| 126 | extern void sctp_local_addr_free(struct rcu_head *head); | ||
| 126 | extern int sctp_copy_local_addr_list(struct sctp_bind_addr *, | 127 | extern int sctp_copy_local_addr_list(struct sctp_bind_addr *, |
| 127 | sctp_scope_t, gfp_t gfp, | 128 | sctp_scope_t, gfp_t gfp, |
| 128 | int flags); | 129 | int flags); |
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 | ||
