aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-03-05 15:26:41 -0500
committerDavid S. Miller <davem@davemloft.net>2008-03-05 15:26:41 -0500
commit255333c1db3ec63921de29b134418a4e56e5921e (patch)
treeb1cd99373cabfa6fed020496d4d74500e7bc7e92 /net
parent9a43b709a230705ca40a6f854a334a02334a3c1c (diff)
parent0d66afe7805b169b6bf3c7a88cf8163298b8ef05 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: net/mac80211/rc80211_pid_algo.c
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/l2cap.c3
-rw-r--r--net/core/neighbour.c2
-rw-r--r--net/core/netpoll.c12
-rw-r--r--net/ipv4/Kconfig2
-rw-r--r--net/ipv4/ipconfig.c4
-rw-r--r--net/ipv4/tcp_bic.c5
-rw-r--r--net/ipv4/tcp_input.c14
-rw-r--r--net/ipv6/Kconfig2
-rw-r--r--net/irda/ircomm/ircomm_core.c8
-rw-r--r--net/irda/irlan/irlan_common.c4
-rw-r--r--net/irda/irproc.c8
-rw-r--r--net/iucv/iucv.c2
-rw-r--r--net/sctp/proc.c9
13 files changed, 39 insertions, 36 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 7c5459c8e8ef..34f8bf98bc05 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -417,7 +417,8 @@ static void l2cap_conn_del(struct hci_conn *hcon, int err)
417 l2cap_sock_kill(sk); 417 l2cap_sock_kill(sk);
418 } 418 }
419 419
420 del_timer_sync(&conn->info_timer); 420 if (conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_SENT)
421 del_timer_sync(&conn->info_timer);
421 422
422 hcon->l2cap_data = NULL; 423 hcon->l2cap_data = NULL;
423 kfree(conn); 424 kfree(conn);
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 31b6567f0b6a..23c0a10c0c37 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -839,7 +839,7 @@ static void neigh_timer_handler(unsigned long arg)
839 struct sk_buff *skb = skb_peek(&neigh->arp_queue); 839 struct sk_buff *skb = skb_peek(&neigh->arp_queue);
840 /* keep skb alive even if arp_queue overflows */ 840 /* keep skb alive even if arp_queue overflows */
841 if (skb) 841 if (skb)
842 skb_get(skb); 842 skb = skb_copy(skb, GFP_ATOMIC);
843 write_unlock(&neigh->lock); 843 write_unlock(&neigh->lock);
844 neigh->ops->solicit(neigh, skb); 844 neigh->ops->solicit(neigh, skb);
845 atomic_inc(&neigh->probes); 845 atomic_inc(&neigh->probes);
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 7ae98659d79d..d0c8bf585f06 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -39,6 +39,8 @@ static struct sk_buff_head skb_pool;
39static atomic_t trapped; 39static atomic_t trapped;
40 40
41#define USEC_PER_POLL 50 41#define USEC_PER_POLL 50
42#define NETPOLL_RX_ENABLED 1
43#define NETPOLL_RX_DROP 2
42 44
43#define MAX_SKB_SIZE \ 45#define MAX_SKB_SIZE \
44 (MAX_UDP_CHUNK + sizeof(struct udphdr) + \ 46 (MAX_UDP_CHUNK + sizeof(struct udphdr) + \
@@ -126,11 +128,13 @@ static int poll_one_napi(struct netpoll_info *npinfo,
126 if (!test_bit(NAPI_STATE_SCHED, &napi->state)) 128 if (!test_bit(NAPI_STATE_SCHED, &napi->state))
127 return budget; 129 return budget;
128 130
131 npinfo->rx_flags |= NETPOLL_RX_DROP;
129 atomic_inc(&trapped); 132 atomic_inc(&trapped);
130 133
131 work = napi->poll(napi, budget); 134 work = napi->poll(napi, budget);
132 135
133 atomic_dec(&trapped); 136 atomic_dec(&trapped);
137 npinfo->rx_flags &= ~NETPOLL_RX_DROP;
134 138
135 return budget - work; 139 return budget - work;
136} 140}
@@ -470,7 +474,7 @@ int __netpoll_rx(struct sk_buff *skb)
470 if (skb->dev->type != ARPHRD_ETHER) 474 if (skb->dev->type != ARPHRD_ETHER)
471 goto out; 475 goto out;
472 476
473 /* if receive ARP during middle of NAPI poll, then queue */ 477 /* check if netpoll clients need ARP */
474 if (skb->protocol == htons(ETH_P_ARP) && 478 if (skb->protocol == htons(ETH_P_ARP) &&
475 atomic_read(&trapped)) { 479 atomic_read(&trapped)) {
476 skb_queue_tail(&npi->arp_tx, skb); 480 skb_queue_tail(&npi->arp_tx, skb);
@@ -532,9 +536,6 @@ int __netpoll_rx(struct sk_buff *skb)
532 return 1; 536 return 1;
533 537
534out: 538out:
535 /* If packet received while already in poll then just
536 * silently drop.
537 */
538 if (atomic_read(&trapped)) { 539 if (atomic_read(&trapped)) {
539 kfree_skb(skb); 540 kfree_skb(skb);
540 return 1; 541 return 1;
@@ -673,6 +674,7 @@ int netpoll_setup(struct netpoll *np)
673 goto release; 674 goto release;
674 } 675 }
675 676
677 npinfo->rx_flags = 0;
676 npinfo->rx_np = NULL; 678 npinfo->rx_np = NULL;
677 679
678 spin_lock_init(&npinfo->rx_lock); 680 spin_lock_init(&npinfo->rx_lock);
@@ -754,6 +756,7 @@ int netpoll_setup(struct netpoll *np)
754 756
755 if (np->rx_hook) { 757 if (np->rx_hook) {
756 spin_lock_irqsave(&npinfo->rx_lock, flags); 758 spin_lock_irqsave(&npinfo->rx_lock, flags);
759 npinfo->rx_flags |= NETPOLL_RX_ENABLED;
757 npinfo->rx_np = np; 760 npinfo->rx_np = np;
758 spin_unlock_irqrestore(&npinfo->rx_lock, flags); 761 spin_unlock_irqrestore(&npinfo->rx_lock, flags);
759 } 762 }
@@ -795,6 +798,7 @@ void netpoll_cleanup(struct netpoll *np)
795 if (npinfo->rx_np == np) { 798 if (npinfo->rx_np == np) {
796 spin_lock_irqsave(&npinfo->rx_lock, flags); 799 spin_lock_irqsave(&npinfo->rx_lock, flags);
797 npinfo->rx_np = NULL; 800 npinfo->rx_np = NULL;
801 npinfo->rx_flags &= ~NETPOLL_RX_ENABLED;
798 spin_unlock_irqrestore(&npinfo->rx_lock, flags); 802 spin_unlock_irqrestore(&npinfo->rx_lock, flags);
799 } 803 }
800 804
diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
index efe3832c4ad8..5098fd2ff4d0 100644
--- a/net/ipv4/Kconfig
+++ b/net/ipv4/Kconfig
@@ -343,7 +343,7 @@ config INET_ESP
343 tristate "IP: ESP transformation" 343 tristate "IP: ESP transformation"
344 select XFRM 344 select XFRM
345 select CRYPTO 345 select CRYPTO
346 select CRYPTO_AEAD 346 select CRYPTO_AUTHENC
347 select CRYPTO_HMAC 347 select CRYPTO_HMAC
348 select CRYPTO_MD5 348 select CRYPTO_MD5
349 select CRYPTO_CBC 349 select CRYPTO_CBC
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index f84041d1f623..4afce0572806 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -750,9 +750,9 @@ static void __init ic_bootp_send_if(struct ic_device *d, unsigned long jiffies_d
750 printk("Unknown ARP type 0x%04x for device %s\n", dev->type, dev->name); 750 printk("Unknown ARP type 0x%04x for device %s\n", dev->type, dev->name);
751 b->htype = dev->type; /* can cause undefined behavior */ 751 b->htype = dev->type; /* can cause undefined behavior */
752 } 752 }
753
754 /* server_ip and your_ip address are both already zero per RFC2131 */
753 b->hlen = dev->addr_len; 755 b->hlen = dev->addr_len;
754 b->your_ip = NONE;
755 b->server_ip = NONE;
756 memcpy(b->hw_addr, dev->dev_addr, dev->addr_len); 756 memcpy(b->hw_addr, dev->dev_addr, dev->addr_len);
757 b->secs = htons(jiffies_diff / HZ); 757 b->secs = htons(jiffies_diff / HZ);
758 b->xid = d->xid; 758 b->xid = d->xid;
diff --git a/net/ipv4/tcp_bic.c b/net/ipv4/tcp_bic.c
index 5212ed9b0c98..7eb7636db0d0 100644
--- a/net/ipv4/tcp_bic.c
+++ b/net/ipv4/tcp_bic.c
@@ -1,12 +1,13 @@
1/* 1/*
2 * Binary Increase Congestion control for TCP 2 * Binary Increase Congestion control for TCP
3 * 3 * Home page:
4 * http://netsrv.csc.ncsu.edu/twiki/bin/view/Main/BIC
4 * This is from the implementation of BICTCP in 5 * This is from the implementation of BICTCP in
5 * Lison-Xu, Kahaled Harfoush, and Injong Rhee. 6 * Lison-Xu, Kahaled Harfoush, and Injong Rhee.
6 * "Binary Increase Congestion Control for Fast, Long Distance 7 * "Binary Increase Congestion Control for Fast, Long Distance
7 * Networks" in InfoComm 2004 8 * Networks" in InfoComm 2004
8 * Available from: 9 * Available from:
9 * http://www.csc.ncsu.edu/faculty/rhee/export/bitcp.pdf 10 * http://netsrv.csc.ncsu.edu/export/bitcp.pdf
10 * 11 *
11 * Unless BIC is enabled and congestion window is large 12 * Unless BIC is enabled and congestion window is large
12 * this behaves the same as the original Reno. 13 * this behaves the same as the original Reno.
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 93e128c239c4..c4679f343675 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,
1367 * a normal way 1367 * a normal way
1368 */ 1368 */
1369static struct sk_buff *tcp_sacktag_skip(struct sk_buff *skb, struct sock *sk, 1369static struct sk_buff *tcp_sacktag_skip(struct sk_buff *skb, struct sock *sk,
1370 u32 skip_to_seq) 1370 u32 skip_to_seq, int *fack_count)
1371{ 1371{
1372 tcp_for_write_queue_from(skb, sk) { 1372 tcp_for_write_queue_from(skb, sk) {
1373 if (skb == tcp_send_head(sk)) 1373 if (skb == tcp_send_head(sk))
@@ -1375,6 +1375,8 @@ static struct sk_buff *tcp_sacktag_skip(struct sk_buff *skb, struct sock *sk,
1375 1375
1376 if (!before(TCP_SKB_CB(skb)->end_seq, skip_to_seq)) 1376 if (!before(TCP_SKB_CB(skb)->end_seq, skip_to_seq))
1377 break; 1377 break;
1378
1379 *fack_count += tcp_skb_pcount(skb);
1378 } 1380 }
1379 return skb; 1381 return skb;
1380} 1382}
@@ -1390,7 +1392,7 @@ static struct sk_buff *tcp_maybe_skipping_dsack(struct sk_buff *skb,
1390 return skb; 1392 return skb;
1391 1393
1392 if (before(next_dup->start_seq, skip_to_seq)) { 1394 if (before(next_dup->start_seq, skip_to_seq)) {
1393 skb = tcp_sacktag_skip(skb, sk, next_dup->start_seq); 1395 skb = tcp_sacktag_skip(skb, sk, next_dup->start_seq, fack_count);
1394 tcp_sacktag_walk(skb, sk, NULL, 1396 tcp_sacktag_walk(skb, sk, NULL,
1395 next_dup->start_seq, next_dup->end_seq, 1397 next_dup->start_seq, next_dup->end_seq,
1396 1, fack_count, reord, flag); 1398 1, fack_count, reord, flag);
@@ -1537,7 +1539,8 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb,
1537 1539
1538 /* Head todo? */ 1540 /* Head todo? */
1539 if (before(start_seq, cache->start_seq)) { 1541 if (before(start_seq, cache->start_seq)) {
1540 skb = tcp_sacktag_skip(skb, sk, start_seq); 1542 skb = tcp_sacktag_skip(skb, sk, start_seq,
1543 &fack_count);
1541 skb = tcp_sacktag_walk(skb, sk, next_dup, 1544 skb = tcp_sacktag_walk(skb, sk, next_dup,
1542 start_seq, 1545 start_seq,
1543 cache->start_seq, 1546 cache->start_seq,
@@ -1565,7 +1568,8 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb,
1565 goto walk; 1568 goto walk;
1566 } 1569 }
1567 1570
1568 skb = tcp_sacktag_skip(skb, sk, cache->end_seq); 1571 skb = tcp_sacktag_skip(skb, sk, cache->end_seq,
1572 &fack_count);
1569 /* Check overlap against next cached too (past this one already) */ 1573 /* Check overlap against next cached too (past this one already) */
1570 cache++; 1574 cache++;
1571 continue; 1575 continue;
@@ -1577,7 +1581,7 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb,
1577 break; 1581 break;
1578 fack_count = tp->fackets_out; 1582 fack_count = tp->fackets_out;
1579 } 1583 }
1580 skb = tcp_sacktag_skip(skb, sk, start_seq); 1584 skb = tcp_sacktag_skip(skb, sk, start_seq, &fack_count);
1581 1585
1582walk: 1586walk:
1583 skb = tcp_sacktag_walk(skb, sk, next_dup, start_seq, end_seq, 1587 skb = tcp_sacktag_walk(skb, sk, next_dup, start_seq, end_seq,
diff --git a/net/ipv6/Kconfig b/net/ipv6/Kconfig
index 3ffb0323668c..58219dfffef8 100644
--- a/net/ipv6/Kconfig
+++ b/net/ipv6/Kconfig
@@ -85,7 +85,7 @@ config INET6_ESP
85 depends on IPV6 85 depends on IPV6
86 select XFRM 86 select XFRM
87 select CRYPTO 87 select CRYPTO
88 select CRYPTO_AEAD 88 select CRYPTO_AUTHENC
89 select CRYPTO_HMAC 89 select CRYPTO_HMAC
90 select CRYPTO_MD5 90 select CRYPTO_MD5
91 select CRYPTO_CBC 91 select CRYPTO_CBC
diff --git a/net/irda/ircomm/ircomm_core.c b/net/irda/ircomm/ircomm_core.c
index b825399fc160..6eef1f2a7553 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)
76 76
77#ifdef CONFIG_PROC_FS 77#ifdef CONFIG_PROC_FS
78 { struct proc_dir_entry *ent; 78 { struct proc_dir_entry *ent;
79 ent = create_proc_entry("ircomm", 0, proc_irda); 79 ent = proc_create("ircomm", 0, proc_irda, &ircomm_proc_fops);
80 if (ent) 80 if (!ent) {
81 ent->proc_fops = &ircomm_proc_fops; 81 printk(KERN_ERR "ircomm_init: can't create /proc entry!\n");
82 return -ENODEV;
83 }
82 } 84 }
83#endif /* CONFIG_PROC_FS */ 85#endif /* CONFIG_PROC_FS */
84 86
diff --git a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c
index a4b56e25a917..1eb4bbcb1c9e 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)
128 128
129#ifdef CONFIG_PROC_FS 129#ifdef CONFIG_PROC_FS
130 { struct proc_dir_entry *proc; 130 { struct proc_dir_entry *proc;
131 proc = create_proc_entry("irlan", 0, proc_irda); 131 proc = proc_create("irlan", 0, proc_irda, &irlan_fops);
132 if (!proc) { 132 if (!proc) {
133 printk(KERN_ERR "irlan_init: can't create /proc entry!\n"); 133 printk(KERN_ERR "irlan_init: can't create /proc entry!\n");
134 return -ENODEV; 134 return -ENODEV;
135 } 135 }
136
137 proc->proc_fops = &irlan_fops;
138 } 136 }
139#endif /* CONFIG_PROC_FS */ 137#endif /* CONFIG_PROC_FS */
140 138
diff --git a/net/irda/irproc.c b/net/irda/irproc.c
index cae24fbda966..88e80a312732 100644
--- a/net/irda/irproc.c
+++ b/net/irda/irproc.c
@@ -72,11 +72,9 @@ void __init irda_proc_register(void)
72 return; 72 return;
73 proc_irda->owner = THIS_MODULE; 73 proc_irda->owner = THIS_MODULE;
74 74
75 for (i=0; i<ARRAY_SIZE(irda_dirs); i++) { 75 for (i = 0; i < ARRAY_SIZE(irda_dirs); i++)
76 d = create_proc_entry(irda_dirs[i].name, 0, proc_irda); 76 d = proc_create(irda_dirs[i].name, 0, proc_irda,
77 if (d) 77 irda_dirs[i].fops);
78 d->proc_fops = irda_dirs[i].fops;
79 }
80} 78}
81 79
82/* 80/*
diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c
index 2753b0c448f3..d764f4c1b7e4 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])
621 return iucv_call_b2f0(IUCV_SEVER, parm); 621 return iucv_call_b2f0(IUCV_SEVER, parm);
622} 622}
623 623
624#ifdef CONFIG_SMP
625/** 624/**
626 * __iucv_cleanup_queue 625 * __iucv_cleanup_queue
627 * @dummy: unused dummy argument 626 * @dummy: unused dummy argument
@@ -632,7 +631,6 @@ static int iucv_sever_pathid(u16 pathid, u8 userdata[16])
632static void __iucv_cleanup_queue(void *dummy) 631static void __iucv_cleanup_queue(void *dummy)
633{ 632{
634} 633}
635#endif
636 634
637/** 635/**
638 * iucv_cleanup_queue 636 * iucv_cleanup_queue
diff --git a/net/sctp/proc.c b/net/sctp/proc.c
index b99bb6bda5d5..ddca90e5e3a5 100644
--- a/net/sctp/proc.c
+++ b/net/sctp/proc.c
@@ -256,12 +256,10 @@ int __init sctp_eps_proc_init(void)
256{ 256{
257 struct proc_dir_entry *p; 257 struct proc_dir_entry *p;
258 258
259 p = create_proc_entry("eps", S_IRUGO, proc_net_sctp); 259 p = proc_create("eps", S_IRUGO, proc_net_sctp, &sctp_eps_seq_fops);
260 if (!p) 260 if (!p)
261 return -ENOMEM; 261 return -ENOMEM;
262 262
263 p->proc_fops = &sctp_eps_seq_fops;
264
265 return 0; 263 return 0;
266} 264}
267 265
@@ -375,12 +373,11 @@ int __init sctp_assocs_proc_init(void)
375{ 373{
376 struct proc_dir_entry *p; 374 struct proc_dir_entry *p;
377 375
378 p = create_proc_entry("assocs", S_IRUGO, proc_net_sctp); 376 p = proc_create("assocs", S_IRUGO, proc_net_sctp,
377 &sctp_assocs_seq_fops);
379 if (!p) 378 if (!p)
380 return -ENOMEM; 379 return -ENOMEM;
381 380
382 p->proc_fops = &sctp_assocs_seq_fops;
383
384 return 0; 381 return 0;
385} 382}
386 383