GIT 7e36763b2c204d59de4e88087f84a2c0c8421f25 git+ssh://master.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git commit Author: Frank Blaschka Date: Mon Mar 3 12:16:04 2008 -0800 [NET]: Fix race in generic address resolution. neigh_update sends skb from neigh->arp_queue while neigh_timer_handler has increased skbs refcount and calls solicit with the skb. neigh_timer_handler should not increase skbs refcount but make a copy of the skb and do solicit with the copy. Signed-off-by: Frank Blaschka Signed-off-by: David S. Miller commit c3d84a4dd22c727f5ed64453c72183c242ac9c19 Author: Heiko Carstens Date: Mon Mar 3 12:12:33 2008 -0800 iucv: fix build error on !SMP Since a5fbb6d1064be885d2a6b82f625186753cf74848 "KVM: fix !SMP build error" smp_call_function isn't a define anymore that folds into nothing but a define that calls up_smp_call_function with all parameters. Hence we cannot #ifdef out the unused code anymore... This seems to be the preferred method, so do this for s390 as well. net/iucv/iucv.c: In function 'iucv_cleanup_queue': net/iucv/iucv.c:657: error: '__iucv_cleanup_queue' undeclared Signed-off-by: Heiko Carstens Signed-off-by: Josef 'Jeff' Sipek Signed-off-by: Ursula Braun Signed-off-by: David S. Miller commit d152a7d88ab4134a895f91a9e00f70d118696039 Author: Ilpo Järvinen Date: Mon Mar 3 12:10:16 2008 -0800 [TCP]: Must count fack_count also when skipping It makes fackets_out to grow too slowly compared with the real write queue. This shouldn't cause those BUG_TRAP(packets <= tp->packets_out) to trigger but how knows how such inconsistent fackets_out affects here and there around TCP when everything is nowadays assuming accurate fackets_out. So lets see if this silences them all. Reported by Guillaume Chazarain . Signed-off-by: Ilpo Järvinen Signed-off-by: David S. Miller commit 401023710d73aaef1191ab4d6a79d39c51add828 Author: Kim B. Heino Date: Fri Feb 29 12:26:21 2008 -0800 [TUN]: Fix RTNL-locking in tun/tap driver Current tun/tap driver sets also net device's hw address when asked to change character device's hw address. This is a good idea, but it misses RTLN-locking, resulting following error message in 2.6.25-rc3's inetdev_event() function: RTNL: assertion failed at net/ipv4/devinet.c (1050) Attached patch fixes this problem. Signed-off-by: Kim B. Heino Signed-off-by: David S. Miller commit 459eea74104ad85c30e17541c2b30d776445e985 Author: Pavel Emelyanov Date: Fri Feb 29 11:24:45 2008 -0800 [SCTP]: Use proc_create to setup de->proc_fops. In addition to commit 160f17 ("[SCTP]: Use proc_create() to setup ->proc_fops first") use proc_create in two more places. Signed-off-by: Pavel Emelyanov Signed-off-by: David S. Miller commit 5e47879f493e14a017d1facefc601f43c477dbee Author: Wang Chen Date: Fri Feb 29 10:34:45 2008 -0800 [IRDA]: Use proc_create() to setup ->proc_fops first Use proc_create() to make sure that ->proc_fops be setup before gluing PDE to main tree. Signed-off-by: Wang Chen Signed-off-by: David S. Miller commit 0bc8c7bf9e7440500fe04f95d6cddc58ea023cd2 Author: Sangtae Ha Date: Thu Feb 28 22:14:32 2008 -0800 [TCP]: BIC web page link is corrected. Signed-off-by: Sangtae Ha Signed-off-by: David S. Miller drivers/net/tun.c | 6 +++++- net/core/neighbour.c | 2 +- net/ipv4/tcp_bic.c | 5 +++-- net/ipv4/tcp_input.c | 14 +++++++++----- net/irda/ircomm/ircomm_core.c | 8 +++++--- net/irda/irlan/irlan_common.c | 4 +--- net/irda/irproc.c | 8 +++----- net/iucv/iucv.c | 2 -- net/sctp/proc.c | 9 +++------ 9 files changed, 30 insertions(+), 28 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 038c1ef..7b816a0 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -663,7 +663,11 @@ static int tun_chr_ioctl(struct inode *inode, struct file *file, case SIOCSIFHWADDR: { /* try to set the actual net device's hw address */ - int ret = dev_set_mac_address(tun->dev, &ifr.ifr_hwaddr); + int ret; + + rtnl_lock(); + ret = dev_set_mac_address(tun->dev, &ifr.ifr_hwaddr); + rtnl_unlock(); if (ret == 0) { /** Set the character device's hardware address. This is used when diff --git a/net/core/neighbour.c b/net/core/neighbour.c index aef0153..d9a02b2 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -839,7 +839,7 @@ static void neigh_timer_handler(unsigned long arg) struct sk_buff *skb = skb_peek(&neigh->arp_queue); /* keep skb alive even if arp_queue overflows */ if (skb) - skb_get(skb); + skb = skb_copy(skb, GFP_ATOMIC); write_unlock(&neigh->lock); neigh->ops->solicit(neigh, skb); atomic_inc(&neigh->probes); diff --git a/net/ipv4/tcp_bic.c b/net/ipv4/tcp_bic.c index 5212ed9..7eb7636 100644 --- a/net/ipv4/tcp_bic.c +++ b/net/ipv4/tcp_bic.c @@ -1,12 +1,13 @@ /* * Binary Increase Congestion control for TCP - * + * Home page: + * http://netsrv.csc.ncsu.edu/twiki/bin/view/Main/BIC * This is from the implementation of BICTCP in * Lison-Xu, Kahaled Harfoush, and Injong Rhee. * "Binary Increase Congestion Control for Fast, Long Distance * Networks" in InfoComm 2004 * Available from: - * http://www.csc.ncsu.edu/faculty/rhee/export/bitcp.pdf + * http://netsrv.csc.ncsu.edu/export/bitcp.pdf * * Unless BIC is enabled and congestion window is large * this behaves the same as the original Reno. diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 19c449f..7facdb0 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -1367,7 +1367,7 @@ static struct sk_buff *tcp_sacktag_walk(struct sk_buff *skb, struct sock *sk, * a normal way */ static struct sk_buff *tcp_sacktag_skip(struct sk_buff *skb, struct sock *sk, - u32 skip_to_seq) + u32 skip_to_seq, int *fack_count) { tcp_for_write_queue_from(skb, sk) { if (skb == tcp_send_head(sk)) @@ -1375,6 +1375,8 @@ static struct sk_buff *tcp_sacktag_skip(struct sk_buff *skb, struct sock *sk, if (!before(TCP_SKB_CB(skb)->end_seq, skip_to_seq)) break; + + *fack_count += tcp_skb_pcount(skb); } return skb; } @@ -1390,7 +1392,7 @@ static struct sk_buff *tcp_maybe_skipping_dsack(struct sk_buff *skb, return skb; if (before(next_dup->start_seq, skip_to_seq)) { - skb = tcp_sacktag_skip(skb, sk, next_dup->start_seq); + skb = tcp_sacktag_skip(skb, sk, next_dup->start_seq, fack_count); tcp_sacktag_walk(skb, sk, NULL, next_dup->start_seq, next_dup->end_seq, 1, fack_count, reord, flag); @@ -1537,7 +1539,8 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, /* Head todo? */ if (before(start_seq, cache->start_seq)) { - skb = tcp_sacktag_skip(skb, sk, start_seq); + skb = tcp_sacktag_skip(skb, sk, start_seq, + &fack_count); skb = tcp_sacktag_walk(skb, sk, next_dup, start_seq, cache->start_seq, @@ -1565,7 +1568,8 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, goto walk; } - skb = tcp_sacktag_skip(skb, sk, cache->end_seq); + skb = tcp_sacktag_skip(skb, sk, cache->end_seq, + &fack_count); /* Check overlap against next cached too (past this one already) */ cache++; continue; @@ -1577,7 +1581,7 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, break; fack_count = tp->fackets_out; } - skb = tcp_sacktag_skip(skb, sk, start_seq); + skb = tcp_sacktag_skip(skb, sk, start_seq, &fack_count); walk: skb = tcp_sacktag_walk(skb, sk, next_dup, start_seq, end_seq, diff --git a/net/irda/ircomm/ircomm_core.c b/net/irda/ircomm/ircomm_core.c index b825399..6eef1f2 100644 --- a/net/irda/ircomm/ircomm_core.c +++ b/net/irda/ircomm/ircomm_core.c @@ -76,9 +76,11 @@ static int __init ircomm_init(void) #ifdef CONFIG_PROC_FS { struct proc_dir_entry *ent; - ent = create_proc_entry("ircomm", 0, proc_irda); - if (ent) - ent->proc_fops = &ircomm_proc_fops; + ent = proc_create("ircomm", 0, proc_irda, &ircomm_proc_fops); + if (!ent) { + printk(KERN_ERR "ircomm_init: can't create /proc entry!\n"); + return -ENODEV; + } } #endif /* CONFIG_PROC_FS */ diff --git a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c index a4b56e2..1eb4bbc 100644 --- a/net/irda/irlan/irlan_common.c +++ b/net/irda/irlan/irlan_common.c @@ -128,13 +128,11 @@ static int __init irlan_init(void) #ifdef CONFIG_PROC_FS { struct proc_dir_entry *proc; - proc = create_proc_entry("irlan", 0, proc_irda); + proc = proc_create("irlan", 0, proc_irda, &irlan_fops); if (!proc) { printk(KERN_ERR "irlan_init: can't create /proc entry!\n"); return -ENODEV; } - - proc->proc_fops = &irlan_fops; } #endif /* CONFIG_PROC_FS */ diff --git a/net/irda/irproc.c b/net/irda/irproc.c index cae24fb..88e80a3 100644 --- a/net/irda/irproc.c +++ b/net/irda/irproc.c @@ -72,11 +72,9 @@ void __init irda_proc_register(void) return; proc_irda->owner = THIS_MODULE; - for (i=0; iproc_fops = irda_dirs[i].fops; - } + for (i = 0; i < ARRAY_SIZE(irda_dirs); i++) + d = proc_create(irda_dirs[i].name, 0, proc_irda, + irda_dirs[i].fops); } /* diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c index 2753b0c..d764f4c 100644 --- a/net/iucv/iucv.c +++ b/net/iucv/iucv.c @@ -621,7 +621,6 @@ static int iucv_sever_pathid(u16 pathid, u8 userdata[16]) return iucv_call_b2f0(IUCV_SEVER, parm); } -#ifdef CONFIG_SMP /** * __iucv_cleanup_queue * @dummy: unused dummy argument @@ -632,7 +631,6 @@ static int iucv_sever_pathid(u16 pathid, u8 userdata[16]) static void __iucv_cleanup_queue(void *dummy) { } -#endif /** * iucv_cleanup_queue diff --git a/net/sctp/proc.c b/net/sctp/proc.c index 9e214da..973f1db 100644 --- a/net/sctp/proc.c +++ b/net/sctp/proc.c @@ -256,12 +256,10 @@ int __init sctp_eps_proc_init(void) { struct proc_dir_entry *p; - p = create_proc_entry("eps", S_IRUGO, proc_net_sctp); + p = proc_create("eps", S_IRUGO, proc_net_sctp, &sctp_eps_seq_fops); if (!p) return -ENOMEM; - p->proc_fops = &sctp_eps_seq_fops; - return 0; } @@ -367,12 +365,11 @@ int __init sctp_assocs_proc_init(void) { struct proc_dir_entry *p; - p = create_proc_entry("assocs", S_IRUGO, proc_net_sctp); + p = proc_create("assocs", S_IRUGO, proc_net_sctp, + &sctp_assocs_seq_fops); if (!p) return -ENOMEM; - p->proc_fops = &sctp_assocs_seq_fops; - return 0; }