aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-03-24 01:54:03 -0400
committerDavid S. Miller <davem@davemloft.net>2008-03-24 01:54:03 -0400
commit06802a819a0a2d31c952c0624cea6cd00e4e50da (patch)
tree8ccd7c668c7fbd8f08cb89426006040217caf3f1 /net
parent9bd512f619cc116b7830134d7c9f6e404a38c7bf (diff)
parent8f3ea33a5078a09eba12bfe57424507809367756 (diff)
Merge branch 'master' of ../net-2.6/
Conflicts: net/ipv6/ndisc.c
Diffstat (limited to 'net')
-rw-r--r--net/9p/trans_fd.c2
-rw-r--r--net/atm/clip.c19
-rw-r--r--net/atm/lec.c4
-rw-r--r--net/ipv4/fib_trie.c7
-rw-r--r--net/ipv4/ip_fragment.c2
-rw-r--r--net/ipv4/tcp.c4
-rw-r--r--net/sched/sch_htb.c13
-rw-r--r--net/socket.c7
8 files changed, 38 insertions, 20 deletions
diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
index 1aa9d5175398..4e8d4e724b96 100644
--- a/net/9p/trans_fd.c
+++ b/net/9p/trans_fd.c
@@ -861,7 +861,6 @@ static void p9_mux_free_request(struct p9_conn *m, struct p9_req *req)
861 861
862static void p9_mux_flush_cb(struct p9_req *freq, void *a) 862static void p9_mux_flush_cb(struct p9_req *freq, void *a)
863{ 863{
864 p9_conn_req_callback cb;
865 int tag; 864 int tag;
866 struct p9_conn *m; 865 struct p9_conn *m;
867 struct p9_req *req, *rreq, *rptr; 866 struct p9_req *req, *rreq, *rptr;
@@ -872,7 +871,6 @@ static void p9_mux_flush_cb(struct p9_req *freq, void *a)
872 freq->tcall->params.tflush.oldtag); 871 freq->tcall->params.tflush.oldtag);
873 872
874 spin_lock(&m->lock); 873 spin_lock(&m->lock);
875 cb = NULL;
876 tag = freq->tcall->params.tflush.oldtag; 874 tag = freq->tcall->params.tflush.oldtag;
877 req = NULL; 875 req = NULL;
878 list_for_each_entry_safe(rreq, rptr, &m->req_list, req_list) { 876 list_for_each_entry_safe(rreq, rptr, &m->req_list, req_list) {
diff --git a/net/atm/clip.c b/net/atm/clip.c
index d45971bd286c..e82da6746723 100644
--- a/net/atm/clip.c
+++ b/net/atm/clip.c
@@ -943,6 +943,8 @@ static const struct file_operations arp_seq_fops = {
943}; 943};
944#endif 944#endif
945 945
946static void atm_clip_exit_noproc(void);
947
946static int __init atm_clip_init(void) 948static int __init atm_clip_init(void)
947{ 949{
948 neigh_table_init_no_netlink(&clip_tbl); 950 neigh_table_init_no_netlink(&clip_tbl);
@@ -959,18 +961,22 @@ static int __init atm_clip_init(void)
959 struct proc_dir_entry *p; 961 struct proc_dir_entry *p;
960 962
961 p = proc_create("arp", S_IRUGO, atm_proc_root, &arp_seq_fops); 963 p = proc_create("arp", S_IRUGO, atm_proc_root, &arp_seq_fops);
964 if (!p) {
965 printk(KERN_ERR "Unable to initialize "
966 "/proc/net/atm/arp\n");
967 atm_clip_exit_noproc();
968 return -ENOMEM;
969 }
962 } 970 }
963#endif 971#endif
964 972
965 return 0; 973 return 0;
966} 974}
967 975
968static void __exit atm_clip_exit(void) 976static void atm_clip_exit_noproc(void)
969{ 977{
970 struct net_device *dev, *next; 978 struct net_device *dev, *next;
971 979
972 remove_proc_entry("arp", atm_proc_root);
973
974 unregister_inetaddr_notifier(&clip_inet_notifier); 980 unregister_inetaddr_notifier(&clip_inet_notifier);
975 unregister_netdevice_notifier(&clip_dev_notifier); 981 unregister_netdevice_notifier(&clip_dev_notifier);
976 982
@@ -1001,6 +1007,13 @@ static void __exit atm_clip_exit(void)
1001 clip_tbl_hook = NULL; 1007 clip_tbl_hook = NULL;
1002} 1008}
1003 1009
1010static void __exit atm_clip_exit(void)
1011{
1012 remove_proc_entry("arp", atm_proc_root);
1013
1014 atm_clip_exit_noproc();
1015}
1016
1004module_init(atm_clip_init); 1017module_init(atm_clip_init);
1005module_exit(atm_clip_exit); 1018module_exit(atm_clip_exit);
1006MODULE_AUTHOR("Werner Almesberger"); 1019MODULE_AUTHOR("Werner Almesberger");
diff --git a/net/atm/lec.c b/net/atm/lec.c
index e2d800d818e3..aa3785ebf6d1 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -1225,6 +1225,10 @@ static int __init lane_module_init(void)
1225 struct proc_dir_entry *p; 1225 struct proc_dir_entry *p;
1226 1226
1227 p = proc_create("lec", S_IRUGO, atm_proc_root, &lec_seq_fops); 1227 p = proc_create("lec", S_IRUGO, atm_proc_root, &lec_seq_fops);
1228 if (!p) {
1229 printk(KERN_ERR "Unable to initialize /proc/net/atm/lec\n");
1230 return -ENOMEM;
1231 }
1228#endif 1232#endif
1229 1233
1230 register_atm_ioctl(&lane_ioctl_ops); 1234 register_atm_ioctl(&lane_ioctl_ops);
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index a7d089eb042e..ce6cb34e28e1 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -177,10 +177,13 @@ static inline struct tnode *node_parent_rcu(struct node *node)
177 return rcu_dereference(ret); 177 return rcu_dereference(ret);
178} 178}
179 179
180/* Same as rcu_assign_pointer
181 * but that macro() assumes that value is a pointer.
182 */
180static inline void node_set_parent(struct node *node, struct tnode *ptr) 183static inline void node_set_parent(struct node *node, struct tnode *ptr)
181{ 184{
182 rcu_assign_pointer(node->parent, 185 smp_wmb();
183 (unsigned long)ptr | NODE_TYPE(node)); 186 node->parent = (unsigned long)ptr | NODE_TYPE(node);
184} 187}
185 188
186static inline struct node *tnode_get_child(struct tnode *tn, unsigned int i) 189static inline struct node *tnode_get_child(struct tnode *tn, unsigned int i)
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
index a2e92f9709db..3b2e5adca838 100644
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -568,7 +568,7 @@ int ip_defrag(struct sk_buff *skb, u32 user)
568 568
569 IP_INC_STATS_BH(IPSTATS_MIB_REASMREQDS); 569 IP_INC_STATS_BH(IPSTATS_MIB_REASMREQDS);
570 570
571 net = skb->dev->nd_net; 571 net = skb->dev ? skb->dev->nd_net : skb->dst->dev->nd_net;
572 /* Start by cleaning up the memory. */ 572 /* Start by cleaning up the memory. */
573 if (atomic_read(&net->ipv4.frags.mem) > net->ipv4.frags.high_thresh) 573 if (atomic_read(&net->ipv4.frags.mem) > net->ipv4.frags.high_thresh)
574 ip_evictor(net); 574 ip_evictor(net);
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index e0fbc25ca816..58ac838bf460 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -735,7 +735,7 @@ new_segment:
735 if (!(psize -= copy)) 735 if (!(psize -= copy))
736 goto out; 736 goto out;
737 737
738 if (skb->len < mss_now || (flags & MSG_OOB)) 738 if (skb->len < size_goal || (flags & MSG_OOB))
739 continue; 739 continue;
740 740
741 if (forced_push(tp)) { 741 if (forced_push(tp)) {
@@ -981,7 +981,7 @@ new_segment:
981 if ((seglen -= copy) == 0 && iovlen == 0) 981 if ((seglen -= copy) == 0 && iovlen == 0)
982 goto out; 982 goto out;
983 983
984 if (skb->len < mss_now || (flags & MSG_OOB)) 984 if (skb->len < size_goal || (flags & MSG_OOB))
985 continue; 985 continue;
986 986
987 if (forced_push(tp)) { 987 if (forced_push(tp)) {
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 795c761ad99f..66148cc4759e 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -711,9 +711,11 @@ static void htb_charge_class(struct htb_sched *q, struct htb_class *cl,
711 */ 711 */
712static psched_time_t htb_do_events(struct htb_sched *q, int level) 712static psched_time_t htb_do_events(struct htb_sched *q, int level)
713{ 713{
714 int i; 714 /* don't run for longer than 2 jiffies; 2 is used instead of
715 715 1 to simplify things when jiffy is going to be incremented
716 for (i = 0; i < 500; i++) { 716 too soon */
717 unsigned long stop_at = jiffies + 2;
718 while (time_before(jiffies, stop_at)) {
717 struct htb_class *cl; 719 struct htb_class *cl;
718 long diff; 720 long diff;
719 struct rb_node *p = rb_first(&q->wait_pq[level]); 721 struct rb_node *p = rb_first(&q->wait_pq[level]);
@@ -731,9 +733,8 @@ static psched_time_t htb_do_events(struct htb_sched *q, int level)
731 if (cl->cmode != HTB_CAN_SEND) 733 if (cl->cmode != HTB_CAN_SEND)
732 htb_add_to_wait_tree(q, cl, diff); 734 htb_add_to_wait_tree(q, cl, diff);
733 } 735 }
734 if (net_ratelimit()) 736 /* too much load - let's continue on next jiffie */
735 printk(KERN_WARNING "htb: too many events !\n"); 737 return q->now + PSCHED_TICKS_PER_SEC / HZ;
736 return q->now + PSCHED_TICKS_PER_SEC / 10;
737} 738}
738 739
739/* Returns class->node+prio from id-tree where classe's id is >= id. NULL 740/* Returns class->node+prio from id-tree where classe's id is >= id. NULL
diff --git a/net/socket.c b/net/socket.c
index b6d35cd72a50..9d3fbfbc8535 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -909,11 +909,10 @@ static long sock_ioctl(struct file *file, unsigned cmd, unsigned long arg)
909 if (!dlci_ioctl_hook) 909 if (!dlci_ioctl_hook)
910 request_module("dlci"); 910 request_module("dlci");
911 911
912 if (dlci_ioctl_hook) { 912 mutex_lock(&dlci_ioctl_mutex);
913 mutex_lock(&dlci_ioctl_mutex); 913 if (dlci_ioctl_hook)
914 err = dlci_ioctl_hook(cmd, argp); 914 err = dlci_ioctl_hook(cmd, argp);
915 mutex_unlock(&dlci_ioctl_mutex); 915 mutex_unlock(&dlci_ioctl_mutex);
916 }
917 break; 916 break;
918 default: 917 default:
919 err = sock->ops->ioctl(sock, cmd, arg); 918 err = sock->ops->ioctl(sock, cmd, arg);