From 3e414096429d55fbc8116171bba3487647bbe638 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Mon, 3 Jul 2000 21:46:06 +0000 Subject: Merge with Linux 2.4.0-test3-pre2. --- net/ax25/af_ax25.c | 2 +- net/ax25/ax25_in.c | 2 +- net/ax25/ax25_out.c | 2 +- net/ax25/ax25_route.c | 2 +- net/core/neighbour.c | 5 ----- net/decnet/dn_dev.c | 1 - net/ipv4/tcp_timer.c | 4 ---- net/netrom/nr_route.c | 4 ++-- net/netsyms.c | 2 +- net/sunrpc/svcsock.c | 11 +++++++++++ net/unix/af_unix.c | 2 +- 11 files changed, 19 insertions(+), 18 deletions(-) (limited to 'net') diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index d99065efe..57718cf00 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c @@ -964,7 +964,7 @@ struct sock *ax25_make_new(struct sock *osk, struct ax25_dev *ax25_dev) return NULL; } - *ax25->digipeat = *osk->protinfo.ax25->digipeat; + memcpy(ax25->digipeat, osk->protinfo.ax25->digipeat, sizeof(ax25_digi)); } sk->protinfo.ax25 = ax25; diff --git a/net/ax25/ax25_in.c b/net/ax25/ax25_in.c index f4b5e1a75..6efbc57f2 100644 --- a/net/ax25/ax25_in.c +++ b/net/ax25/ax25_in.c @@ -426,7 +426,7 @@ static int ax25_rcv(struct sk_buff *skb, struct net_device *dev, ax25_address *d } } else { /* Reverse the source SABM's path */ - *ax25->digipeat = reverse_dp; + memcpy(&ax25->digipeat, &reverse_dp, sizeof(ax25_digi)); } if ((*skb->data & ~AX25_PF) == AX25_SABME) { diff --git a/net/ax25/ax25_out.c b/net/ax25/ax25_out.c index 719059b21..e6b19f53b 100644 --- a/net/ax25/ax25_out.c +++ b/net/ax25/ax25_out.c @@ -98,7 +98,7 @@ ax25_cb *ax25_send_frame(struct sk_buff *skb, int paclen, ax25_address *src, ax2 ax25_free_cb(ax25); return NULL; } - *ax25->digipeat = *digi; + memcpy(ax25->digipeat, digi, sizeof(ax25_digi)); } switch (ax25->ax25_dev->values[AX25_VALUES_PROTOCOL]) { diff --git a/net/ax25/ax25_route.c b/net/ax25/ax25_route.c index e92a1b39e..6d58c5d04 100644 --- a/net/ax25/ax25_route.c +++ b/net/ax25/ax25_route.c @@ -373,7 +373,7 @@ int ax25_rt_autobind(ax25_cb *ax25, ax25_address *addr) if (ax25_rt->digipeat != NULL) { if ((ax25->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) return -ENOMEM; - *ax25->digipeat = *ax25_rt->digipeat; + memcpy(ax25->digipeat, ax25_rt->digipeat, sizeof(ax25_digi)); ax25_adjust_path(addr, ax25->digipeat); } diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 5a3ccd062..88322c8d6 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -603,8 +603,6 @@ static void neigh_periodic_timer(unsigned long arg) struct neigh_table *tbl = (struct neigh_table*)arg; tasklet_schedule(&tbl->gc_task); - - timer_exit(&tbl->gc_timer); } #endif @@ -676,7 +674,6 @@ static void neigh_timer_handler(unsigned long arg) neigh->ops->solicit(neigh, skb_peek(&neigh->arp_queue)); atomic_inc(&neigh->probes); - timer_exit(&neigh->timer); return; out: @@ -685,7 +682,6 @@ out: if (notify && neigh->parms->app_probes) neigh_app_notify(neigh); #endif - timer_exit(&neigh->timer); neigh_release(neigh); } @@ -1021,7 +1017,6 @@ static void neigh_proxy_process(unsigned long arg) tbl->proxy_timer.expires = jiffies + sched_next; add_timer(&tbl->proxy_timer); } - timer_exit(&tbl->proxy_timer); } void pneigh_enqueue(struct neigh_table *tbl, struct neigh_parms *p, diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c index 3ab33c220..bc9e2cb48 100644 --- a/net/decnet/dn_dev.c +++ b/net/decnet/dn_dev.c @@ -911,7 +911,6 @@ static void dn_dev_timer_func(unsigned long arg) } dn_dev_set_timer(dev); - timer_exit(&dn_db->timer); } static void dn_dev_set_timer(struct net_device *dev) diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index 1f52d293d..de4722707 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c @@ -241,7 +241,6 @@ static void tcp_delack_timer(unsigned long data) TCP_CHECK_TIMER(sk); out_unlock: - timer_exit(&tp->delack_timer); bh_unlock_sock(sk); sock_put(sk); } @@ -299,7 +298,6 @@ static void tcp_probe_timer(unsigned long data) TCP_CHECK_TIMER(sk); } out_unlock: - timer_exit(&tp->probe_timer); bh_unlock_sock(sk); sock_put(sk); } @@ -611,7 +609,6 @@ static void tcp_retransmit_timer(unsigned long data) TCP_CHECK_TIMER(sk); out_unlock: - timer_exit(&tp->retransmit_timer); bh_unlock_sock(sk); sock_put(sk); } @@ -806,7 +803,6 @@ death: tcp_done(sk); out: - timer_exit(&sk->timer); bh_unlock_sock(sk); sock_put(sk); } diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c index fd36a887e..308e73af2 100644 --- a/net/netrom/nr_route.c +++ b/net/netrom/nr_route.c @@ -122,7 +122,7 @@ static int nr_add_node(ax25_address *nr, const char *mnemonic, ax25_address *ax2 kfree(nr_neigh); return -ENOMEM; } - *nr_neigh->digipeat = *ax25_digi; + memcpy(nr_neigh->digipeat, ax25_digi, sizeof(ax25_digi)); } save_flags(flags); @@ -402,7 +402,7 @@ static int nr_add_neigh(ax25_address *callsign, ax25_digi *ax25_digi, struct net kfree(nr_neigh); return -ENOMEM; } - *nr_neigh->digipeat = *ax25_digi; + memcpy(nr_neigh->digipeat, ax25_digi, sizeof(ax25_digi)); } save_flags(flags); diff --git a/net/netsyms.c b/net/netsyms.c index c209ff991..cd4a2bdb9 100644 --- a/net/netsyms.c +++ b/net/netsyms.c @@ -196,7 +196,7 @@ EXPORT_SYMBOL(__scm_send); /* Needed by unix.o */ EXPORT_SYMBOL(scm_fp_dup); -EXPORT_SYMBOL(max_files); +EXPORT_SYMBOL(files_stat); EXPORT_SYMBOL(memcpy_toiovec); EXPORT_SYMBOL(csum_partial); diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index e0a13d725..f0f714ff0 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -371,6 +372,16 @@ svc_udp_recvfrom(struct svc_rqst *rqstp) dprintk("svc: recvfrom returned error %d\n", -err); } + if (skb->ip_summed != CHECKSUM_UNNECESSARY) { + unsigned int csum = skb->csum; + csum = csum_partial(skb->h.raw, skb->len, csum); + if ((unsigned short)csum_fold(csum)) { + skb_free_datagram(svsk->sk_sk, skb); + svc_sock_received(svsk, 0); + return 0; + } + } + /* There may be more data */ svsk->sk_data = 1; diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index d71a527fe..20e0fc8c7 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -445,7 +445,7 @@ static struct sock * unix_create1(struct socket *sock) { struct sock *sk; - if (atomic_read(&unix_nr_socks) >= 2*max_files) + if (atomic_read(&unix_nr_socks) >= 2*files_stat.max_files) return NULL; MOD_INC_USE_COUNT; -- cgit v1.2.3