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

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