diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-13 21:22:27 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-13 21:22:27 -0400 |
commit | 59aee3c2a1e69fe5062bd1facb72d6fcea3f3f8f (patch) | |
tree | b337d73229a69e399d4e4f7128b33ce734660e35 /include/net | |
parent | 0d69ae5fb7eb9ba3b54cf0ba4ef5ae591f31eef7 (diff) | |
parent | 046d20b73960b7a2474b6d5e920d54c3fd7c23fe (diff) |
Merge branch 'master'
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/bluetooth/bluetooth.h | 2 | ||||
-rw-r--r-- | include/net/bluetooth/rfcomm.h | 2 | ||||
-rw-r--r-- | include/net/dn_nsp.h | 8 | ||||
-rw-r--r-- | include/net/dn_route.h | 2 | ||||
-rw-r--r-- | include/net/inet_connection_sock.h | 2 | ||||
-rw-r--r-- | include/net/inet_hashtables.h | 2 | ||||
-rw-r--r-- | include/net/inet_timewait_sock.h | 3 | ||||
-rw-r--r-- | include/net/ip_vs.h | 2 | ||||
-rw-r--r-- | include/net/llc_conn.h | 2 | ||||
-rw-r--r-- | include/net/sctp/sctp.h | 2 | ||||
-rw-r--r-- | include/net/sctp/sm.h | 10 | ||||
-rw-r--r-- | include/net/sctp/structs.h | 24 | ||||
-rw-r--r-- | include/net/sctp/ulpevent.h | 16 | ||||
-rw-r--r-- | include/net/sctp/ulpqueue.h | 11 | ||||
-rw-r--r-- | include/net/sctp/user.h | 33 | ||||
-rw-r--r-- | include/net/sock.h | 16 | ||||
-rw-r--r-- | include/net/tcp.h | 3 | ||||
-rw-r--r-- | include/net/xfrm.h | 7 |
18 files changed, 80 insertions, 67 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 6dfa4a61ffd0..210458624840 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h | |||
@@ -136,7 +136,7 @@ struct bt_skb_cb { | |||
136 | }; | 136 | }; |
137 | #define bt_cb(skb) ((struct bt_skb_cb *)(skb->cb)) | 137 | #define bt_cb(skb) ((struct bt_skb_cb *)(skb->cb)) |
138 | 138 | ||
139 | static inline struct sk_buff *bt_skb_alloc(unsigned int len, unsigned int __nocast how) | 139 | static inline struct sk_buff *bt_skb_alloc(unsigned int len, gfp_t how) |
140 | { | 140 | { |
141 | struct sk_buff *skb; | 141 | struct sk_buff *skb; |
142 | 142 | ||
diff --git a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h index ffea9d54071f..fbe557f7ea1d 100644 --- a/include/net/bluetooth/rfcomm.h +++ b/include/net/bluetooth/rfcomm.h | |||
@@ -230,7 +230,7 @@ int rfcomm_send_rpn(struct rfcomm_session *s, int cr, u8 dlci, | |||
230 | u8 xon_char, u8 xoff_char, u16 param_mask); | 230 | u8 xon_char, u8 xoff_char, u16 param_mask); |
231 | 231 | ||
232 | /* ---- RFCOMM DLCs (channels) ---- */ | 232 | /* ---- RFCOMM DLCs (channels) ---- */ |
233 | struct rfcomm_dlc *rfcomm_dlc_alloc(unsigned int __nocast prio); | 233 | struct rfcomm_dlc *rfcomm_dlc_alloc(gfp_t prio); |
234 | void rfcomm_dlc_free(struct rfcomm_dlc *d); | 234 | void rfcomm_dlc_free(struct rfcomm_dlc *d); |
235 | int rfcomm_dlc_open(struct rfcomm_dlc *d, bdaddr_t *src, bdaddr_t *dst, u8 channel); | 235 | int rfcomm_dlc_open(struct rfcomm_dlc *d, bdaddr_t *src, bdaddr_t *dst, u8 channel); |
236 | int rfcomm_dlc_close(struct rfcomm_dlc *d, int reason); | 236 | int rfcomm_dlc_close(struct rfcomm_dlc *d, int reason); |
diff --git a/include/net/dn_nsp.h b/include/net/dn_nsp.h index 6bbeafa73e8b..1ba03be0af3a 100644 --- a/include/net/dn_nsp.h +++ b/include/net/dn_nsp.h | |||
@@ -19,9 +19,9 @@ extern void dn_nsp_send_data_ack(struct sock *sk); | |||
19 | extern void dn_nsp_send_oth_ack(struct sock *sk); | 19 | extern void dn_nsp_send_oth_ack(struct sock *sk); |
20 | extern void dn_nsp_delayed_ack(struct sock *sk); | 20 | extern void dn_nsp_delayed_ack(struct sock *sk); |
21 | extern void dn_send_conn_ack(struct sock *sk); | 21 | extern void dn_send_conn_ack(struct sock *sk); |
22 | extern void dn_send_conn_conf(struct sock *sk, int gfp); | 22 | extern void dn_send_conn_conf(struct sock *sk, gfp_t gfp); |
23 | extern void dn_nsp_send_disc(struct sock *sk, unsigned char type, | 23 | extern void dn_nsp_send_disc(struct sock *sk, unsigned char type, |
24 | unsigned short reason, int gfp); | 24 | unsigned short reason, gfp_t gfp); |
25 | extern void dn_nsp_return_disc(struct sk_buff *skb, unsigned char type, | 25 | extern void dn_nsp_return_disc(struct sk_buff *skb, unsigned char type, |
26 | unsigned short reason); | 26 | unsigned short reason); |
27 | extern void dn_nsp_send_link(struct sock *sk, unsigned char lsflags, char fcval); | 27 | extern void dn_nsp_send_link(struct sock *sk, unsigned char lsflags, char fcval); |
@@ -29,14 +29,14 @@ extern void dn_nsp_send_conninit(struct sock *sk, unsigned char flags); | |||
29 | 29 | ||
30 | extern void dn_nsp_output(struct sock *sk); | 30 | extern void dn_nsp_output(struct sock *sk); |
31 | extern int dn_nsp_check_xmit_queue(struct sock *sk, struct sk_buff *skb, struct sk_buff_head *q, unsigned short acknum); | 31 | extern int dn_nsp_check_xmit_queue(struct sock *sk, struct sk_buff *skb, struct sk_buff_head *q, unsigned short acknum); |
32 | extern void dn_nsp_queue_xmit(struct sock *sk, struct sk_buff *skb, int gfp, int oob); | 32 | extern void dn_nsp_queue_xmit(struct sock *sk, struct sk_buff *skb, gfp_t gfp, int oob); |
33 | extern unsigned long dn_nsp_persist(struct sock *sk); | 33 | extern unsigned long dn_nsp_persist(struct sock *sk); |
34 | extern int dn_nsp_xmit_timeout(struct sock *sk); | 34 | extern int dn_nsp_xmit_timeout(struct sock *sk); |
35 | 35 | ||
36 | extern int dn_nsp_rx(struct sk_buff *); | 36 | extern int dn_nsp_rx(struct sk_buff *); |
37 | extern int dn_nsp_backlog_rcv(struct sock *sk, struct sk_buff *skb); | 37 | extern int dn_nsp_backlog_rcv(struct sock *sk, struct sk_buff *skb); |
38 | 38 | ||
39 | extern struct sk_buff *dn_alloc_skb(struct sock *sk, int size, int pri); | 39 | extern struct sk_buff *dn_alloc_skb(struct sock *sk, int size, gfp_t pri); |
40 | extern struct sk_buff *dn_alloc_send_skb(struct sock *sk, size_t *size, int noblock, long timeo, int *err); | 40 | extern struct sk_buff *dn_alloc_send_skb(struct sock *sk, size_t *size, int noblock, long timeo, int *err); |
41 | 41 | ||
42 | #define NSP_REASON_OK 0 /* No error */ | 42 | #define NSP_REASON_OK 0 /* No error */ |
diff --git a/include/net/dn_route.h b/include/net/dn_route.h index d084721db198..5122da3f2eb3 100644 --- a/include/net/dn_route.h +++ b/include/net/dn_route.h | |||
@@ -15,7 +15,7 @@ | |||
15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. |
16 | *******************************************************************************/ | 16 | *******************************************************************************/ |
17 | 17 | ||
18 | extern struct sk_buff *dn_alloc_skb(struct sock *sk, int size, int pri); | 18 | extern struct sk_buff *dn_alloc_skb(struct sock *sk, int size, gfp_t pri); |
19 | extern int dn_route_output_sock(struct dst_entry **pprt, struct flowi *, struct sock *sk, int flags); | 19 | extern int dn_route_output_sock(struct dst_entry **pprt, struct flowi *, struct sock *sk, int flags); |
20 | extern int dn_cache_dump(struct sk_buff *skb, struct netlink_callback *cb); | 20 | extern int dn_cache_dump(struct sk_buff *skb, struct netlink_callback *cb); |
21 | extern int dn_cache_getroute(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg); | 21 | extern int dn_cache_getroute(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg); |
diff --git a/include/net/inet_connection_sock.h b/include/net/inet_connection_sock.h index 651f824c1008..b0c99060b78d 100644 --- a/include/net/inet_connection_sock.h +++ b/include/net/inet_connection_sock.h | |||
@@ -94,7 +94,7 @@ static inline void *inet_csk_ca(const struct sock *sk) | |||
94 | 94 | ||
95 | extern struct sock *inet_csk_clone(struct sock *sk, | 95 | extern struct sock *inet_csk_clone(struct sock *sk, |
96 | const struct request_sock *req, | 96 | const struct request_sock *req, |
97 | const unsigned int __nocast priority); | 97 | const gfp_t priority); |
98 | 98 | ||
99 | enum inet_csk_ack_state_t { | 99 | enum inet_csk_ack_state_t { |
100 | ICSK_ACK_SCHED = 1, | 100 | ICSK_ACK_SCHED = 1, |
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h index 35f49e65e295..f50f95968340 100644 --- a/include/net/inet_hashtables.h +++ b/include/net/inet_hashtables.h | |||
@@ -40,7 +40,7 @@ | |||
40 | struct inet_ehash_bucket { | 40 | struct inet_ehash_bucket { |
41 | rwlock_t lock; | 41 | rwlock_t lock; |
42 | struct hlist_head chain; | 42 | struct hlist_head chain; |
43 | } __attribute__((__aligned__(8))); | 43 | }; |
44 | 44 | ||
45 | /* There are a few simple rules, which allow for local port reuse by | 45 | /* There are a few simple rules, which allow for local port reuse by |
46 | * an application. In essence: | 46 | * an application. In essence: |
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h index 4ade56ef3a4d..28f7b2103505 100644 --- a/include/net/inet_timewait_sock.h +++ b/include/net/inet_timewait_sock.h | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/ip.h> | 20 | #include <linux/ip.h> |
21 | #include <linux/list.h> | 21 | #include <linux/list.h> |
22 | #include <linux/module.h> | ||
22 | #include <linux/timer.h> | 23 | #include <linux/timer.h> |
23 | #include <linux/types.h> | 24 | #include <linux/types.h> |
24 | #include <linux/workqueue.h> | 25 | #include <linux/workqueue.h> |
@@ -193,11 +194,13 @@ static inline u32 inet_rcv_saddr(const struct sock *sk) | |||
193 | static inline void inet_twsk_put(struct inet_timewait_sock *tw) | 194 | static inline void inet_twsk_put(struct inet_timewait_sock *tw) |
194 | { | 195 | { |
195 | if (atomic_dec_and_test(&tw->tw_refcnt)) { | 196 | if (atomic_dec_and_test(&tw->tw_refcnt)) { |
197 | struct module *owner = tw->tw_prot->owner; | ||
196 | #ifdef SOCK_REFCNT_DEBUG | 198 | #ifdef SOCK_REFCNT_DEBUG |
197 | printk(KERN_DEBUG "%s timewait_sock %p released\n", | 199 | printk(KERN_DEBUG "%s timewait_sock %p released\n", |
198 | tw->tw_prot->name, tw); | 200 | tw->tw_prot->name, tw); |
199 | #endif | 201 | #endif |
200 | kmem_cache_free(tw->tw_prot->twsk_slab, tw); | 202 | kmem_cache_free(tw->tw_prot->twsk_slab, tw); |
203 | module_put(owner); | ||
201 | } | 204 | } |
202 | } | 205 | } |
203 | 206 | ||
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 06b4235aa016..3b5559a023a4 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -832,7 +832,7 @@ extern void ip_vs_app_inc_put(struct ip_vs_app *inc); | |||
832 | 832 | ||
833 | extern int ip_vs_app_pkt_out(struct ip_vs_conn *, struct sk_buff **pskb); | 833 | extern int ip_vs_app_pkt_out(struct ip_vs_conn *, struct sk_buff **pskb); |
834 | extern int ip_vs_app_pkt_in(struct ip_vs_conn *, struct sk_buff **pskb); | 834 | extern int ip_vs_app_pkt_in(struct ip_vs_conn *, struct sk_buff **pskb); |
835 | extern int ip_vs_skb_replace(struct sk_buff *skb, int pri, | 835 | extern int ip_vs_skb_replace(struct sk_buff *skb, gfp_t pri, |
836 | char *o_buf, int o_len, char *n_buf, int n_len); | 836 | char *o_buf, int o_len, char *n_buf, int n_len); |
837 | extern int ip_vs_app_init(void); | 837 | extern int ip_vs_app_init(void); |
838 | extern void ip_vs_app_cleanup(void); | 838 | extern void ip_vs_app_cleanup(void); |
diff --git a/include/net/llc_conn.h b/include/net/llc_conn.h index 54852ff6033b..00730d21b522 100644 --- a/include/net/llc_conn.h +++ b/include/net/llc_conn.h | |||
@@ -93,7 +93,7 @@ static __inline__ char llc_backlog_type(struct sk_buff *skb) | |||
93 | return skb->cb[sizeof(skb->cb) - 1]; | 93 | return skb->cb[sizeof(skb->cb) - 1]; |
94 | } | 94 | } |
95 | 95 | ||
96 | extern struct sock *llc_sk_alloc(int family, unsigned int __nocast priority, | 96 | extern struct sock *llc_sk_alloc(int family, gfp_t priority, |
97 | struct proto *prot); | 97 | struct proto *prot); |
98 | extern void llc_sk_free(struct sock *sk); | 98 | extern void llc_sk_free(struct sock *sk); |
99 | 99 | ||
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index e1d5ec1c23c0..8f241216f46b 100644 --- a/include/net/sctp/sctp.h +++ b/include/net/sctp/sctp.h | |||
@@ -125,7 +125,7 @@ | |||
125 | */ | 125 | */ |
126 | extern struct sock *sctp_get_ctl_sock(void); | 126 | extern struct sock *sctp_get_ctl_sock(void); |
127 | extern int sctp_copy_local_addr_list(struct sctp_bind_addr *, | 127 | extern int sctp_copy_local_addr_list(struct sctp_bind_addr *, |
128 | sctp_scope_t, unsigned int __nocast gfp, | 128 | sctp_scope_t, gfp_t gfp, |
129 | int flags); | 129 | int flags); |
130 | extern struct sctp_pf *sctp_get_pf_specific(sa_family_t family); | 130 | extern struct sctp_pf *sctp_get_pf_specific(sa_family_t family); |
131 | extern int sctp_register_pf(struct sctp_pf *, sa_family_t); | 131 | extern int sctp_register_pf(struct sctp_pf *, sa_family_t); |
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h index 58462164d960..1eac3d0eb7a9 100644 --- a/include/net/sctp/sm.h +++ b/include/net/sctp/sm.h | |||
@@ -181,17 +181,17 @@ const sctp_sm_table_entry_t *sctp_sm_lookup_event(sctp_event_t, | |||
181 | int sctp_chunk_iif(const struct sctp_chunk *); | 181 | int sctp_chunk_iif(const struct sctp_chunk *); |
182 | struct sctp_association *sctp_make_temp_asoc(const struct sctp_endpoint *, | 182 | struct sctp_association *sctp_make_temp_asoc(const struct sctp_endpoint *, |
183 | struct sctp_chunk *, | 183 | struct sctp_chunk *, |
184 | unsigned int __nocast gfp); | 184 | gfp_t gfp); |
185 | __u32 sctp_generate_verification_tag(void); | 185 | __u32 sctp_generate_verification_tag(void); |
186 | void sctp_populate_tie_tags(__u8 *cookie, __u32 curTag, __u32 hisTag); | 186 | void sctp_populate_tie_tags(__u8 *cookie, __u32 curTag, __u32 hisTag); |
187 | 187 | ||
188 | /* Prototypes for chunk-building functions. */ | 188 | /* Prototypes for chunk-building functions. */ |
189 | struct sctp_chunk *sctp_make_init(const struct sctp_association *, | 189 | struct sctp_chunk *sctp_make_init(const struct sctp_association *, |
190 | const struct sctp_bind_addr *, | 190 | const struct sctp_bind_addr *, |
191 | unsigned int __nocast gfp, int vparam_len); | 191 | gfp_t gfp, int vparam_len); |
192 | struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *, | 192 | struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *, |
193 | const struct sctp_chunk *, | 193 | const struct sctp_chunk *, |
194 | const unsigned int __nocast gfp, | 194 | const gfp_t gfp, |
195 | const int unkparam_len); | 195 | const int unkparam_len); |
196 | struct sctp_chunk *sctp_make_cookie_echo(const struct sctp_association *, | 196 | struct sctp_chunk *sctp_make_cookie_echo(const struct sctp_association *, |
197 | const struct sctp_chunk *); | 197 | const struct sctp_chunk *); |
@@ -265,7 +265,7 @@ int sctp_do_sm(sctp_event_t event_type, sctp_subtype_t subtype, | |||
265 | struct sctp_endpoint *, | 265 | struct sctp_endpoint *, |
266 | struct sctp_association *asoc, | 266 | struct sctp_association *asoc, |
267 | void *event_arg, | 267 | void *event_arg, |
268 | unsigned int __nocast gfp); | 268 | gfp_t gfp); |
269 | 269 | ||
270 | /* 2nd level prototypes */ | 270 | /* 2nd level prototypes */ |
271 | void sctp_generate_t3_rtx_event(unsigned long peer); | 271 | void sctp_generate_t3_rtx_event(unsigned long peer); |
@@ -276,7 +276,7 @@ void sctp_ootb_pkt_free(struct sctp_packet *); | |||
276 | struct sctp_association *sctp_unpack_cookie(const struct sctp_endpoint *, | 276 | struct sctp_association *sctp_unpack_cookie(const struct sctp_endpoint *, |
277 | const struct sctp_association *, | 277 | const struct sctp_association *, |
278 | struct sctp_chunk *, | 278 | struct sctp_chunk *, |
279 | unsigned int __nocast gfp, int *err, | 279 | gfp_t gfp, int *err, |
280 | struct sctp_chunk **err_chk_p); | 280 | struct sctp_chunk **err_chk_p); |
281 | int sctp_addip_addr_config(struct sctp_association *, sctp_param_t, | 281 | int sctp_addip_addr_config(struct sctp_association *, sctp_param_t, |
282 | struct sockaddr_storage*, int); | 282 | struct sockaddr_storage*, int); |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 994009bbe3b4..9c385b6417c7 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -446,7 +446,7 @@ struct sctp_ssnmap { | |||
446 | }; | 446 | }; |
447 | 447 | ||
448 | struct sctp_ssnmap *sctp_ssnmap_new(__u16 in, __u16 out, | 448 | struct sctp_ssnmap *sctp_ssnmap_new(__u16 in, __u16 out, |
449 | unsigned int __nocast gfp); | 449 | gfp_t gfp); |
450 | void sctp_ssnmap_free(struct sctp_ssnmap *map); | 450 | void sctp_ssnmap_free(struct sctp_ssnmap *map); |
451 | void sctp_ssnmap_clear(struct sctp_ssnmap *map); | 451 | void sctp_ssnmap_clear(struct sctp_ssnmap *map); |
452 | 452 | ||
@@ -947,7 +947,7 @@ struct sctp_transport { | |||
947 | }; | 947 | }; |
948 | 948 | ||
949 | struct sctp_transport *sctp_transport_new(const union sctp_addr *, | 949 | struct sctp_transport *sctp_transport_new(const union sctp_addr *, |
950 | unsigned int __nocast); | 950 | gfp_t); |
951 | void sctp_transport_set_owner(struct sctp_transport *, | 951 | void sctp_transport_set_owner(struct sctp_transport *, |
952 | struct sctp_association *); | 952 | struct sctp_association *); |
953 | void sctp_transport_route(struct sctp_transport *, union sctp_addr *, | 953 | void sctp_transport_route(struct sctp_transport *, union sctp_addr *, |
@@ -1095,10 +1095,10 @@ void sctp_bind_addr_init(struct sctp_bind_addr *, __u16 port); | |||
1095 | void sctp_bind_addr_free(struct sctp_bind_addr *); | 1095 | void sctp_bind_addr_free(struct sctp_bind_addr *); |
1096 | int sctp_bind_addr_copy(struct sctp_bind_addr *dest, | 1096 | int sctp_bind_addr_copy(struct sctp_bind_addr *dest, |
1097 | const struct sctp_bind_addr *src, | 1097 | const struct sctp_bind_addr *src, |
1098 | sctp_scope_t scope, unsigned int __nocast gfp, | 1098 | sctp_scope_t scope, gfp_t gfp, |
1099 | int flags); | 1099 | int flags); |
1100 | int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *, | 1100 | int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *, |
1101 | unsigned int __nocast gfp); | 1101 | gfp_t gfp); |
1102 | int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *); | 1102 | int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *); |
1103 | int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *, | 1103 | int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *, |
1104 | struct sctp_sock *); | 1104 | struct sctp_sock *); |
@@ -1108,9 +1108,9 @@ union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp, | |||
1108 | struct sctp_sock *opt); | 1108 | struct sctp_sock *opt); |
1109 | union sctp_params sctp_bind_addrs_to_raw(const struct sctp_bind_addr *bp, | 1109 | union sctp_params sctp_bind_addrs_to_raw(const struct sctp_bind_addr *bp, |
1110 | int *addrs_len, | 1110 | int *addrs_len, |
1111 | unsigned int __nocast gfp); | 1111 | gfp_t gfp); |
1112 | int sctp_raw_to_bind_addrs(struct sctp_bind_addr *bp, __u8 *raw, int len, | 1112 | int sctp_raw_to_bind_addrs(struct sctp_bind_addr *bp, __u8 *raw, int len, |
1113 | __u16 port, unsigned int __nocast gfp); | 1113 | __u16 port, gfp_t gfp); |
1114 | 1114 | ||
1115 | sctp_scope_t sctp_scope(const union sctp_addr *); | 1115 | sctp_scope_t sctp_scope(const union sctp_addr *); |
1116 | int sctp_in_scope(const union sctp_addr *addr, const sctp_scope_t scope); | 1116 | int sctp_in_scope(const union sctp_addr *addr, const sctp_scope_t scope); |
@@ -1239,7 +1239,7 @@ static inline struct sctp_endpoint *sctp_ep(struct sctp_ep_common *base) | |||
1239 | } | 1239 | } |
1240 | 1240 | ||
1241 | /* These are function signatures for manipulating endpoints. */ | 1241 | /* These are function signatures for manipulating endpoints. */ |
1242 | struct sctp_endpoint *sctp_endpoint_new(struct sock *, unsigned int __nocast); | 1242 | struct sctp_endpoint *sctp_endpoint_new(struct sock *, gfp_t); |
1243 | void sctp_endpoint_free(struct sctp_endpoint *); | 1243 | void sctp_endpoint_free(struct sctp_endpoint *); |
1244 | void sctp_endpoint_put(struct sctp_endpoint *); | 1244 | void sctp_endpoint_put(struct sctp_endpoint *); |
1245 | void sctp_endpoint_hold(struct sctp_endpoint *); | 1245 | void sctp_endpoint_hold(struct sctp_endpoint *); |
@@ -1260,7 +1260,7 @@ int sctp_verify_init(const struct sctp_association *asoc, sctp_cid_t, | |||
1260 | struct sctp_chunk **err_chunk); | 1260 | struct sctp_chunk **err_chunk); |
1261 | int sctp_process_init(struct sctp_association *, sctp_cid_t cid, | 1261 | int sctp_process_init(struct sctp_association *, sctp_cid_t cid, |
1262 | const union sctp_addr *peer, | 1262 | const union sctp_addr *peer, |
1263 | sctp_init_chunk_t *init, unsigned int __nocast gfp); | 1263 | sctp_init_chunk_t *init, gfp_t gfp); |
1264 | __u32 sctp_generate_tag(const struct sctp_endpoint *); | 1264 | __u32 sctp_generate_tag(const struct sctp_endpoint *); |
1265 | __u32 sctp_generate_tsn(const struct sctp_endpoint *); | 1265 | __u32 sctp_generate_tsn(const struct sctp_endpoint *); |
1266 | 1266 | ||
@@ -1723,7 +1723,7 @@ static inline struct sctp_association *sctp_assoc(struct sctp_ep_common *base) | |||
1723 | 1723 | ||
1724 | struct sctp_association * | 1724 | struct sctp_association * |
1725 | sctp_association_new(const struct sctp_endpoint *, const struct sock *, | 1725 | sctp_association_new(const struct sctp_endpoint *, const struct sock *, |
1726 | sctp_scope_t scope, unsigned int __nocast gfp); | 1726 | sctp_scope_t scope, gfp_t gfp); |
1727 | void sctp_association_free(struct sctp_association *); | 1727 | void sctp_association_free(struct sctp_association *); |
1728 | void sctp_association_put(struct sctp_association *); | 1728 | void sctp_association_put(struct sctp_association *); |
1729 | void sctp_association_hold(struct sctp_association *); | 1729 | void sctp_association_hold(struct sctp_association *); |
@@ -1739,7 +1739,7 @@ int sctp_assoc_lookup_laddr(struct sctp_association *asoc, | |||
1739 | const union sctp_addr *laddr); | 1739 | const union sctp_addr *laddr); |
1740 | struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *, | 1740 | struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *, |
1741 | const union sctp_addr *address, | 1741 | const union sctp_addr *address, |
1742 | const unsigned int __nocast gfp, | 1742 | const gfp_t gfp, |
1743 | const int peer_state); | 1743 | const int peer_state); |
1744 | void sctp_assoc_del_peer(struct sctp_association *asoc, | 1744 | void sctp_assoc_del_peer(struct sctp_association *asoc, |
1745 | const union sctp_addr *addr); | 1745 | const union sctp_addr *addr); |
@@ -1764,10 +1764,10 @@ void sctp_assoc_rwnd_decrease(struct sctp_association *, unsigned); | |||
1764 | void sctp_assoc_set_primary(struct sctp_association *, | 1764 | void sctp_assoc_set_primary(struct sctp_association *, |
1765 | struct sctp_transport *); | 1765 | struct sctp_transport *); |
1766 | int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *, | 1766 | int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *, |
1767 | unsigned int __nocast); | 1767 | gfp_t); |
1768 | int sctp_assoc_set_bind_addr_from_cookie(struct sctp_association *, | 1768 | int sctp_assoc_set_bind_addr_from_cookie(struct sctp_association *, |
1769 | struct sctp_cookie*, | 1769 | struct sctp_cookie*, |
1770 | unsigned int __nocast gfp); | 1770 | gfp_t gfp); |
1771 | 1771 | ||
1772 | int sctp_cmp_addr_exact(const union sctp_addr *ss1, | 1772 | int sctp_cmp_addr_exact(const union sctp_addr *ss1, |
1773 | const union sctp_addr *ss2); | 1773 | const union sctp_addr *ss2); |
diff --git a/include/net/sctp/ulpevent.h b/include/net/sctp/ulpevent.h index 90fe4bf6754f..6c40cfc4832d 100644 --- a/include/net/sctp/ulpevent.h +++ b/include/net/sctp/ulpevent.h | |||
@@ -88,7 +88,7 @@ struct sctp_ulpevent *sctp_ulpevent_make_assoc_change( | |||
88 | __u16 error, | 88 | __u16 error, |
89 | __u16 outbound, | 89 | __u16 outbound, |
90 | __u16 inbound, | 90 | __u16 inbound, |
91 | unsigned int __nocast gfp); | 91 | gfp_t gfp); |
92 | 92 | ||
93 | struct sctp_ulpevent *sctp_ulpevent_make_peer_addr_change( | 93 | struct sctp_ulpevent *sctp_ulpevent_make_peer_addr_change( |
94 | const struct sctp_association *asoc, | 94 | const struct sctp_association *asoc, |
@@ -96,35 +96,35 @@ struct sctp_ulpevent *sctp_ulpevent_make_peer_addr_change( | |||
96 | int flags, | 96 | int flags, |
97 | int state, | 97 | int state, |
98 | int error, | 98 | int error, |
99 | unsigned int __nocast gfp); | 99 | gfp_t gfp); |
100 | 100 | ||
101 | struct sctp_ulpevent *sctp_ulpevent_make_remote_error( | 101 | struct sctp_ulpevent *sctp_ulpevent_make_remote_error( |
102 | const struct sctp_association *asoc, | 102 | const struct sctp_association *asoc, |
103 | struct sctp_chunk *chunk, | 103 | struct sctp_chunk *chunk, |
104 | __u16 flags, | 104 | __u16 flags, |
105 | unsigned int __nocast gfp); | 105 | gfp_t gfp); |
106 | struct sctp_ulpevent *sctp_ulpevent_make_send_failed( | 106 | struct sctp_ulpevent *sctp_ulpevent_make_send_failed( |
107 | const struct sctp_association *asoc, | 107 | const struct sctp_association *asoc, |
108 | struct sctp_chunk *chunk, | 108 | struct sctp_chunk *chunk, |
109 | __u16 flags, | 109 | __u16 flags, |
110 | __u32 error, | 110 | __u32 error, |
111 | unsigned int __nocast gfp); | 111 | gfp_t gfp); |
112 | 112 | ||
113 | struct sctp_ulpevent *sctp_ulpevent_make_shutdown_event( | 113 | struct sctp_ulpevent *sctp_ulpevent_make_shutdown_event( |
114 | const struct sctp_association *asoc, | 114 | const struct sctp_association *asoc, |
115 | __u16 flags, | 115 | __u16 flags, |
116 | unsigned int __nocast gfp); | 116 | gfp_t gfp); |
117 | 117 | ||
118 | struct sctp_ulpevent *sctp_ulpevent_make_pdapi( | 118 | struct sctp_ulpevent *sctp_ulpevent_make_pdapi( |
119 | const struct sctp_association *asoc, | 119 | const struct sctp_association *asoc, |
120 | __u32 indication, unsigned int __nocast gfp); | 120 | __u32 indication, gfp_t gfp); |
121 | 121 | ||
122 | struct sctp_ulpevent *sctp_ulpevent_make_adaption_indication( | 122 | struct sctp_ulpevent *sctp_ulpevent_make_adaption_indication( |
123 | const struct sctp_association *asoc, unsigned int __nocast gfp); | 123 | const struct sctp_association *asoc, gfp_t gfp); |
124 | 124 | ||
125 | struct sctp_ulpevent *sctp_ulpevent_make_rcvmsg(struct sctp_association *asoc, | 125 | struct sctp_ulpevent *sctp_ulpevent_make_rcvmsg(struct sctp_association *asoc, |
126 | struct sctp_chunk *chunk, | 126 | struct sctp_chunk *chunk, |
127 | unsigned int __nocast gfp); | 127 | gfp_t gfp); |
128 | 128 | ||
129 | void sctp_ulpevent_read_sndrcvinfo(const struct sctp_ulpevent *event, | 129 | void sctp_ulpevent_read_sndrcvinfo(const struct sctp_ulpevent *event, |
130 | struct msghdr *); | 130 | struct msghdr *); |
diff --git a/include/net/sctp/ulpqueue.h b/include/net/sctp/ulpqueue.h index 1a60c6d943c1..a43c8788b650 100644 --- a/include/net/sctp/ulpqueue.h +++ b/include/net/sctp/ulpqueue.h | |||
@@ -62,22 +62,19 @@ struct sctp_ulpq *sctp_ulpq_init(struct sctp_ulpq *, | |||
62 | void sctp_ulpq_free(struct sctp_ulpq *); | 62 | void sctp_ulpq_free(struct sctp_ulpq *); |
63 | 63 | ||
64 | /* Add a new DATA chunk for processing. */ | 64 | /* Add a new DATA chunk for processing. */ |
65 | int sctp_ulpq_tail_data(struct sctp_ulpq *, struct sctp_chunk *, | 65 | int sctp_ulpq_tail_data(struct sctp_ulpq *, struct sctp_chunk *, gfp_t); |
66 | unsigned int __nocast); | ||
67 | 66 | ||
68 | /* Add a new event for propagation to the ULP. */ | 67 | /* Add a new event for propagation to the ULP. */ |
69 | int sctp_ulpq_tail_event(struct sctp_ulpq *, struct sctp_ulpevent *ev); | 68 | int sctp_ulpq_tail_event(struct sctp_ulpq *, struct sctp_ulpevent *ev); |
70 | 69 | ||
71 | /* Renege previously received chunks. */ | 70 | /* Renege previously received chunks. */ |
72 | void sctp_ulpq_renege(struct sctp_ulpq *, struct sctp_chunk *, | 71 | void sctp_ulpq_renege(struct sctp_ulpq *, struct sctp_chunk *, gfp_t); |
73 | unsigned int __nocast); | ||
74 | 72 | ||
75 | /* Perform partial delivery. */ | 73 | /* Perform partial delivery. */ |
76 | void sctp_ulpq_partial_delivery(struct sctp_ulpq *, struct sctp_chunk *, | 74 | void sctp_ulpq_partial_delivery(struct sctp_ulpq *, struct sctp_chunk *, gfp_t); |
77 | unsigned int __nocast); | ||
78 | 75 | ||
79 | /* Abort the partial delivery. */ | 76 | /* Abort the partial delivery. */ |
80 | void sctp_ulpq_abort_pd(struct sctp_ulpq *, unsigned int __nocast); | 77 | void sctp_ulpq_abort_pd(struct sctp_ulpq *, gfp_t); |
81 | 78 | ||
82 | /* Clear the partial data delivery condition on this socket. */ | 79 | /* Clear the partial data delivery condition on this socket. */ |
83 | int sctp_clear_pd(struct sock *sk); | 80 | int sctp_clear_pd(struct sock *sk); |
diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h index f6328aeddcce..1c5f19f995ad 100644 --- a/include/net/sctp/user.h +++ b/include/net/sctp/user.h | |||
@@ -103,16 +103,20 @@ enum sctp_optname { | |||
103 | #define SCTP_SOCKOPT_BINDX_REM SCTP_SOCKOPT_BINDX_REM | 103 | #define SCTP_SOCKOPT_BINDX_REM SCTP_SOCKOPT_BINDX_REM |
104 | SCTP_SOCKOPT_PEELOFF, /* peel off association. */ | 104 | SCTP_SOCKOPT_PEELOFF, /* peel off association. */ |
105 | #define SCTP_SOCKOPT_PEELOFF SCTP_SOCKOPT_PEELOFF | 105 | #define SCTP_SOCKOPT_PEELOFF SCTP_SOCKOPT_PEELOFF |
106 | SCTP_GET_PEER_ADDRS_NUM, /* Get number of peer addresss. */ | 106 | SCTP_GET_PEER_ADDRS_NUM_OLD, /* Get number of peer addresss. */ |
107 | #define SCTP_GET_PEER_ADDRS_NUM SCTP_GET_PEER_ADDRS_NUM | 107 | #define SCTP_GET_PEER_ADDRS_NUM_OLD SCTP_GET_PEER_ADDRS_NUM_OLD |
108 | SCTP_GET_PEER_ADDRS_OLD, /* Get all peer addresss. */ | ||
109 | #define SCTP_GET_PEER_ADDRS_OLD SCTP_GET_PEER_ADDRS_OLD | ||
110 | SCTP_GET_LOCAL_ADDRS_NUM_OLD, /* Get number of local addresss. */ | ||
111 | #define SCTP_GET_LOCAL_ADDRS_NUM_OLD SCTP_GET_LOCAL_ADDRS_NUM_OLD | ||
112 | SCTP_GET_LOCAL_ADDRS_OLD, /* Get all local addresss. */ | ||
113 | #define SCTP_GET_LOCAL_ADDRS_OLD SCTP_GET_LOCAL_ADDRS_OLD | ||
114 | SCTP_SOCKOPT_CONNECTX, /* CONNECTX requests. */ | ||
115 | #define SCTP_SOCKOPT_CONNECTX SCTP_SOCKOPT_CONNECTX | ||
108 | SCTP_GET_PEER_ADDRS, /* Get all peer addresss. */ | 116 | SCTP_GET_PEER_ADDRS, /* Get all peer addresss. */ |
109 | #define SCTP_GET_PEER_ADDRS SCTP_GET_PEER_ADDRS | 117 | #define SCTP_GET_PEER_ADDRS SCTP_GET_PEER_ADDRS |
110 | SCTP_GET_LOCAL_ADDRS_NUM, /* Get number of local addresss. */ | ||
111 | #define SCTP_GET_LOCAL_ADDRS_NUM SCTP_GET_LOCAL_ADDRS_NUM | ||
112 | SCTP_GET_LOCAL_ADDRS, /* Get all local addresss. */ | 118 | SCTP_GET_LOCAL_ADDRS, /* Get all local addresss. */ |
113 | #define SCTP_GET_LOCAL_ADDRS SCTP_GET_LOCAL_ADDRS | 119 | #define SCTP_GET_LOCAL_ADDRS SCTP_GET_LOCAL_ADDRS |
114 | SCTP_SOCKOPT_CONNECTX, /* CONNECTX requests. */ | ||
115 | #define SCTP_SOCKOPT_CONNECTX SCTP_SOCKOPT_CONNECTX | ||
116 | }; | 120 | }; |
117 | 121 | ||
118 | /* | 122 | /* |
@@ -239,7 +243,7 @@ struct sctp_paddr_change { | |||
239 | int spc_state; | 243 | int spc_state; |
240 | int spc_error; | 244 | int spc_error; |
241 | sctp_assoc_t spc_assoc_id; | 245 | sctp_assoc_t spc_assoc_id; |
242 | }; | 246 | } __attribute__((packed, aligned(4))); |
243 | 247 | ||
244 | /* | 248 | /* |
245 | * spc_state: 32 bits (signed integer) | 249 | * spc_state: 32 bits (signed integer) |
@@ -464,7 +468,7 @@ struct sctp_assocparams { | |||
464 | struct sctp_setpeerprim { | 468 | struct sctp_setpeerprim { |
465 | sctp_assoc_t sspp_assoc_id; | 469 | sctp_assoc_t sspp_assoc_id; |
466 | struct sockaddr_storage sspp_addr; | 470 | struct sockaddr_storage sspp_addr; |
467 | }; | 471 | } __attribute__((packed, aligned(4))); |
468 | 472 | ||
469 | /* | 473 | /* |
470 | * 7.1.10 Set Primary Address (SCTP_PRIMARY_ADDR) | 474 | * 7.1.10 Set Primary Address (SCTP_PRIMARY_ADDR) |
@@ -477,7 +481,7 @@ struct sctp_setpeerprim { | |||
477 | struct sctp_prim { | 481 | struct sctp_prim { |
478 | sctp_assoc_t ssp_assoc_id; | 482 | sctp_assoc_t ssp_assoc_id; |
479 | struct sockaddr_storage ssp_addr; | 483 | struct sockaddr_storage ssp_addr; |
480 | }; | 484 | } __attribute__((packed, aligned(4))); |
481 | 485 | ||
482 | /* | 486 | /* |
483 | * 7.1.11 Set Adaption Layer Indicator (SCTP_ADAPTION_LAYER) | 487 | * 7.1.11 Set Adaption Layer Indicator (SCTP_ADAPTION_LAYER) |
@@ -504,7 +508,7 @@ struct sctp_paddrparams { | |||
504 | struct sockaddr_storage spp_address; | 508 | struct sockaddr_storage spp_address; |
505 | __u32 spp_hbinterval; | 509 | __u32 spp_hbinterval; |
506 | __u16 spp_pathmaxrxt; | 510 | __u16 spp_pathmaxrxt; |
507 | }; | 511 | } __attribute__((packed, aligned(4))); |
508 | 512 | ||
509 | /* | 513 | /* |
510 | * 7.2.2 Peer Address Information | 514 | * 7.2.2 Peer Address Information |
@@ -523,7 +527,7 @@ struct sctp_paddrinfo { | |||
523 | __u32 spinfo_srtt; | 527 | __u32 spinfo_srtt; |
524 | __u32 spinfo_rto; | 528 | __u32 spinfo_rto; |
525 | __u32 spinfo_mtu; | 529 | __u32 spinfo_mtu; |
526 | }; | 530 | } __attribute__((packed, aligned(4))); |
527 | 531 | ||
528 | /* Peer addresses's state. */ | 532 | /* Peer addresses's state. */ |
529 | enum sctp_spinfo_state { | 533 | enum sctp_spinfo_state { |
@@ -559,11 +563,16 @@ struct sctp_status { | |||
559 | * SCTP_GET_LOCAL_ADDRS socket options used internally to implement | 563 | * SCTP_GET_LOCAL_ADDRS socket options used internally to implement |
560 | * sctp_getpaddrs() and sctp_getladdrs() API. | 564 | * sctp_getpaddrs() and sctp_getladdrs() API. |
561 | */ | 565 | */ |
562 | struct sctp_getaddrs { | 566 | struct sctp_getaddrs_old { |
563 | sctp_assoc_t assoc_id; | 567 | sctp_assoc_t assoc_id; |
564 | int addr_num; | 568 | int addr_num; |
565 | struct sockaddr __user *addrs; | 569 | struct sockaddr __user *addrs; |
566 | }; | 570 | }; |
571 | struct sctp_getaddrs { | ||
572 | sctp_assoc_t assoc_id; /*input*/ | ||
573 | __u32 addr_num; /*output*/ | ||
574 | __u8 addrs[0]; /*output, variable size*/ | ||
575 | }; | ||
567 | 576 | ||
568 | /* These are bit fields for msghdr->msg_flags. See section 5.1. */ | 577 | /* These are bit fields for msghdr->msg_flags. See section 5.1. */ |
569 | /* On user space Linux, these live in <bits/socket.h> as an enum. */ | 578 | /* On user space Linux, these live in <bits/socket.h> as an enum. */ |
diff --git a/include/net/sock.h b/include/net/sock.h index b6440805c420..ecb75526cba0 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -739,18 +739,18 @@ extern void FASTCALL(release_sock(struct sock *sk)); | |||
739 | #define bh_unlock_sock(__sk) spin_unlock(&((__sk)->sk_lock.slock)) | 739 | #define bh_unlock_sock(__sk) spin_unlock(&((__sk)->sk_lock.slock)) |
740 | 740 | ||
741 | extern struct sock *sk_alloc(int family, | 741 | extern struct sock *sk_alloc(int family, |
742 | unsigned int __nocast priority, | 742 | gfp_t priority, |
743 | struct proto *prot, int zero_it); | 743 | struct proto *prot, int zero_it); |
744 | extern void sk_free(struct sock *sk); | 744 | extern void sk_free(struct sock *sk); |
745 | extern struct sock *sk_clone(const struct sock *sk, | 745 | extern struct sock *sk_clone(const struct sock *sk, |
746 | const unsigned int __nocast priority); | 746 | const gfp_t priority); |
747 | 747 | ||
748 | extern struct sk_buff *sock_wmalloc(struct sock *sk, | 748 | extern struct sk_buff *sock_wmalloc(struct sock *sk, |
749 | unsigned long size, int force, | 749 | unsigned long size, int force, |
750 | unsigned int __nocast priority); | 750 | gfp_t priority); |
751 | extern struct sk_buff *sock_rmalloc(struct sock *sk, | 751 | extern struct sk_buff *sock_rmalloc(struct sock *sk, |
752 | unsigned long size, int force, | 752 | unsigned long size, int force, |
753 | unsigned int __nocast priority); | 753 | gfp_t priority); |
754 | extern void sock_wfree(struct sk_buff *skb); | 754 | extern void sock_wfree(struct sk_buff *skb); |
755 | extern void sock_rfree(struct sk_buff *skb); | 755 | extern void sock_rfree(struct sk_buff *skb); |
756 | 756 | ||
@@ -766,7 +766,7 @@ extern struct sk_buff *sock_alloc_send_skb(struct sock *sk, | |||
766 | int noblock, | 766 | int noblock, |
767 | int *errcode); | 767 | int *errcode); |
768 | extern void *sock_kmalloc(struct sock *sk, int size, | 768 | extern void *sock_kmalloc(struct sock *sk, int size, |
769 | unsigned int __nocast priority); | 769 | gfp_t priority); |
770 | extern void sock_kfree_s(struct sock *sk, void *mem, int size); | 770 | extern void sock_kfree_s(struct sock *sk, void *mem, int size); |
771 | extern void sk_send_sigurg(struct sock *sk); | 771 | extern void sk_send_sigurg(struct sock *sk); |
772 | 772 | ||
@@ -1201,7 +1201,7 @@ static inline void sk_stream_moderate_sndbuf(struct sock *sk) | |||
1201 | 1201 | ||
1202 | static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, | 1202 | static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, |
1203 | int size, int mem, | 1203 | int size, int mem, |
1204 | unsigned int __nocast gfp) | 1204 | gfp_t gfp) |
1205 | { | 1205 | { |
1206 | struct sk_buff *skb; | 1206 | struct sk_buff *skb; |
1207 | int hdr_len; | 1207 | int hdr_len; |
@@ -1224,7 +1224,7 @@ static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, | |||
1224 | 1224 | ||
1225 | static inline struct sk_buff *sk_stream_alloc_skb(struct sock *sk, | 1225 | static inline struct sk_buff *sk_stream_alloc_skb(struct sock *sk, |
1226 | int size, | 1226 | int size, |
1227 | unsigned int __nocast gfp) | 1227 | gfp_t gfp) |
1228 | { | 1228 | { |
1229 | return sk_stream_alloc_pskb(sk, size, 0, gfp); | 1229 | return sk_stream_alloc_pskb(sk, size, 0, gfp); |
1230 | } | 1230 | } |
@@ -1255,7 +1255,7 @@ static inline int sock_writeable(const struct sock *sk) | |||
1255 | return atomic_read(&sk->sk_wmem_alloc) < (sk->sk_sndbuf / 2); | 1255 | return atomic_read(&sk->sk_wmem_alloc) < (sk->sk_sndbuf / 2); |
1256 | } | 1256 | } |
1257 | 1257 | ||
1258 | static inline unsigned int __nocast gfp_any(void) | 1258 | static inline gfp_t gfp_any(void) |
1259 | { | 1259 | { |
1260 | return in_softirq() ? GFP_ATOMIC : GFP_KERNEL; | 1260 | return in_softirq() ? GFP_ATOMIC : GFP_KERNEL; |
1261 | } | 1261 | } |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 97af77c4d096..c24339c4e310 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -460,8 +460,7 @@ extern void tcp_send_probe0(struct sock *); | |||
460 | extern void tcp_send_partial(struct sock *); | 460 | extern void tcp_send_partial(struct sock *); |
461 | extern int tcp_write_wakeup(struct sock *); | 461 | extern int tcp_write_wakeup(struct sock *); |
462 | extern void tcp_send_fin(struct sock *sk); | 462 | extern void tcp_send_fin(struct sock *sk); |
463 | extern void tcp_send_active_reset(struct sock *sk, | 463 | extern void tcp_send_active_reset(struct sock *sk, gfp_t priority); |
464 | unsigned int __nocast priority); | ||
465 | extern int tcp_send_synack(struct sock *); | 464 | extern int tcp_send_synack(struct sock *); |
466 | extern void tcp_push_one(struct sock *, unsigned int mss_now); | 465 | extern void tcp_push_one(struct sock *, unsigned int mss_now); |
467 | extern void tcp_send_ack(struct sock *sk); | 466 | extern void tcp_send_ack(struct sock *sk); |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index a9d0d8c5dfbf..5beae1ccd574 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -875,7 +875,7 @@ static inline int xfrm_dst_lookup(struct xfrm_dst **dst, struct flowi *fl, unsig | |||
875 | } | 875 | } |
876 | #endif | 876 | #endif |
877 | 877 | ||
878 | struct xfrm_policy *xfrm_policy_alloc(int gfp); | 878 | struct xfrm_policy *xfrm_policy_alloc(gfp_t gfp); |
879 | extern int xfrm_policy_walk(int (*func)(struct xfrm_policy *, int, int, void*), void *); | 879 | extern int xfrm_policy_walk(int (*func)(struct xfrm_policy *, int, int, void*), void *); |
880 | int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl); | 880 | int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl); |
881 | struct xfrm_policy *xfrm_policy_bysel(int dir, struct xfrm_selector *sel, | 881 | struct xfrm_policy *xfrm_policy_bysel(int dir, struct xfrm_selector *sel, |
@@ -931,4 +931,9 @@ static inline int xfrm_addr_cmp(xfrm_address_t *a, xfrm_address_t *b, | |||
931 | } | 931 | } |
932 | } | 932 | } |
933 | 933 | ||
934 | static inline int xfrm_policy_id2dir(u32 index) | ||
935 | { | ||
936 | return index & 7; | ||
937 | } | ||
938 | |||
934 | #endif /* _NET_XFRM_H */ | 939 | #endif /* _NET_XFRM_H */ |