diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-06 17:16:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-06 17:16:19 -0400 |
commit | 9aec247d3b213f3c29cfba921cf11deb1ed513cd (patch) | |
tree | 6ce8272654896b4d0e05b1c82b8d7d3292284676 | |
parent | dce32c781b1c026863a254fe8123dd78c59ad984 (diff) | |
parent | 3a867b36c3234673e61f883ebc11ad18f80a176f (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
32 files changed, 77 insertions, 57 deletions
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c index 2bf723a7b6e6..6f1a83c9d9e0 100644 --- a/drivers/atm/fore200e.c +++ b/drivers/atm/fore200e.c | |||
@@ -178,14 +178,12 @@ fore200e_irq_itoa(int irq) | |||
178 | 178 | ||
179 | 179 | ||
180 | static void* | 180 | static void* |
181 | fore200e_kmalloc(int size, int flags) | 181 | fore200e_kmalloc(int size, unsigned int __nocast flags) |
182 | { | 182 | { |
183 | void* chunk = kmalloc(size, flags); | 183 | void *chunk = kzalloc(size, flags); |
184 | 184 | ||
185 | if (chunk) | 185 | if (!chunk) |
186 | memset(chunk, 0x00, size); | 186 | printk(FORE200E "kmalloc() failed, requested size = %d, flags = 0x%x\n", size, flags); |
187 | else | ||
188 | printk(FORE200E "kmalloc() failed, requested size = %d, flags = 0x%x\n", size, flags); | ||
189 | 187 | ||
190 | return chunk; | 188 | return chunk; |
191 | } | 189 | } |
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c index bb0b3a8de14b..1422285d537c 100644 --- a/drivers/connector/connector.c +++ b/drivers/connector/connector.c | |||
@@ -69,7 +69,8 @@ int cn_already_initialized = 0; | |||
69 | * a new message. | 69 | * a new message. |
70 | * | 70 | * |
71 | */ | 71 | */ |
72 | int cn_netlink_send(struct cn_msg *msg, u32 __group, int gfp_mask) | 72 | int cn_netlink_send(struct cn_msg *msg, u32 __group, |
73 | unsigned int __nocast gfp_mask) | ||
73 | { | 74 | { |
74 | struct cn_callback_entry *__cbq; | 75 | struct cn_callback_entry *__cbq; |
75 | unsigned int size; | 76 | unsigned int size; |
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index fd62e43a3510..f0a5b772a386 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -1289,12 +1289,13 @@ static void bond_mc_list_destroy(struct bonding *bond) | |||
1289 | /* | 1289 | /* |
1290 | * Copy all the Multicast addresses from src to the bonding device dst | 1290 | * Copy all the Multicast addresses from src to the bonding device dst |
1291 | */ | 1291 | */ |
1292 | static int bond_mc_list_copy(struct dev_mc_list *mc_list, struct bonding *bond, int gpf_flag) | 1292 | static int bond_mc_list_copy(struct dev_mc_list *mc_list, struct bonding *bond, |
1293 | unsigned int __nocast gfp_flag) | ||
1293 | { | 1294 | { |
1294 | struct dev_mc_list *dmi, *new_dmi; | 1295 | struct dev_mc_list *dmi, *new_dmi; |
1295 | 1296 | ||
1296 | for (dmi = mc_list; dmi; dmi = dmi->next) { | 1297 | for (dmi = mc_list; dmi; dmi = dmi->next) { |
1297 | new_dmi = kmalloc(sizeof(struct dev_mc_list), gpf_flag); | 1298 | new_dmi = kmalloc(sizeof(struct dev_mc_list), gfp_flag); |
1298 | 1299 | ||
1299 | if (!new_dmi) { | 1300 | if (!new_dmi) { |
1300 | /* FIXME: Potential memory leak !!! */ | 1301 | /* FIXME: Potential memory leak !!! */ |
diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h index 9f374cfa1b05..f1fd849e5535 100644 --- a/include/linux/atmdev.h +++ b/include/linux/atmdev.h | |||
@@ -457,7 +457,7 @@ static inline void atm_dev_put(struct atm_dev *dev) | |||
457 | 457 | ||
458 | int atm_charge(struct atm_vcc *vcc,int truesize); | 458 | int atm_charge(struct atm_vcc *vcc,int truesize); |
459 | struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size, | 459 | struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size, |
460 | int gfp_flags); | 460 | unsigned int __nocast gfp_flags); |
461 | int atm_pcr_goal(struct atm_trafprm *tp); | 461 | int atm_pcr_goal(struct atm_trafprm *tp); |
462 | 462 | ||
463 | void vcc_release_async(struct atm_vcc *vcc, int reply); | 463 | void vcc_release_async(struct atm_vcc *vcc, int reply); |
diff --git a/include/linux/connector.h b/include/linux/connector.h index 86d4b0a81713..96582c9911ac 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h | |||
@@ -149,7 +149,7 @@ struct cn_dev { | |||
149 | 149 | ||
150 | int cn_add_callback(struct cb_id *, char *, void (*callback) (void *)); | 150 | int cn_add_callback(struct cb_id *, char *, void (*callback) (void *)); |
151 | void cn_del_callback(struct cb_id *); | 151 | void cn_del_callback(struct cb_id *); |
152 | int cn_netlink_send(struct cn_msg *, u32, int); | 152 | int cn_netlink_send(struct cn_msg *, u32, unsigned int __nocast); |
153 | 153 | ||
154 | int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(void *)); | 154 | int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(void *)); |
155 | void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); | 155 | void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); |
diff --git a/include/linux/textsearch.h b/include/linux/textsearch.h index 941f45ac117a..1a4990e448e9 100644 --- a/include/linux/textsearch.h +++ b/include/linux/textsearch.h | |||
@@ -158,7 +158,8 @@ extern unsigned int textsearch_find_continuous(struct ts_config *, | |||
158 | #define TS_PRIV_ALIGNTO 8 | 158 | #define TS_PRIV_ALIGNTO 8 |
159 | #define TS_PRIV_ALIGN(len) (((len) + TS_PRIV_ALIGNTO-1) & ~(TS_PRIV_ALIGNTO-1)) | 159 | #define TS_PRIV_ALIGN(len) (((len) + TS_PRIV_ALIGNTO-1) & ~(TS_PRIV_ALIGNTO-1)) |
160 | 160 | ||
161 | static inline struct ts_config *alloc_ts_config(size_t payload, int gfp_mask) | 161 | static inline struct ts_config *alloc_ts_config(size_t payload, |
162 | unsigned int __nocast gfp_mask) | ||
162 | { | 163 | { |
163 | struct ts_config *conf; | 164 | struct ts_config *conf; |
164 | 165 | ||
diff --git a/include/net/dn_nsp.h b/include/net/dn_nsp.h index 6bbeafa73e8b..8a0891e2e888 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, unsigned int __nocast 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, unsigned int __nocast 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, unsigned int __nocast 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, unsigned int __nocast 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..11fe973cf383 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, unsigned int __nocast 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_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/ip_vs.h b/include/net/ip_vs.h index 06b4235aa016..ecb2b061f597 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, unsigned int __nocast 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/xfrm.h b/include/net/xfrm.h index a9d0d8c5dfbf..b6e72f890c6c 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(unsigned int __nocast 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 */ |
diff --git a/include/rxrpc/call.h b/include/rxrpc/call.h index f48f27e9e0ab..8118731e7d96 100644 --- a/include/rxrpc/call.h +++ b/include/rxrpc/call.h | |||
@@ -203,7 +203,7 @@ extern int rxrpc_call_write_data(struct rxrpc_call *call, | |||
203 | size_t sioc, | 203 | size_t sioc, |
204 | struct kvec *siov, | 204 | struct kvec *siov, |
205 | uint8_t rxhdr_flags, | 205 | uint8_t rxhdr_flags, |
206 | int alloc_flags, | 206 | unsigned int __nocast alloc_flags, |
207 | int dup_data, | 207 | int dup_data, |
208 | size_t *size_sent); | 208 | size_t *size_sent); |
209 | 209 | ||
diff --git a/include/rxrpc/message.h b/include/rxrpc/message.h index 3a59df6870b2..983d9f9eee1a 100644 --- a/include/rxrpc/message.h +++ b/include/rxrpc/message.h | |||
@@ -63,7 +63,7 @@ extern int rxrpc_conn_newmsg(struct rxrpc_connection *conn, | |||
63 | uint8_t type, | 63 | uint8_t type, |
64 | int count, | 64 | int count, |
65 | struct kvec *diov, | 65 | struct kvec *diov, |
66 | int alloc_flags, | 66 | unsigned int __nocast alloc_flags, |
67 | struct rxrpc_message **_msg); | 67 | struct rxrpc_message **_msg); |
68 | 68 | ||
69 | extern int rxrpc_conn_sendmsg(struct rxrpc_connection *conn, struct rxrpc_message *msg); | 69 | extern int rxrpc_conn_sendmsg(struct rxrpc_connection *conn, struct rxrpc_message *msg); |
diff --git a/lib/ts_bm.c b/lib/ts_bm.c index 2cc79112ecc3..1b61fceef777 100644 --- a/lib/ts_bm.c +++ b/lib/ts_bm.c | |||
@@ -127,7 +127,7 @@ static void compute_prefix_tbl(struct ts_bm *bm, const u8 *pattern, | |||
127 | } | 127 | } |
128 | 128 | ||
129 | static struct ts_config *bm_init(const void *pattern, unsigned int len, | 129 | static struct ts_config *bm_init(const void *pattern, unsigned int len, |
130 | int gfp_mask) | 130 | unsigned int __nocast gfp_mask) |
131 | { | 131 | { |
132 | struct ts_config *conf; | 132 | struct ts_config *conf; |
133 | struct ts_bm *bm; | 133 | struct ts_bm *bm; |
diff --git a/lib/ts_fsm.c b/lib/ts_fsm.c index d27c0a072940..ef9779e00506 100644 --- a/lib/ts_fsm.c +++ b/lib/ts_fsm.c | |||
@@ -258,7 +258,7 @@ found_match: | |||
258 | } | 258 | } |
259 | 259 | ||
260 | static struct ts_config *fsm_init(const void *pattern, unsigned int len, | 260 | static struct ts_config *fsm_init(const void *pattern, unsigned int len, |
261 | int gfp_mask) | 261 | unsigned int __nocast gfp_mask) |
262 | { | 262 | { |
263 | int i, err = -EINVAL; | 263 | int i, err = -EINVAL; |
264 | struct ts_config *conf; | 264 | struct ts_config *conf; |
diff --git a/lib/ts_kmp.c b/lib/ts_kmp.c index 73266b975585..e45f0f0c2379 100644 --- a/lib/ts_kmp.c +++ b/lib/ts_kmp.c | |||
@@ -87,7 +87,7 @@ static inline void compute_prefix_tbl(const u8 *pattern, unsigned int len, | |||
87 | } | 87 | } |
88 | 88 | ||
89 | static struct ts_config *kmp_init(const void *pattern, unsigned int len, | 89 | static struct ts_config *kmp_init(const void *pattern, unsigned int len, |
90 | int gfp_mask) | 90 | unsigned int __nocast gfp_mask) |
91 | { | 91 | { |
92 | struct ts_config *conf; | 92 | struct ts_config *conf; |
93 | struct ts_kmp *kmp; | 93 | struct ts_kmp *kmp; |
diff --git a/net/atm/atm_misc.c b/net/atm/atm_misc.c index b2113c3454ae..71abc99ec815 100644 --- a/net/atm/atm_misc.c +++ b/net/atm/atm_misc.c | |||
@@ -25,7 +25,7 @@ int atm_charge(struct atm_vcc *vcc,int truesize) | |||
25 | 25 | ||
26 | 26 | ||
27 | struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size, | 27 | struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size, |
28 | int gfp_flags) | 28 | unsigned int __nocast gfp_flags) |
29 | { | 29 | { |
30 | struct sock *sk = sk_atm(vcc); | 30 | struct sock *sk = sk_atm(vcc); |
31 | int guess = atm_guess_pdu2truesize(pdu_size); | 31 | int guess = atm_guess_pdu2truesize(pdu_size); |
diff --git a/net/ax25/ax25_in.c b/net/ax25/ax25_in.c index 810c9c76c2e0..73cfc3411c46 100644 --- a/net/ax25/ax25_in.c +++ b/net/ax25/ax25_in.c | |||
@@ -123,7 +123,7 @@ int ax25_rx_iframe(ax25_cb *ax25, struct sk_buff *skb) | |||
123 | } | 123 | } |
124 | 124 | ||
125 | skb_pull(skb, 1); /* Remove PID */ | 125 | skb_pull(skb, 1); /* Remove PID */ |
126 | skb->h.raw = skb->data; | 126 | skb->mac.raw = skb->nh.raw; |
127 | skb->nh.raw = skb->data; | 127 | skb->nh.raw = skb->data; |
128 | skb->dev = ax25->ax25_dev->dev; | 128 | skb->dev = ax25->ax25_dev->dev; |
129 | skb->pkt_type = PACKET_HOST; | 129 | skb->pkt_type = PACKET_HOST; |
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c index 348f36b529f7..34d4128d56d5 100644 --- a/net/decnet/af_decnet.c +++ b/net/decnet/af_decnet.c | |||
@@ -452,7 +452,8 @@ static struct proto dn_proto = { | |||
452 | .obj_size = sizeof(struct dn_sock), | 452 | .obj_size = sizeof(struct dn_sock), |
453 | }; | 453 | }; |
454 | 454 | ||
455 | static struct sock *dn_alloc_sock(struct socket *sock, int gfp) | 455 | static struct sock *dn_alloc_sock(struct socket *sock, |
456 | unsigned int __nocast gfp) | ||
456 | { | 457 | { |
457 | struct dn_scp *scp; | 458 | struct dn_scp *scp; |
458 | struct sock *sk = sk_alloc(PF_DECnet, gfp, &dn_proto, 1); | 459 | struct sock *sk = sk_alloc(PF_DECnet, gfp, &dn_proto, 1); |
@@ -804,7 +805,8 @@ static int dn_auto_bind(struct socket *sock) | |||
804 | return rv; | 805 | return rv; |
805 | } | 806 | } |
806 | 807 | ||
807 | static int dn_confirm_accept(struct sock *sk, long *timeo, int allocation) | 808 | static int dn_confirm_accept(struct sock *sk, long *timeo, |
809 | unsigned int __nocast allocation) | ||
808 | { | 810 | { |
809 | struct dn_scp *scp = DN_SK(sk); | 811 | struct dn_scp *scp = DN_SK(sk); |
810 | DEFINE_WAIT(wait); | 812 | DEFINE_WAIT(wait); |
diff --git a/net/decnet/dn_nsp_out.c b/net/decnet/dn_nsp_out.c index 53633d352868..cd08244aa10c 100644 --- a/net/decnet/dn_nsp_out.c +++ b/net/decnet/dn_nsp_out.c | |||
@@ -117,7 +117,8 @@ try_again: | |||
117 | * The eventual aim is for each socket to have a cached header size | 117 | * The eventual aim is for each socket to have a cached header size |
118 | * for its outgoing packets, and to set hdr from this when sk != NULL. | 118 | * for its outgoing packets, and to set hdr from this when sk != NULL. |
119 | */ | 119 | */ |
120 | struct sk_buff *dn_alloc_skb(struct sock *sk, int size, int pri) | 120 | struct sk_buff *dn_alloc_skb(struct sock *sk, int size, |
121 | unsigned int __nocast pri) | ||
121 | { | 122 | { |
122 | struct sk_buff *skb; | 123 | struct sk_buff *skb; |
123 | int hdr = 64; | 124 | int hdr = 64; |
@@ -210,7 +211,8 @@ static void dn_nsp_rtt(struct sock *sk, long rtt) | |||
210 | * | 211 | * |
211 | * Returns: The number of times the packet has been sent previously | 212 | * Returns: The number of times the packet has been sent previously |
212 | */ | 213 | */ |
213 | static inline unsigned dn_nsp_clone_and_send(struct sk_buff *skb, int gfp) | 214 | static inline unsigned dn_nsp_clone_and_send(struct sk_buff *skb, |
215 | unsigned int __nocast gfp) | ||
214 | { | 216 | { |
215 | struct dn_skb_cb *cb = DN_SKB_CB(skb); | 217 | struct dn_skb_cb *cb = DN_SKB_CB(skb); |
216 | struct sk_buff *skb2; | 218 | struct sk_buff *skb2; |
@@ -350,7 +352,8 @@ static unsigned short *dn_nsp_mk_data_header(struct sock *sk, struct sk_buff *sk | |||
350 | return ptr; | 352 | return ptr; |
351 | } | 353 | } |
352 | 354 | ||
353 | void dn_nsp_queue_xmit(struct sock *sk, struct sk_buff *skb, int gfp, int oth) | 355 | void dn_nsp_queue_xmit(struct sock *sk, struct sk_buff *skb, |
356 | unsigned int __nocast gfp, int oth) | ||
354 | { | 357 | { |
355 | struct dn_scp *scp = DN_SK(sk); | 358 | struct dn_scp *scp = DN_SK(sk); |
356 | struct dn_skb_cb *cb = DN_SKB_CB(skb); | 359 | struct dn_skb_cb *cb = DN_SKB_CB(skb); |
@@ -517,7 +520,7 @@ static int dn_nsp_retrans_conn_conf(struct sock *sk) | |||
517 | return 0; | 520 | return 0; |
518 | } | 521 | } |
519 | 522 | ||
520 | void dn_send_conn_conf(struct sock *sk, int gfp) | 523 | void dn_send_conn_conf(struct sock *sk, unsigned int __nocast gfp) |
521 | { | 524 | { |
522 | struct dn_scp *scp = DN_SK(sk); | 525 | struct dn_scp *scp = DN_SK(sk); |
523 | struct sk_buff *skb = NULL; | 526 | struct sk_buff *skb = NULL; |
@@ -549,7 +552,8 @@ void dn_send_conn_conf(struct sock *sk, int gfp) | |||
549 | 552 | ||
550 | 553 | ||
551 | static __inline__ void dn_nsp_do_disc(struct sock *sk, unsigned char msgflg, | 554 | static __inline__ void dn_nsp_do_disc(struct sock *sk, unsigned char msgflg, |
552 | unsigned short reason, int gfp, struct dst_entry *dst, | 555 | unsigned short reason, unsigned int __nocast gfp, |
556 | struct dst_entry *dst, | ||
553 | int ddl, unsigned char *dd, __u16 rem, __u16 loc) | 557 | int ddl, unsigned char *dd, __u16 rem, __u16 loc) |
554 | { | 558 | { |
555 | struct sk_buff *skb = NULL; | 559 | struct sk_buff *skb = NULL; |
@@ -591,7 +595,7 @@ static __inline__ void dn_nsp_do_disc(struct sock *sk, unsigned char msgflg, | |||
591 | 595 | ||
592 | 596 | ||
593 | void dn_nsp_send_disc(struct sock *sk, unsigned char msgflg, | 597 | void dn_nsp_send_disc(struct sock *sk, unsigned char msgflg, |
594 | unsigned short reason, int gfp) | 598 | unsigned short reason, unsigned int __nocast gfp) |
595 | { | 599 | { |
596 | struct dn_scp *scp = DN_SK(sk); | 600 | struct dn_scp *scp = DN_SK(sk); |
597 | int ddl = 0; | 601 | int ddl = 0; |
@@ -612,7 +616,7 @@ void dn_nsp_return_disc(struct sk_buff *skb, unsigned char msgflg, | |||
612 | { | 616 | { |
613 | struct dn_skb_cb *cb = DN_SKB_CB(skb); | 617 | struct dn_skb_cb *cb = DN_SKB_CB(skb); |
614 | int ddl = 0; | 618 | int ddl = 0; |
615 | int gfp = GFP_ATOMIC; | 619 | unsigned int __nocast gfp = GFP_ATOMIC; |
616 | 620 | ||
617 | dn_nsp_do_disc(NULL, msgflg, reason, gfp, skb->dst, ddl, | 621 | dn_nsp_do_disc(NULL, msgflg, reason, gfp, skb->dst, ddl, |
618 | NULL, cb->src_port, cb->dst_port); | 622 | NULL, cb->src_port, cb->dst_port); |
@@ -624,7 +628,7 @@ void dn_nsp_send_link(struct sock *sk, unsigned char lsflags, char fcval) | |||
624 | struct dn_scp *scp = DN_SK(sk); | 628 | struct dn_scp *scp = DN_SK(sk); |
625 | struct sk_buff *skb; | 629 | struct sk_buff *skb; |
626 | unsigned char *ptr; | 630 | unsigned char *ptr; |
627 | int gfp = GFP_ATOMIC; | 631 | unsigned int __nocast gfp = GFP_ATOMIC; |
628 | 632 | ||
629 | if ((skb = dn_alloc_skb(sk, DN_MAX_NSP_DATA_HEADER + 2, gfp)) == NULL) | 633 | if ((skb = dn_alloc_skb(sk, DN_MAX_NSP_DATA_HEADER + 2, gfp)) == NULL) |
630 | return; | 634 | return; |
@@ -659,7 +663,8 @@ void dn_nsp_send_conninit(struct sock *sk, unsigned char msgflg) | |||
659 | unsigned char menuver; | 663 | unsigned char menuver; |
660 | struct dn_skb_cb *cb; | 664 | struct dn_skb_cb *cb; |
661 | unsigned char type = 1; | 665 | unsigned char type = 1; |
662 | int allocation = (msgflg == NSP_CI) ? sk->sk_allocation : GFP_ATOMIC; | 666 | unsigned int __nocast allocation = |
667 | (msgflg == NSP_CI) ? sk->sk_allocation : GFP_ATOMIC; | ||
663 | struct sk_buff *skb = dn_alloc_skb(sk, 200, allocation); | 668 | struct sk_buff *skb = dn_alloc_skb(sk, 200, allocation); |
664 | 669 | ||
665 | if (!skb) | 670 | if (!skb) |
diff --git a/net/ipv4/ipvs/ip_vs_app.c b/net/ipv4/ipvs/ip_vs_app.c index 6e092dadb388..b942ff3c8860 100644 --- a/net/ipv4/ipvs/ip_vs_app.c +++ b/net/ipv4/ipvs/ip_vs_app.c | |||
@@ -604,7 +604,7 @@ static struct file_operations ip_vs_app_fops = { | |||
604 | /* | 604 | /* |
605 | * Replace a segment of data with a new segment | 605 | * Replace a segment of data with a new segment |
606 | */ | 606 | */ |
607 | int ip_vs_skb_replace(struct sk_buff *skb, int pri, | 607 | int ip_vs_skb_replace(struct sk_buff *skb, unsigned int __nocast pri, |
608 | char *o_buf, int o_len, char *n_buf, int n_len) | 608 | char *o_buf, int o_len, char *n_buf, int n_len) |
609 | { | 609 | { |
610 | struct iphdr *iph; | 610 | struct iphdr *iph; |
diff --git a/net/ipv4/netfilter/Kconfig b/net/ipv4/netfilter/Kconfig index 2cd7e7d1ac90..a7659728e7a0 100644 --- a/net/ipv4/netfilter/Kconfig +++ b/net/ipv4/netfilter/Kconfig | |||
@@ -141,7 +141,7 @@ config IP_NF_PPTP | |||
141 | tristate 'PPTP protocol support' | 141 | tristate 'PPTP protocol support' |
142 | help | 142 | help |
143 | This module adds support for PPTP (Point to Point Tunnelling | 143 | This module adds support for PPTP (Point to Point Tunnelling |
144 | Protocol, RFC2637) conncection tracking and NAT. | 144 | Protocol, RFC2637) connection tracking and NAT. |
145 | 145 | ||
146 | If you are running PPTP sessions over a stateful firewall or NAT | 146 | If you are running PPTP sessions over a stateful firewall or NAT |
147 | box, you may want to enable this feature. | 147 | box, you may want to enable this feature. |
diff --git a/net/ipv4/tcp_bic.c b/net/ipv4/tcp_bic.c index b940346de4e7..6d80e063c187 100644 --- a/net/ipv4/tcp_bic.c +++ b/net/ipv4/tcp_bic.c | |||
@@ -136,7 +136,7 @@ static inline void bictcp_update(struct bictcp *ca, u32 cwnd) | |||
136 | else if (cwnd < ca->last_max_cwnd + max_increment*(BICTCP_B-1)) | 136 | else if (cwnd < ca->last_max_cwnd + max_increment*(BICTCP_B-1)) |
137 | /* slow start */ | 137 | /* slow start */ |
138 | ca->cnt = (cwnd * (BICTCP_B-1)) | 138 | ca->cnt = (cwnd * (BICTCP_B-1)) |
139 | / cwnd-ca->last_max_cwnd; | 139 | / (cwnd - ca->last_max_cwnd); |
140 | else | 140 | else |
141 | /* linear increase */ | 141 | /* linear increase */ |
142 | ca->cnt = cwnd / max_increment; | 142 | ca->cnt = cwnd / max_increment; |
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index 519899fb11d5..39a96c768102 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c | |||
@@ -1393,7 +1393,7 @@ static void mld_sendpack(struct sk_buff *skb) | |||
1393 | 1393 | ||
1394 | static int grec_size(struct ifmcaddr6 *pmc, int type, int gdel, int sdel) | 1394 | static int grec_size(struct ifmcaddr6 *pmc, int type, int gdel, int sdel) |
1395 | { | 1395 | { |
1396 | return sizeof(struct mld2_grec) + 4*mld_scount(pmc,type,gdel,sdel); | 1396 | return sizeof(struct mld2_grec) + 16 * mld_scount(pmc,type,gdel,sdel); |
1397 | } | 1397 | } |
1398 | 1398 | ||
1399 | static struct sk_buff *add_grhead(struct sk_buff *skb, struct ifmcaddr6 *pmc, | 1399 | static struct sk_buff *add_grhead(struct sk_buff *skb, struct ifmcaddr6 *pmc, |
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 555a31347eda..305d9ee6d7db 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -1450,7 +1450,7 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh, | |||
1450 | 1450 | ||
1451 | static void pndisc_redo(struct sk_buff *skb) | 1451 | static void pndisc_redo(struct sk_buff *skb) |
1452 | { | 1452 | { |
1453 | ndisc_rcv(skb); | 1453 | ndisc_recv_ns(skb); |
1454 | kfree_skb(skb); | 1454 | kfree_skb(skb); |
1455 | } | 1455 | } |
1456 | 1456 | ||
diff --git a/net/key/af_key.c b/net/key/af_key.c index 4879743b945a..bbf0f69181ba 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c | |||
@@ -185,7 +185,7 @@ static int pfkey_release(struct socket *sock) | |||
185 | } | 185 | } |
186 | 186 | ||
187 | static int pfkey_broadcast_one(struct sk_buff *skb, struct sk_buff **skb2, | 187 | static int pfkey_broadcast_one(struct sk_buff *skb, struct sk_buff **skb2, |
188 | int allocation, struct sock *sk) | 188 | unsigned int __nocast allocation, struct sock *sk) |
189 | { | 189 | { |
190 | int err = -ENOBUFS; | 190 | int err = -ENOBUFS; |
191 | 191 | ||
@@ -217,7 +217,7 @@ static int pfkey_broadcast_one(struct sk_buff *skb, struct sk_buff **skb2, | |||
217 | #define BROADCAST_ONE 1 | 217 | #define BROADCAST_ONE 1 |
218 | #define BROADCAST_REGISTERED 2 | 218 | #define BROADCAST_REGISTERED 2 |
219 | #define BROADCAST_PROMISC_ONLY 4 | 219 | #define BROADCAST_PROMISC_ONLY 4 |
220 | static int pfkey_broadcast(struct sk_buff *skb, int allocation, | 220 | static int pfkey_broadcast(struct sk_buff *skb, unsigned int __nocast allocation, |
221 | int broadcast_flags, struct sock *one_sk) | 221 | int broadcast_flags, struct sock *one_sk) |
222 | { | 222 | { |
223 | struct sock *sk; | 223 | struct sock *sk; |
@@ -1416,7 +1416,8 @@ static int pfkey_get(struct sock *sk, struct sk_buff *skb, struct sadb_msg *hdr, | |||
1416 | return 0; | 1416 | return 0; |
1417 | } | 1417 | } |
1418 | 1418 | ||
1419 | static struct sk_buff *compose_sadb_supported(struct sadb_msg *orig, int allocation) | 1419 | static struct sk_buff *compose_sadb_supported(struct sadb_msg *orig, |
1420 | unsigned int __nocast allocation) | ||
1420 | { | 1421 | { |
1421 | struct sk_buff *skb; | 1422 | struct sk_buff *skb; |
1422 | struct sadb_msg *hdr; | 1423 | struct sadb_msg *hdr; |
@@ -2153,6 +2154,7 @@ out: | |||
2153 | 2154 | ||
2154 | static int pfkey_spdget(struct sock *sk, struct sk_buff *skb, struct sadb_msg *hdr, void **ext_hdrs) | 2155 | static int pfkey_spdget(struct sock *sk, struct sk_buff *skb, struct sadb_msg *hdr, void **ext_hdrs) |
2155 | { | 2156 | { |
2157 | unsigned int dir; | ||
2156 | int err; | 2158 | int err; |
2157 | struct sadb_x_policy *pol; | 2159 | struct sadb_x_policy *pol; |
2158 | struct xfrm_policy *xp; | 2160 | struct xfrm_policy *xp; |
@@ -2161,7 +2163,11 @@ static int pfkey_spdget(struct sock *sk, struct sk_buff *skb, struct sadb_msg *h | |||
2161 | if ((pol = ext_hdrs[SADB_X_EXT_POLICY-1]) == NULL) | 2163 | if ((pol = ext_hdrs[SADB_X_EXT_POLICY-1]) == NULL) |
2162 | return -EINVAL; | 2164 | return -EINVAL; |
2163 | 2165 | ||
2164 | xp = xfrm_policy_byid(0, pol->sadb_x_policy_id, | 2166 | dir = xfrm_policy_id2dir(pol->sadb_x_policy_id); |
2167 | if (dir >= XFRM_POLICY_MAX) | ||
2168 | return -EINVAL; | ||
2169 | |||
2170 | xp = xfrm_policy_byid(dir, pol->sadb_x_policy_id, | ||
2165 | hdr->sadb_msg_type == SADB_X_SPDDELETE2); | 2171 | hdr->sadb_msg_type == SADB_X_SPDDELETE2); |
2166 | if (xp == NULL) | 2172 | if (xp == NULL) |
2167 | return -ENOENT; | 2173 | return -ENOENT; |
@@ -2173,9 +2179,9 @@ static int pfkey_spdget(struct sock *sk, struct sk_buff *skb, struct sadb_msg *h | |||
2173 | if (hdr->sadb_msg_type == SADB_X_SPDDELETE2) { | 2179 | if (hdr->sadb_msg_type == SADB_X_SPDDELETE2) { |
2174 | c.data.byid = 1; | 2180 | c.data.byid = 1; |
2175 | c.event = XFRM_MSG_DELPOLICY; | 2181 | c.event = XFRM_MSG_DELPOLICY; |
2176 | km_policy_notify(xp, pol->sadb_x_policy_dir-1, &c); | 2182 | km_policy_notify(xp, dir, &c); |
2177 | } else { | 2183 | } else { |
2178 | err = key_pol_get_resp(sk, xp, hdr, pol->sadb_x_policy_dir-1); | 2184 | err = key_pol_get_resp(sk, xp, hdr, dir); |
2179 | } | 2185 | } |
2180 | 2186 | ||
2181 | xfrm_pol_put(xp); | 2187 | xfrm_pol_put(xp); |
diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c index 49a3900e3d32..34d671974a4d 100644 --- a/net/netfilter/nfnetlink.c +++ b/net/netfilter/nfnetlink.c | |||
@@ -195,7 +195,8 @@ nfnetlink_check_attributes(struct nfnetlink_subsystem *subsys, | |||
195 | 195 | ||
196 | int nfnetlink_send(struct sk_buff *skb, u32 pid, unsigned group, int echo) | 196 | int nfnetlink_send(struct sk_buff *skb, u32 pid, unsigned group, int echo) |
197 | { | 197 | { |
198 | int allocation = in_interrupt() ? GFP_ATOMIC : GFP_KERNEL; | 198 | unsigned int __nocast allocation = |
199 | in_interrupt() ? GFP_ATOMIC : GFP_KERNEL; | ||
199 | int err = 0; | 200 | int err = 0; |
200 | 201 | ||
201 | NETLINK_CB(skb).dst_group = group; | 202 | NETLINK_CB(skb).dst_group = group; |
diff --git a/net/netrom/nr_dev.c b/net/netrom/nr_dev.c index 4e66eef9a034..509afddae569 100644 --- a/net/netrom/nr_dev.c +++ b/net/netrom/nr_dev.c | |||
@@ -58,7 +58,7 @@ int nr_rx_ip(struct sk_buff *skb, struct net_device *dev) | |||
58 | 58 | ||
59 | /* Spoof incoming device */ | 59 | /* Spoof incoming device */ |
60 | skb->dev = dev; | 60 | skb->dev = dev; |
61 | skb->h.raw = skb->data; | 61 | skb->mac.raw = skb->nh.raw; |
62 | skb->nh.raw = skb->data; | 62 | skb->nh.raw = skb->data; |
63 | skb->pkt_type = PACKET_HOST; | 63 | skb->pkt_type = PACKET_HOST; |
64 | 64 | ||
diff --git a/net/rxrpc/call.c b/net/rxrpc/call.c index 5cfd4cadee42..86f777052633 100644 --- a/net/rxrpc/call.c +++ b/net/rxrpc/call.c | |||
@@ -1923,7 +1923,7 @@ int rxrpc_call_write_data(struct rxrpc_call *call, | |||
1923 | size_t sioc, | 1923 | size_t sioc, |
1924 | struct kvec *siov, | 1924 | struct kvec *siov, |
1925 | u8 rxhdr_flags, | 1925 | u8 rxhdr_flags, |
1926 | int alloc_flags, | 1926 | unsigned int __nocast alloc_flags, |
1927 | int dup_data, | 1927 | int dup_data, |
1928 | size_t *size_sent) | 1928 | size_t *size_sent) |
1929 | { | 1929 | { |
diff --git a/net/rxrpc/connection.c b/net/rxrpc/connection.c index 61463c74f8cc..be4b2be58956 100644 --- a/net/rxrpc/connection.c +++ b/net/rxrpc/connection.c | |||
@@ -522,7 +522,7 @@ int rxrpc_conn_newmsg(struct rxrpc_connection *conn, | |||
522 | uint8_t type, | 522 | uint8_t type, |
523 | int dcount, | 523 | int dcount, |
524 | struct kvec diov[], | 524 | struct kvec diov[], |
525 | int alloc_flags, | 525 | unsigned int __nocast alloc_flags, |
526 | struct rxrpc_message **_msg) | 526 | struct rxrpc_message **_msg) |
527 | { | 527 | { |
528 | struct rxrpc_message *msg; | 528 | struct rxrpc_message *msg; |
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index f3104035e35d..ade730eaf401 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
@@ -719,7 +719,7 @@ static void rpc_async_schedule(void *arg) | |||
719 | void * | 719 | void * |
720 | rpc_malloc(struct rpc_task *task, size_t size) | 720 | rpc_malloc(struct rpc_task *task, size_t size) |
721 | { | 721 | { |
722 | int gfp; | 722 | unsigned int __nocast gfp; |
723 | 723 | ||
724 | if (task->tk_flags & RPC_TASK_SWAPPER) | 724 | if (task->tk_flags & RPC_TASK_SWAPPER) |
725 | gfp = GFP_ATOMIC; | 725 | gfp = GFP_ATOMIC; |
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index fda737d77edc..061b44cc2451 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
@@ -163,7 +163,7 @@ static void xfrm_policy_timer(unsigned long data) | |||
163 | if (xp->dead) | 163 | if (xp->dead) |
164 | goto out; | 164 | goto out; |
165 | 165 | ||
166 | dir = xp->index & 7; | 166 | dir = xfrm_policy_id2dir(xp->index); |
167 | 167 | ||
168 | if (xp->lft.hard_add_expires_seconds) { | 168 | if (xp->lft.hard_add_expires_seconds) { |
169 | long tmo = xp->lft.hard_add_expires_seconds + | 169 | long tmo = xp->lft.hard_add_expires_seconds + |
@@ -225,7 +225,7 @@ expired: | |||
225 | * SPD calls. | 225 | * SPD calls. |
226 | */ | 226 | */ |
227 | 227 | ||
228 | struct xfrm_policy *xfrm_policy_alloc(int gfp) | 228 | struct xfrm_policy *xfrm_policy_alloc(unsigned int __nocast gfp) |
229 | { | 229 | { |
230 | struct xfrm_policy *policy; | 230 | struct xfrm_policy *policy; |
231 | 231 | ||
@@ -417,7 +417,7 @@ struct xfrm_policy *xfrm_policy_byid(int dir, u32 id, int delete) | |||
417 | struct xfrm_policy *pol, **p; | 417 | struct xfrm_policy *pol, **p; |
418 | 418 | ||
419 | write_lock_bh(&xfrm_policy_lock); | 419 | write_lock_bh(&xfrm_policy_lock); |
420 | for (p = &xfrm_policy_list[id & 7]; (pol=*p)!=NULL; p = &pol->next) { | 420 | for (p = &xfrm_policy_list[dir]; (pol=*p)!=NULL; p = &pol->next) { |
421 | if (pol->index == id) { | 421 | if (pol->index == id) { |
422 | xfrm_pol_hold(pol); | 422 | xfrm_pol_hold(pol); |
423 | if (delete) | 423 | if (delete) |