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

+31 -26
+2
include/linux/atalk.h
··· 1 #ifndef __LINUX_ATALK_H__ 2 #define __LINUX_ATALK_H__ 3 4 /* 5 * AppleTalk networking structures 6 *
··· 1 #ifndef __LINUX_ATALK_H__ 2 #define __LINUX_ATALK_H__ 3 4 + #include <asm/byteorder.h> 5 + 6 /* 7 * AppleTalk networking structures 8 *
+13 -16
net/core/pktgen.c
··· 151 #include <asm/timex.h> 152 153 154 - #define VERSION "pktgen v2.61: Packet Generator for packet performance testing.\n" 155 156 /* #define PG_DEBUG(a) a */ 157 #define PG_DEBUG(a) ··· 1921 struct iphdr *iph; 1922 struct pktgen_hdr *pgh = NULL; 1923 1924 skb = alloc_skb(pkt_dev->cur_pkt_size + 64 + 16, GFP_ATOMIC); 1925 if (!skb) { 1926 sprintf(pkt_dev->result, "No memory"); ··· 1938 eth = (__u8 *) skb_push(skb, 14); 1939 iph = (struct iphdr *)skb_put(skb, sizeof(struct iphdr)); 1940 udph = (struct udphdr *)skb_put(skb, sizeof(struct udphdr)); 1941 - 1942 - /* Update any of the values, used when we're incrementing various 1943 - * fields. 1944 - */ 1945 - mod_cur_headers(pkt_dev); 1946 1947 memcpy(eth, pkt_dev->hh, 12); 1948 *(u16*)&eth[12] = __constant_htons(ETH_P_IP); ··· 2192 int datalen; 2193 struct ipv6hdr *iph; 2194 struct pktgen_hdr *pgh = NULL; 2195 - 2196 skb = alloc_skb(pkt_dev->cur_pkt_size + 64 + 16, GFP_ATOMIC); 2197 if (!skb) { 2198 sprintf(pkt_dev->result, "No memory"); ··· 2211 iph = (struct ipv6hdr *)skb_put(skb, sizeof(struct ipv6hdr)); 2212 udph = (struct udphdr *)skb_put(skb, sizeof(struct udphdr)); 2213 2214 - 2215 - /* Update any of the values, used when we're incrementing various 2216 - * fields. 2217 - */ 2218 - mod_cur_headers(pkt_dev); 2219 - 2220 - 2221 memcpy(eth, pkt_dev->hh, 12); 2222 *(u16*)&eth[12] = __constant_htons(ETH_P_IPV6); 2223 - 2224 - 2225 datalen = pkt_dev->cur_pkt_size-14- 2226 sizeof(struct ipv6hdr)-sizeof(struct udphdr); /* Eth + IPh + UDPh */ 2227
··· 151 #include <asm/timex.h> 152 153 154 + #define VERSION "pktgen v2.62: Packet Generator for packet performance testing.\n" 155 156 /* #define PG_DEBUG(a) a */ 157 #define PG_DEBUG(a) ··· 1921 struct iphdr *iph; 1922 struct pktgen_hdr *pgh = NULL; 1923 1924 + /* Update any of the values, used when we're incrementing various 1925 + * fields. 1926 + */ 1927 + mod_cur_headers(pkt_dev); 1928 + 1929 skb = alloc_skb(pkt_dev->cur_pkt_size + 64 + 16, GFP_ATOMIC); 1930 if (!skb) { 1931 sprintf(pkt_dev->result, "No memory"); ··· 1933 eth = (__u8 *) skb_push(skb, 14); 1934 iph = (struct iphdr *)skb_put(skb, sizeof(struct iphdr)); 1935 udph = (struct udphdr *)skb_put(skb, sizeof(struct udphdr)); 1936 1937 memcpy(eth, pkt_dev->hh, 12); 1938 *(u16*)&eth[12] = __constant_htons(ETH_P_IP); ··· 2192 int datalen; 2193 struct ipv6hdr *iph; 2194 struct pktgen_hdr *pgh = NULL; 2195 + 2196 + /* Update any of the values, used when we're incrementing various 2197 + * fields. 2198 + */ 2199 + mod_cur_headers(pkt_dev); 2200 + 2201 skb = alloc_skb(pkt_dev->cur_pkt_size + 64 + 16, GFP_ATOMIC); 2202 if (!skb) { 2203 sprintf(pkt_dev->result, "No memory"); ··· 2206 iph = (struct ipv6hdr *)skb_put(skb, sizeof(struct ipv6hdr)); 2207 udph = (struct udphdr *)skb_put(skb, sizeof(struct udphdr)); 2208 2209 memcpy(eth, pkt_dev->hh, 12); 2210 *(u16*)&eth[12] = __constant_htons(ETH_P_IPV6); 2211 + 2212 datalen = pkt_dev->cur_pkt_size-14- 2213 sizeof(struct ipv6hdr)-sizeof(struct udphdr); /* Eth + IPh + UDPh */ 2214
+1 -2
net/ipv4/Kconfig
··· 448 config TCP_CONG_ADVANCED 449 bool "TCP: advanced congestion control" 450 depends on INET 451 - default y 452 ---help--- 453 Support for selection of various TCP congestion control 454 modules. ··· 548 endmenu 549 550 config TCP_CONG_BIC 551 - boolean 552 depends on !TCP_CONG_ADVANCED 553 default y 554
··· 448 config TCP_CONG_ADVANCED 449 bool "TCP: advanced congestion control" 450 depends on INET 451 ---help--- 452 Support for selection of various TCP congestion control 453 modules. ··· 549 endmenu 550 551 config TCP_CONG_BIC 552 + tristate 553 depends on !TCP_CONG_ADVANCED 554 default y 555
+5 -3
net/ipv4/ipvs/ip_vs_ctl.c
··· 2059 dst->addr = src->addr; 2060 dst->port = src->port; 2061 dst->fwmark = src->fwmark; 2062 - strcpy(dst->sched_name, src->scheduler->name); 2063 dst->flags = src->flags; 2064 dst->timeout = src->timeout / HZ; 2065 dst->netmask = src->netmask; ··· 2080 list_for_each_entry(svc, &ip_vs_svc_table[idx], s_list) { 2081 if (count >= get->num_services) 2082 goto out; 2083 ip_vs_copy_service(&entry, svc); 2084 if (copy_to_user(&uptr->entrytable[count], 2085 &entry, sizeof(entry))) { ··· 2095 list_for_each_entry(svc, &ip_vs_svc_fwm_table[idx], f_list) { 2096 if (count >= get->num_services) 2097 goto out; 2098 ip_vs_copy_service(&entry, svc); 2099 if (copy_to_user(&uptr->entrytable[count], 2100 &entry, sizeof(entry))) { ··· 2306 memset(&d, 0, sizeof(d)); 2307 if (ip_vs_sync_state & IP_VS_STATE_MASTER) { 2308 d[0].state = IP_VS_STATE_MASTER; 2309 - strcpy(d[0].mcast_ifn, ip_vs_master_mcast_ifn); 2310 d[0].syncid = ip_vs_master_syncid; 2311 } 2312 if (ip_vs_sync_state & IP_VS_STATE_BACKUP) { 2313 d[1].state = IP_VS_STATE_BACKUP; 2314 - strcpy(d[1].mcast_ifn, ip_vs_backup_mcast_ifn); 2315 d[1].syncid = ip_vs_backup_syncid; 2316 } 2317 if (copy_to_user(user, &d, sizeof(d)) != 0)
··· 2059 dst->addr = src->addr; 2060 dst->port = src->port; 2061 dst->fwmark = src->fwmark; 2062 + strlcpy(dst->sched_name, src->scheduler->name, sizeof(dst->sched_name)); 2063 dst->flags = src->flags; 2064 dst->timeout = src->timeout / HZ; 2065 dst->netmask = src->netmask; ··· 2080 list_for_each_entry(svc, &ip_vs_svc_table[idx], s_list) { 2081 if (count >= get->num_services) 2082 goto out; 2083 + memset(&entry, 0, sizeof(entry)); 2084 ip_vs_copy_service(&entry, svc); 2085 if (copy_to_user(&uptr->entrytable[count], 2086 &entry, sizeof(entry))) { ··· 2094 list_for_each_entry(svc, &ip_vs_svc_fwm_table[idx], f_list) { 2095 if (count >= get->num_services) 2096 goto out; 2097 + memset(&entry, 0, sizeof(entry)); 2098 ip_vs_copy_service(&entry, svc); 2099 if (copy_to_user(&uptr->entrytable[count], 2100 &entry, sizeof(entry))) { ··· 2304 memset(&d, 0, sizeof(d)); 2305 if (ip_vs_sync_state & IP_VS_STATE_MASTER) { 2306 d[0].state = IP_VS_STATE_MASTER; 2307 + strlcpy(d[0].mcast_ifn, ip_vs_master_mcast_ifn, sizeof(d[0].mcast_ifn)); 2308 d[0].syncid = ip_vs_master_syncid; 2309 } 2310 if (ip_vs_sync_state & IP_VS_STATE_BACKUP) { 2311 d[1].state = IP_VS_STATE_BACKUP; 2312 + strlcpy(d[1].mcast_ifn, ip_vs_backup_mcast_ifn, sizeof(d[1].mcast_ifn)); 2313 d[1].syncid = ip_vs_backup_syncid; 2314 } 2315 if (copy_to_user(user, &d, sizeof(d)) != 0)
+2 -2
net/ipv4/ipvs/ip_vs_sync.c
··· 839 840 ip_vs_sync_state |= state; 841 if (state == IP_VS_STATE_MASTER) { 842 - strcpy(ip_vs_master_mcast_ifn, mcast_ifn); 843 ip_vs_master_syncid = syncid; 844 } else { 845 - strcpy(ip_vs_backup_mcast_ifn, mcast_ifn); 846 ip_vs_backup_syncid = syncid; 847 } 848
··· 839 840 ip_vs_sync_state |= state; 841 if (state == IP_VS_STATE_MASTER) { 842 + strlcpy(ip_vs_master_mcast_ifn, mcast_ifn, sizeof(ip_vs_master_mcast_ifn)); 843 ip_vs_master_syncid = syncid; 844 } else { 845 + strlcpy(ip_vs_backup_mcast_ifn, mcast_ifn, sizeof(ip_vs_backup_mcast_ifn)); 846 ip_vs_backup_syncid = syncid; 847 } 848
+8 -3
net/netlink/af_netlink.c
··· 315 static void netlink_remove(struct sock *sk) 316 { 317 netlink_table_grab(); 318 - nl_table[sk->sk_protocol].hash.entries--; 319 - sk_del_node_init(sk); 320 if (nlk_sk(sk)->groups) 321 __sk_del_bind_node(sk); 322 netlink_table_ungrab(); ··· 429 err = netlink_insert(sk, pid); 430 if (err == -EADDRINUSE) 431 goto retry; 432 - return 0; 433 } 434 435 static inline int netlink_capable(struct socket *sock, unsigned int flag)
··· 315 static void netlink_remove(struct sock *sk) 316 { 317 netlink_table_grab(); 318 + if (sk_del_node_init(sk)) 319 + nl_table[sk->sk_protocol].hash.entries--; 320 if (nlk_sk(sk)->groups) 321 __sk_del_bind_node(sk); 322 netlink_table_ungrab(); ··· 429 err = netlink_insert(sk, pid); 430 if (err == -EADDRINUSE) 431 goto retry; 432 + 433 + /* If 2 threads race to autobind, that is fine. */ 434 + if (err == -EBUSY) 435 + err = 0; 436 + 437 + return err; 438 } 439 440 static inline int netlink_capable(struct socket *sock, unsigned int flag)