Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
[NET]: Mark Paul Moore as maintainer of labelled networking.
[VLAN/BRIDGE]: Fix "skb_pull_rcsum - Fatal exception in interrupt"
[ISDN]: Get rid of some pointless allocation casts in common and bsd comp.
[NET]: Avoid pointless allocation casts in BSD compression module
[IRDA]: Do not do pointless kmalloc return value cast in KingSun driver
[NET]: Fix crash in dev_mc_sync()/dev_mc_unsync()
[PPPOL2TP]: Fix endianness annotations.
[IOAT]: ioatdma needs to to play nice in a multi-dma-client world
[SLIP]: trivial sparse warning fix
[EQL]: sparse warning fix
[NET]: is_power_of_2 in net/core/neighbour.c
[TCP]: Describe tcp_init_cwnd() thoroughly in a comment.
[NET]: Fix IP_ADD/DROP_MEMBERSHIP to handle only connectionless
[KBUILD]: Sanitize tc_ematch headers.
[IPSEC] AH4: Update IPv4 options handling to conform to RFC 4302.

+70 -41
+6
MAINTAINERS
··· 2661 2661 T: git kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6.git 2662 2662 S: Maintained 2663 2663 2664 + NETWORKING [LABELED] (NetLabel, CIPSO, Labeled IPsec, SECMARK) 2665 + P: Paul Moore 2666 + M: paul.moore@hp.com 2667 + L: netdev@vger.kernel.org 2668 + S: Maintained 2669 + 2664 2670 NETWORKING [WIRELESS] 2665 2671 P: John W. Linville 2666 2672 M: linville@tuxdriver.com
+4 -14
drivers/dma/ioatdma.c
··· 191 191 int i; 192 192 LIST_HEAD(tmp_list); 193 193 194 - /* 195 - * In-use bit automatically set by reading chanctrl 196 - * If 0, we got it, if 1, someone else did 197 - */ 198 - chanctrl = readw(ioat_chan->reg_base + IOAT_CHANCTRL_OFFSET); 199 - if (chanctrl & IOAT_CHANCTRL_CHANNEL_IN_USE) 200 - return -EBUSY; 194 + /* have we already been set up? */ 195 + if (!list_empty(&ioat_chan->free_desc)) 196 + return INITIAL_IOAT_DESC_COUNT; 201 197 202 198 /* Setup register to interrupt and write completion status on error */ 203 - chanctrl = IOAT_CHANCTRL_CHANNEL_IN_USE | 204 - IOAT_CHANCTRL_ERR_INT_EN | 199 + chanctrl = IOAT_CHANCTRL_ERR_INT_EN | 205 200 IOAT_CHANCTRL_ANY_ERR_ABORT_EN | 206 201 IOAT_CHANCTRL_ERR_COMPLETION_EN; 207 202 writew(chanctrl, ioat_chan->reg_base + IOAT_CHANCTRL_OFFSET); ··· 277 282 in_use_descs - 1); 278 283 279 284 ioat_chan->last_completion = ioat_chan->completion_addr = 0; 280 - 281 - /* Tell hw the chan is free */ 282 - chanctrl = readw(ioat_chan->reg_base + IOAT_CHANCTRL_OFFSET); 283 - chanctrl &= ~IOAT_CHANCTRL_CHANNEL_IN_USE; 284 - writew(chanctrl, ioat_chan->reg_base + IOAT_CHANCTRL_OFFSET); 285 285 } 286 286 287 287 static struct dma_async_tx_descriptor *
+2 -3
drivers/isdn/i4l/isdn_bsdcomp.c
··· 341 341 * Allocate space for the dictionary. This may be more than one page in 342 342 * length. 343 343 */ 344 - db->dict = (struct bsd_dict *) vmalloc (hsize * sizeof (struct bsd_dict)); 344 + db->dict = vmalloc(hsize * sizeof(struct bsd_dict)); 345 345 if (!db->dict) { 346 346 bsd_free (db); 347 347 return NULL; ··· 354 354 if (!decomp) 355 355 db->lens = NULL; 356 356 else { 357 - db->lens = (unsigned short *) vmalloc ((maxmaxcode + 1) * 358 - sizeof (db->lens[0])); 357 + db->lens = vmalloc((maxmaxcode + 1) * sizeof(db->lens[0])); 359 358 if (!db->lens) { 360 359 bsd_free (db); 361 360 return (NULL);
+1 -1
drivers/isdn/i4l/isdn_common.c
··· 2291 2291 int i; 2292 2292 char tmprev[50]; 2293 2293 2294 - if (!(dev = (isdn_dev *) vmalloc(sizeof(isdn_dev)))) { 2294 + if (!(dev = vmalloc(sizeof(isdn_dev)))) { 2295 2295 printk(KERN_WARNING "isdn: Could not allocate device-struct.\n"); 2296 2296 return -EIO; 2297 2297 }
+2 -4
drivers/net/bsd_comp.c
··· 406 406 * Allocate space for the dictionary. This may be more than one page in 407 407 * length. 408 408 */ 409 - db->dict = (struct bsd_dict *) vmalloc (hsize * 410 - sizeof (struct bsd_dict)); 409 + db->dict = vmalloc(hsize * sizeof(struct bsd_dict)); 411 410 if (!db->dict) 412 411 { 413 412 bsd_free (db); ··· 425 426 */ 426 427 else 427 428 { 428 - db->lens = (unsigned short *) vmalloc ((maxmaxcode + 1) * 429 - sizeof (db->lens[0])); 429 + db->lens = vmalloc((maxmaxcode + 1) * sizeof(db->lens[0])); 430 430 if (!db->lens) 431 431 { 432 432 bsd_free (db);
+1 -1
drivers/net/eql.c
··· 391 391 slave_t *duplicate_slave = NULL; 392 392 393 393 duplicate_slave = __eql_find_slave_dev(queue, slave->dev); 394 - if (duplicate_slave != 0) 394 + if (duplicate_slave) 395 395 eql_kill_one_slave(queue, duplicate_slave); 396 396 397 397 list_add(&slave->list, &queue->all_slaves);
+2 -2
drivers/net/irda/kingsun-sir.c
··· 509 509 spin_lock_init(&kingsun->lock); 510 510 511 511 /* Allocate input buffer */ 512 - kingsun->in_buf = (__u8 *)kmalloc(kingsun->max_rx, GFP_KERNEL); 512 + kingsun->in_buf = kmalloc(kingsun->max_rx, GFP_KERNEL); 513 513 if (!kingsun->in_buf) 514 514 goto free_mem; 515 515 516 516 /* Allocate output buffer */ 517 - kingsun->out_buf = (__u8 *)kmalloc(KINGSUN_FIFO_SIZE, GFP_KERNEL); 517 + kingsun->out_buf = kmalloc(KINGSUN_FIFO_SIZE, GFP_KERNEL); 518 518 if (!kingsun->out_buf) 519 519 goto free_mem; 520 520
+1 -1
drivers/net/slip.c
··· 957 957 * STANDARD SLIP ENCAPSULATION * 958 958 ************************************************************************/ 959 959 960 - int 960 + static int 961 961 slip_esc(unsigned char *s, unsigned char *d, int len) 962 962 { 963 963 unsigned char *ptr = d;
+1
include/linux/Kbuild
··· 7 7 header-y += spi/ 8 8 header-y += sunrpc/ 9 9 header-y += tc_act/ 10 + header-y += tc_ematch/ 10 11 header-y += netfilter/ 11 12 header-y += netfilter_arp/ 12 13 header-y += netfilter_bridge/
+2 -2
include/linux/if_pppol2tp.h
··· 32 32 33 33 struct sockaddr_in addr; /* IP address and port to send to */ 34 34 35 - __be16 s_tunnel, s_session; /* For matching incoming packets */ 36 - __be16 d_tunnel, d_session; /* For sending outgoing packets */ 35 + __u16 s_tunnel, s_session; /* For matching incoming packets */ 36 + __u16 d_tunnel, d_session; /* For sending outgoing packets */ 37 37 }; 38 38 39 39 /* Socket options:
+11 -1
net/8021q/vlan_dev.c
··· 116 116 struct packet_type* ptype, struct net_device *orig_dev) 117 117 { 118 118 unsigned char *rawp = NULL; 119 - struct vlan_hdr *vhdr = (struct vlan_hdr *)(skb->data); 119 + struct vlan_hdr *vhdr; 120 120 unsigned short vid; 121 121 struct net_device_stats *stats; 122 122 unsigned short vlan_TCI; 123 123 __be16 proto; 124 + 125 + if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) 126 + return -1; 127 + 128 + if (unlikely(!pskb_may_pull(skb, VLAN_HLEN))) { 129 + kfree_skb(skb); 130 + return -1; 131 + } 132 + 133 + vhdr = (struct vlan_hdr *)(skb->data); 124 134 125 135 /* vlan_TCI = ntohs(get_unaligned(&vhdr->h_vlan_TCI)); */ 126 136 vlan_TCI = ntohs(vhdr->h_vlan_TCI);
+7 -5
net/bridge/br_netfilter.c
··· 509 509 int (*okfn)(struct sk_buff *)) 510 510 { 511 511 struct iphdr *iph; 512 - __u32 len; 513 512 struct sk_buff *skb = *pskb; 513 + __u32 len = nf_bridge_encap_header_len(skb); 514 + 515 + if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) 516 + return NF_STOLEN; 517 + 518 + if (unlikely(!pskb_may_pull(skb, len))) 519 + goto out; 514 520 515 521 if (skb->protocol == htons(ETH_P_IPV6) || IS_VLAN_IPV6(skb) || 516 522 IS_PPPOE_IPV6(skb)) { ··· 524 518 if (!brnf_call_ip6tables) 525 519 return NF_ACCEPT; 526 520 #endif 527 - if ((skb = skb_share_check(*pskb, GFP_ATOMIC)) == NULL) 528 - goto out; 529 521 nf_bridge_pull_encap_header_rcsum(skb); 530 522 return br_nf_pre_routing_ipv6(hook, skb, in, out, okfn); 531 523 } ··· 536 532 !IS_PPPOE_IP(skb)) 537 533 return NF_ACCEPT; 538 534 539 - if ((skb = skb_share_check(*pskb, GFP_ATOMIC)) == NULL) 540 - goto out; 541 535 nf_bridge_pull_encap_header_rcsum(skb); 542 536 543 537 if (!pskb_may_pull(skb, sizeof(struct iphdr)))
+10 -4
net/core/dev_mcast.c
··· 116 116 */ 117 117 int dev_mc_sync(struct net_device *to, struct net_device *from) 118 118 { 119 - struct dev_addr_list *da; 119 + struct dev_addr_list *da, *next; 120 120 int err = 0; 121 121 122 122 netif_tx_lock_bh(to); 123 - for (da = from->mc_list; da != NULL; da = da->next) { 123 + da = from->mc_list; 124 + while (da != NULL) { 125 + next = da->next; 124 126 if (!da->da_synced) { 125 127 err = __dev_addr_add(&to->mc_list, &to->mc_count, 126 128 da->da_addr, da->da_addrlen, 0); ··· 136 134 __dev_addr_delete(&from->mc_list, &from->mc_count, 137 135 da->da_addr, da->da_addrlen, 0); 138 136 } 137 + da = next; 139 138 } 140 139 if (!err) 141 140 __dev_set_rx_mode(to); ··· 159 156 */ 160 157 void dev_mc_unsync(struct net_device *to, struct net_device *from) 161 158 { 162 - struct dev_addr_list *da; 159 + struct dev_addr_list *da, *next; 163 160 164 161 netif_tx_lock_bh(from); 165 162 netif_tx_lock_bh(to); 166 163 167 - for (da = from->mc_list; da != NULL; da = da->next) { 164 + da = from->mc_list; 165 + while (da != NULL) { 166 + next = da->next; 168 167 if (!da->da_synced) 169 168 continue; 170 169 __dev_addr_delete(&to->mc_list, &to->mc_count, ··· 174 169 da->da_synced = 0; 175 170 __dev_addr_delete(&from->mc_list, &from->mc_count, 176 171 da->da_addr, da->da_addrlen, 0); 172 + da = next; 177 173 } 178 174 __dev_set_rx_mode(to); 179 175
+2 -1
net/core/neighbour.c
··· 33 33 #include <linux/rtnetlink.h> 34 34 #include <linux/random.h> 35 35 #include <linux/string.h> 36 + #include <linux/log2.h> 36 37 37 38 #define NEIGH_DEBUG 1 38 39 ··· 312 311 313 312 NEIGH_CACHE_STAT_INC(tbl, hash_grows); 314 313 315 - BUG_ON(new_entries & (new_entries - 1)); 314 + BUG_ON(!is_power_of_2(new_entries)); 316 315 new_hash = neigh_hash_alloc(new_entries); 317 316 if (!new_hash) 318 317 return;
+1 -1
net/ipv4/ah4.c
··· 46 46 memcpy(daddr, optptr+optlen-4, 4); 47 47 /* Fall through */ 48 48 default: 49 - memset(optptr+2, 0, optlen-2); 49 + memset(optptr, 0, optlen); 50 50 } 51 51 l -= optlen; 52 52 optptr += optlen;
+4
net/ipv4/ip_sockglue.c
··· 625 625 { 626 626 struct ip_mreqn mreq; 627 627 628 + err = -EPROTO; 629 + if (inet_sk(sk)->is_icsk) 630 + break; 631 + 628 632 if (optlen < sizeof(struct ip_mreq)) 629 633 goto e_inval; 630 634 err = -EFAULT;
+9 -1
net/ipv4/tcp_input.c
··· 755 755 } 756 756 } 757 757 758 - /* Numbers are taken from RFC2414. */ 758 + /* Numbers are taken from RFC3390. 759 + * 760 + * John Heffner states: 761 + * 762 + * The RFC specifies a window of no more than 4380 bytes 763 + * unless 2*MSS > 4380. Reading the pseudocode in the RFC 764 + * is a bit misleading because they use a clamp at 4380 bytes 765 + * rather than use a multiplier in the relevant range. 766 + */ 759 767 __u32 tcp_init_cwnd(struct tcp_sock *tp, struct dst_entry *dst) 760 768 { 761 769 __u32 cwnd = (dst ? dst_metric(dst, RTAX_INITCWND) : 0);
+4
net/ipv6/ipv6_sockglue.c
··· 554 554 { 555 555 struct ipv6_mreq mreq; 556 556 557 + retv = -EPROTO; 558 + if (inet_sk(sk)->is_icsk) 559 + break; 560 + 557 561 retv = -EFAULT; 558 562 if (copy_from_user(&mreq, optval, sizeof(struct ipv6_mreq))) 559 563 break;