Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

+77 -57
+4 -6
drivers/atm/fore200e.c
··· 178 178 179 179 180 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) 186 - memset(chunk, 0x00, size); 187 - else 188 - printk(FORE200E "kmalloc() failed, requested size = %d, flags = 0x%x\n", size, flags); 185 + if (!chunk) 186 + printk(FORE200E "kmalloc() failed, requested size = %d, flags = 0x%x\n", size, flags); 189 187 190 188 return chunk; 191 189 }
+2 -1
drivers/connector/connector.c
··· 69 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 75 struct cn_callback_entry *__cbq; 75 76 unsigned int size;
+3 -2
drivers/net/bonding/bond_main.c
··· 1289 1289 /* 1290 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 1295 struct dev_mc_list *dmi, *new_dmi; 1295 1296 1296 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 1300 if (!new_dmi) { 1300 1301 /* FIXME: Potential memory leak !!! */
+1 -1
include/linux/atmdev.h
··· 457 457 458 458 int atm_charge(struct atm_vcc *vcc,int truesize); 459 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 461 int atm_pcr_goal(struct atm_trafprm *tp); 462 462 463 463 void vcc_release_async(struct atm_vcc *vcc, int reply);
+1 -1
include/linux/connector.h
··· 149 149 150 150 int cn_add_callback(struct cb_id *, char *, void (*callback) (void *)); 151 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 154 int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(void *)); 155 155 void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id);
+2 -1
include/linux/textsearch.h
··· 158 158 #define TS_PRIV_ALIGNTO 8 159 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 164 struct ts_config *conf; 164 165
+4 -4
include/net/dn_nsp.h
··· 19 19 extern void dn_nsp_send_oth_ack(struct sock *sk); 20 20 extern void dn_nsp_delayed_ack(struct sock *sk); 21 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 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 25 extern void dn_nsp_return_disc(struct sk_buff *skb, unsigned char type, 26 26 unsigned short reason); 27 27 extern void dn_nsp_send_link(struct sock *sk, unsigned char lsflags, char fcval); ··· 29 29 30 30 extern void dn_nsp_output(struct sock *sk); 31 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 33 extern unsigned long dn_nsp_persist(struct sock *sk); 34 34 extern int dn_nsp_xmit_timeout(struct sock *sk); 35 35 36 36 extern int dn_nsp_rx(struct sk_buff *); 37 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 40 extern struct sk_buff *dn_alloc_send_skb(struct sock *sk, size_t *size, int noblock, long timeo, int *err); 41 41 42 42 #define NSP_REASON_OK 0 /* No error */
+1 -1
include/net/dn_route.h
··· 15 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 19 extern int dn_route_output_sock(struct dst_entry **pprt, struct flowi *, struct sock *sk, int flags); 20 20 extern int dn_cache_dump(struct sk_buff *skb, struct netlink_callback *cb); 21 21 extern int dn_cache_getroute(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg);
+1 -1
include/net/inet_hashtables.h
··· 40 40 struct inet_ehash_bucket { 41 41 rwlock_t lock; 42 42 struct hlist_head chain; 43 - } __attribute__((__aligned__(8))); 43 + }; 44 44 45 45 /* There are a few simple rules, which allow for local port reuse by 46 46 * an application. In essence:
+1 -1
include/net/ip_vs.h
··· 832 832 833 833 extern int ip_vs_app_pkt_out(struct ip_vs_conn *, struct sk_buff **pskb); 834 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 836 char *o_buf, int o_len, char *n_buf, int n_len); 837 837 extern int ip_vs_app_init(void); 838 838 extern void ip_vs_app_cleanup(void);
+6 -1
include/net/xfrm.h
··· 875 875 } 876 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 879 extern int xfrm_policy_walk(int (*func)(struct xfrm_policy *, int, int, void*), void *); 880 880 int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl); 881 881 struct xfrm_policy *xfrm_policy_bysel(int dir, struct xfrm_selector *sel, ··· 929 929 return ipv6_addr_cmp((struct in6_addr *)a, 930 930 (struct in6_addr *)b); 931 931 } 932 + } 933 + 934 + static inline int xfrm_policy_id2dir(u32 index) 935 + { 936 + return index & 7; 932 937 } 933 938 934 939 #endif /* _NET_XFRM_H */
+1 -1
include/rxrpc/call.h
··· 203 203 size_t sioc, 204 204 struct kvec *siov, 205 205 uint8_t rxhdr_flags, 206 - int alloc_flags, 206 + unsigned int __nocast alloc_flags, 207 207 int dup_data, 208 208 size_t *size_sent); 209 209
+1 -1
include/rxrpc/message.h
··· 63 63 uint8_t type, 64 64 int count, 65 65 struct kvec *diov, 66 - int alloc_flags, 66 + unsigned int __nocast alloc_flags, 67 67 struct rxrpc_message **_msg); 68 68 69 69 extern int rxrpc_conn_sendmsg(struct rxrpc_connection *conn, struct rxrpc_message *msg);
+1 -1
lib/ts_bm.c
··· 127 127 } 128 128 129 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 132 struct ts_config *conf; 133 133 struct ts_bm *bm;
+1 -1
lib/ts_fsm.c
··· 258 258 } 259 259 260 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 263 int i, err = -EINVAL; 264 264 struct ts_config *conf;
+1 -1
lib/ts_kmp.c
··· 87 87 } 88 88 89 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 92 struct ts_config *conf; 93 93 struct ts_kmp *kmp;
+1 -1
net/atm/atm_misc.c
··· 25 25 26 26 27 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 30 struct sock *sk = sk_atm(vcc); 31 31 int guess = atm_guess_pdu2truesize(pdu_size);
+1 -1
net/ax25/ax25_in.c
··· 123 123 } 124 124 125 125 skb_pull(skb, 1); /* Remove PID */ 126 - skb->h.raw = skb->data; 126 + skb->mac.raw = skb->nh.raw; 127 127 skb->nh.raw = skb->data; 128 128 skb->dev = ax25->ax25_dev->dev; 129 129 skb->pkt_type = PACKET_HOST;
+4 -2
net/decnet/af_decnet.c
··· 452 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 458 struct dn_scp *scp; 458 459 struct sock *sk = sk_alloc(PF_DECnet, gfp, &dn_proto, 1); ··· 805 804 return rv; 806 805 } 807 806 808 - static int dn_confirm_accept(struct sock *sk, long *timeo, int allocation) 807 + static int dn_confirm_accept(struct sock *sk, long *timeo, 808 + unsigned int __nocast allocation) 809 809 { 810 810 struct dn_scp *scp = DN_SK(sk); 811 811 DEFINE_WAIT(wait);
+14 -9
net/decnet/dn_nsp_out.c
··· 117 117 * The eventual aim is for each socket to have a cached header size 118 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 123 struct sk_buff *skb; 123 124 int hdr = 64; ··· 211 210 * 212 211 * Returns: The number of times the packet has been sent previously 213 212 */ 214 - static inline unsigned dn_nsp_clone_and_send(struct sk_buff *skb, int gfp) 213 + static inline unsigned dn_nsp_clone_and_send(struct sk_buff *skb, 214 + unsigned int __nocast gfp) 215 215 { 216 216 struct dn_skb_cb *cb = DN_SKB_CB(skb); 217 217 struct sk_buff *skb2; ··· 352 350 return ptr; 353 351 } 354 352 355 - void dn_nsp_queue_xmit(struct sock *sk, struct sk_buff *skb, int gfp, int oth) 353 + void dn_nsp_queue_xmit(struct sock *sk, struct sk_buff *skb, 354 + unsigned int __nocast gfp, int oth) 356 355 { 357 356 struct dn_scp *scp = DN_SK(sk); 358 357 struct dn_skb_cb *cb = DN_SKB_CB(skb); ··· 520 517 return 0; 521 518 } 522 519 523 - void dn_send_conn_conf(struct sock *sk, int gfp) 520 + void dn_send_conn_conf(struct sock *sk, unsigned int __nocast gfp) 524 521 { 525 522 struct dn_scp *scp = DN_SK(sk); 526 523 struct sk_buff *skb = NULL; ··· 552 549 553 550 554 551 static __inline__ void dn_nsp_do_disc(struct sock *sk, unsigned char msgflg, 555 - unsigned short reason, int gfp, struct dst_entry *dst, 552 + unsigned short reason, unsigned int __nocast gfp, 553 + struct dst_entry *dst, 556 554 int ddl, unsigned char *dd, __u16 rem, __u16 loc) 557 555 { 558 556 struct sk_buff *skb = NULL; ··· 595 591 596 592 597 593 void dn_nsp_send_disc(struct sock *sk, unsigned char msgflg, 598 - unsigned short reason, int gfp) 594 + unsigned short reason, unsigned int __nocast gfp) 599 595 { 600 596 struct dn_scp *scp = DN_SK(sk); 601 597 int ddl = 0; ··· 616 612 { 617 613 struct dn_skb_cb *cb = DN_SKB_CB(skb); 618 614 int ddl = 0; 619 - int gfp = GFP_ATOMIC; 615 + unsigned int __nocast gfp = GFP_ATOMIC; 620 616 621 617 dn_nsp_do_disc(NULL, msgflg, reason, gfp, skb->dst, ddl, 622 618 NULL, cb->src_port, cb->dst_port); ··· 628 624 struct dn_scp *scp = DN_SK(sk); 629 625 struct sk_buff *skb; 630 626 unsigned char *ptr; 631 - int gfp = GFP_ATOMIC; 627 + unsigned int __nocast gfp = GFP_ATOMIC; 632 628 633 629 if ((skb = dn_alloc_skb(sk, DN_MAX_NSP_DATA_HEADER + 2, gfp)) == NULL) 634 630 return; ··· 663 659 unsigned char menuver; 664 660 struct dn_skb_cb *cb; 665 661 unsigned char type = 1; 666 - int allocation = (msgflg == NSP_CI) ? sk->sk_allocation : GFP_ATOMIC; 662 + unsigned int __nocast allocation = 663 + (msgflg == NSP_CI) ? sk->sk_allocation : GFP_ATOMIC; 667 664 struct sk_buff *skb = dn_alloc_skb(sk, 200, allocation); 668 665 669 666 if (!skb)
+1 -1
net/ipv4/ipvs/ip_vs_app.c
··· 604 604 /* 605 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 608 char *o_buf, int o_len, char *n_buf, int n_len) 609 609 { 610 610 struct iphdr *iph;
+1 -1
net/ipv4/netfilter/Kconfig
··· 141 141 tristate 'PPTP protocol support' 142 142 help 143 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 146 If you are running PPTP sessions over a stateful firewall or NAT 147 147 box, you may want to enable this feature.
+1 -1
net/ipv4/tcp_bic.c
··· 136 136 else if (cwnd < ca->last_max_cwnd + max_increment*(BICTCP_B-1)) 137 137 /* slow start */ 138 138 ca->cnt = (cwnd * (BICTCP_B-1)) 139 - / cwnd-ca->last_max_cwnd; 139 + / (cwnd - ca->last_max_cwnd); 140 140 else 141 141 /* linear increase */ 142 142 ca->cnt = cwnd / max_increment;
+1 -1
net/ipv6/mcast.c
··· 1393 1393 1394 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 1399 static struct sk_buff *add_grhead(struct sk_buff *skb, struct ifmcaddr6 *pmc,
+1 -1
net/ipv6/ndisc.c
··· 1450 1450 1451 1451 static void pndisc_redo(struct sk_buff *skb) 1452 1452 { 1453 - ndisc_rcv(skb); 1453 + ndisc_recv_ns(skb); 1454 1454 kfree_skb(skb); 1455 1455 } 1456 1456
+12 -6
net/key/af_key.c
··· 185 185 } 186 186 187 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 190 int err = -ENOBUFS; 191 191 ··· 217 217 #define BROADCAST_ONE 1 218 218 #define BROADCAST_REGISTERED 2 219 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 221 int broadcast_flags, struct sock *one_sk) 222 222 { 223 223 struct sock *sk; ··· 1416 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 1422 struct sk_buff *skb; 1422 1423 struct sadb_msg *hdr; ··· 2154 2153 2155 2154 static int pfkey_spdget(struct sock *sk, struct sk_buff *skb, struct sadb_msg *hdr, void **ext_hdrs) 2156 2155 { 2156 + unsigned int dir; 2157 2157 int err; 2158 2158 struct sadb_x_policy *pol; 2159 2159 struct xfrm_policy *xp; ··· 2163 2161 if ((pol = ext_hdrs[SADB_X_EXT_POLICY-1]) == NULL) 2164 2162 return -EINVAL; 2165 2163 2166 - xp = xfrm_policy_byid(0, pol->sadb_x_policy_id, 2164 + dir = xfrm_policy_id2dir(pol->sadb_x_policy_id); 2165 + if (dir >= XFRM_POLICY_MAX) 2166 + return -EINVAL; 2167 + 2168 + xp = xfrm_policy_byid(dir, pol->sadb_x_policy_id, 2167 2169 hdr->sadb_msg_type == SADB_X_SPDDELETE2); 2168 2170 if (xp == NULL) 2169 2171 return -ENOENT; ··· 2179 2173 if (hdr->sadb_msg_type == SADB_X_SPDDELETE2) { 2180 2174 c.data.byid = 1; 2181 2175 c.event = XFRM_MSG_DELPOLICY; 2182 - km_policy_notify(xp, pol->sadb_x_policy_dir-1, &c); 2176 + km_policy_notify(xp, dir, &c); 2183 2177 } else { 2184 - err = key_pol_get_resp(sk, xp, hdr, pol->sadb_x_policy_dir-1); 2178 + err = key_pol_get_resp(sk, xp, hdr, dir); 2185 2179 } 2186 2180 2187 2181 xfrm_pol_put(xp);
+2 -1
net/netfilter/nfnetlink.c
··· 195 195 196 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 200 int err = 0; 200 201 201 202 NETLINK_CB(skb).dst_group = group;
+1 -1
net/netrom/nr_dev.c
··· 58 58 59 59 /* Spoof incoming device */ 60 60 skb->dev = dev; 61 - skb->h.raw = skb->data; 61 + skb->mac.raw = skb->nh.raw; 62 62 skb->nh.raw = skb->data; 63 63 skb->pkt_type = PACKET_HOST; 64 64
+1 -1
net/rxrpc/call.c
··· 1923 1923 size_t sioc, 1924 1924 struct kvec *siov, 1925 1925 u8 rxhdr_flags, 1926 - int alloc_flags, 1926 + unsigned int __nocast alloc_flags, 1927 1927 int dup_data, 1928 1928 size_t *size_sent) 1929 1929 {
+1 -1
net/rxrpc/connection.c
··· 522 522 uint8_t type, 523 523 int dcount, 524 524 struct kvec diov[], 525 - int alloc_flags, 525 + unsigned int __nocast alloc_flags, 526 526 struct rxrpc_message **_msg) 527 527 { 528 528 struct rxrpc_message *msg;
+1 -1
net/sunrpc/sched.c
··· 719 719 void * 720 720 rpc_malloc(struct rpc_task *task, size_t size) 721 721 { 722 - int gfp; 722 + unsigned int __nocast gfp; 723 723 724 724 if (task->tk_flags & RPC_TASK_SWAPPER) 725 725 gfp = GFP_ATOMIC;
+3 -3
net/xfrm/xfrm_policy.c
··· 163 163 if (xp->dead) 164 164 goto out; 165 165 166 - dir = xp->index & 7; 166 + dir = xfrm_policy_id2dir(xp->index); 167 167 168 168 if (xp->lft.hard_add_expires_seconds) { 169 169 long tmo = xp->lft.hard_add_expires_seconds + ··· 225 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 230 struct xfrm_policy *policy; 231 231 ··· 417 417 struct xfrm_policy *pol, **p; 418 418 419 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 421 if (pol->index == id) { 422 422 xfrm_pol_hold(pol); 423 423 if (delete)