diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/Kconfig | 2 | ||||
-rw-r--r-- | net/atm/clip.c | 2 | ||||
-rw-r--r-- | net/bridge/br_stp_bpdu.c | 2 | ||||
-rw-r--r-- | net/core/neighbour.c | 3 | ||||
-rw-r--r-- | net/ipv4/fib_trie.c | 8 | ||||
-rw-r--r-- | net/ipv4/ipvs/ip_vs_ftp.c | 27 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_lp.c | 35 | ||||
-rw-r--r-- | net/ipv6/datagram.c | 2 | ||||
-rw-r--r-- | net/ipv6/icmp.c | 4 | ||||
-rw-r--r-- | net/ipv6/ipv6_sockglue.c | 4 | ||||
-rw-r--r-- | net/ipv6/raw.c | 2 | ||||
-rw-r--r-- | net/netfilter/xt_quota.c | 2 | ||||
-rw-r--r-- | net/packet/af_packet.c | 4 | ||||
-rw-r--r-- | net/sched/sch_generic.c | 2 |
15 files changed, 56 insertions, 45 deletions
diff --git a/net/Kconfig b/net/Kconfig index c6cec5aa5486..4959a4e1e0fe 100644 --- a/net/Kconfig +++ b/net/Kconfig | |||
@@ -177,7 +177,7 @@ source "net/lapb/Kconfig" | |||
177 | 177 | ||
178 | config NET_DIVERT | 178 | config NET_DIVERT |
179 | bool "Frame Diverter (EXPERIMENTAL)" | 179 | bool "Frame Diverter (EXPERIMENTAL)" |
180 | depends on EXPERIMENTAL | 180 | depends on EXPERIMENTAL && BROKEN |
181 | ---help--- | 181 | ---help--- |
182 | The Frame Diverter allows you to divert packets from the | 182 | The Frame Diverter allows you to divert packets from the |
183 | network, that are not aimed at the interface receiving it (in | 183 | network, that are not aimed at the interface receiving it (in |
diff --git a/net/atm/clip.c b/net/atm/clip.c index 7ce7bfe3fbad..7af2c411da82 100644 --- a/net/atm/clip.c +++ b/net/atm/clip.c | |||
@@ -500,9 +500,11 @@ static int clip_mkip(struct atm_vcc *vcc, int timeout) | |||
500 | } else { | 500 | } else { |
501 | unsigned int len = skb->len; | 501 | unsigned int len = skb->len; |
502 | 502 | ||
503 | skb_get(skb); | ||
503 | clip_push(vcc, skb); | 504 | clip_push(vcc, skb); |
504 | PRIV(skb->dev)->stats.rx_packets--; | 505 | PRIV(skb->dev)->stats.rx_packets--; |
505 | PRIV(skb->dev)->stats.rx_bytes -= len; | 506 | PRIV(skb->dev)->stats.rx_bytes -= len; |
507 | kfree_skb(skb); | ||
506 | } | 508 | } |
507 | return 0; | 509 | return 0; |
508 | } | 510 | } |
diff --git a/net/bridge/br_stp_bpdu.c b/net/bridge/br_stp_bpdu.c index a7ba0cce0b46..068d8afbf0a7 100644 --- a/net/bridge/br_stp_bpdu.c +++ b/net/bridge/br_stp_bpdu.c | |||
@@ -121,7 +121,7 @@ void br_send_tcn_bpdu(struct net_bridge_port *p) | |||
121 | buf[1] = 0; | 121 | buf[1] = 0; |
122 | buf[2] = 0; | 122 | buf[2] = 0; |
123 | buf[3] = BPDU_TYPE_TCN; | 123 | buf[3] = BPDU_TYPE_TCN; |
124 | br_send_bpdu(p, buf, 7); | 124 | br_send_bpdu(p, buf, 4); |
125 | } | 125 | } |
126 | 126 | ||
127 | /* | 127 | /* |
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 5130d2efdbbe..fe2113f54e2b 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -1432,6 +1432,9 @@ int neigh_table_clear(struct neigh_table *tbl) | |||
1432 | kfree(tbl->phash_buckets); | 1432 | kfree(tbl->phash_buckets); |
1433 | tbl->phash_buckets = NULL; | 1433 | tbl->phash_buckets = NULL; |
1434 | 1434 | ||
1435 | free_percpu(tbl->stats); | ||
1436 | tbl->stats = NULL; | ||
1437 | |||
1435 | return 0; | 1438 | return 0; |
1436 | } | 1439 | } |
1437 | 1440 | ||
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 23fb9d9768e3..01801c0f885d 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
@@ -1281,18 +1281,18 @@ static inline int check_leaf(struct trie *t, struct leaf *l, | |||
1281 | struct fib_result *res) | 1281 | struct fib_result *res) |
1282 | { | 1282 | { |
1283 | int err, i; | 1283 | int err, i; |
1284 | t_key mask; | 1284 | __be32 mask; |
1285 | struct leaf_info *li; | 1285 | struct leaf_info *li; |
1286 | struct hlist_head *hhead = &l->list; | 1286 | struct hlist_head *hhead = &l->list; |
1287 | struct hlist_node *node; | 1287 | struct hlist_node *node; |
1288 | 1288 | ||
1289 | hlist_for_each_entry_rcu(li, node, hhead, hlist) { | 1289 | hlist_for_each_entry_rcu(li, node, hhead, hlist) { |
1290 | i = li->plen; | 1290 | i = li->plen; |
1291 | mask = ntohl(inet_make_mask(i)); | 1291 | mask = inet_make_mask(i); |
1292 | if (l->key != (key & mask)) | 1292 | if (l->key != (key & ntohl(mask))) |
1293 | continue; | 1293 | continue; |
1294 | 1294 | ||
1295 | if ((err = fib_semantic_match(&li->falh, flp, res, l->key, mask, i)) <= 0) { | 1295 | if ((err = fib_semantic_match(&li->falh, flp, res, htonl(l->key), mask, i)) <= 0) { |
1296 | *plen = i; | 1296 | *plen = i; |
1297 | #ifdef CONFIG_IP_FIB_TRIE_STATS | 1297 | #ifdef CONFIG_IP_FIB_TRIE_STATS |
1298 | t->stats.semantic_match_passed++; | 1298 | t->stats.semantic_match_passed++; |
diff --git a/net/ipv4/ipvs/ip_vs_ftp.c b/net/ipv4/ipvs/ip_vs_ftp.c index a19a33ceb811..37fafb1fbcff 100644 --- a/net/ipv4/ipvs/ip_vs_ftp.c +++ b/net/ipv4/ipvs/ip_vs_ftp.c | |||
@@ -46,14 +46,7 @@ | |||
46 | */ | 46 | */ |
47 | static int ports[IP_VS_APP_MAX_PORTS] = {21, 0}; | 47 | static int ports[IP_VS_APP_MAX_PORTS] = {21, 0}; |
48 | module_param_array(ports, int, NULL, 0); | 48 | module_param_array(ports, int, NULL, 0); |
49 | 49 | MODULE_PARM_DESC(ports, "Ports to monitor for FTP control commands"); | |
50 | /* | ||
51 | * Debug level | ||
52 | */ | ||
53 | #ifdef CONFIG_IP_VS_DEBUG | ||
54 | static int debug=0; | ||
55 | module_param(debug, int, 0); | ||
56 | #endif | ||
57 | 50 | ||
58 | 51 | ||
59 | /* Dummy variable */ | 52 | /* Dummy variable */ |
@@ -177,7 +170,7 @@ static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp, | |||
177 | &start, &end) != 1) | 170 | &start, &end) != 1) |
178 | return 1; | 171 | return 1; |
179 | 172 | ||
180 | IP_VS_DBG(1-debug, "PASV response (%u.%u.%u.%u:%d) -> " | 173 | IP_VS_DBG(7, "PASV response (%u.%u.%u.%u:%d) -> " |
181 | "%u.%u.%u.%u:%d detected\n", | 174 | "%u.%u.%u.%u:%d detected\n", |
182 | NIPQUAD(from), ntohs(port), NIPQUAD(cp->caddr), 0); | 175 | NIPQUAD(from), ntohs(port), NIPQUAD(cp->caddr), 0); |
183 | 176 | ||
@@ -280,7 +273,7 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp, | |||
280 | while (data <= data_limit - 6) { | 273 | while (data <= data_limit - 6) { |
281 | if (strnicmp(data, "PASV\r\n", 6) == 0) { | 274 | if (strnicmp(data, "PASV\r\n", 6) == 0) { |
282 | /* Passive mode on */ | 275 | /* Passive mode on */ |
283 | IP_VS_DBG(1-debug, "got PASV at %zd of %zd\n", | 276 | IP_VS_DBG(7, "got PASV at %zd of %zd\n", |
284 | data - data_start, | 277 | data - data_start, |
285 | data_limit - data_start); | 278 | data_limit - data_start); |
286 | cp->app_data = &ip_vs_ftp_pasv; | 279 | cp->app_data = &ip_vs_ftp_pasv; |
@@ -302,7 +295,7 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp, | |||
302 | &start, &end) != 1) | 295 | &start, &end) != 1) |
303 | return 1; | 296 | return 1; |
304 | 297 | ||
305 | IP_VS_DBG(1-debug, "PORT %u.%u.%u.%u:%d detected\n", | 298 | IP_VS_DBG(7, "PORT %u.%u.%u.%u:%d detected\n", |
306 | NIPQUAD(to), ntohs(port)); | 299 | NIPQUAD(to), ntohs(port)); |
307 | 300 | ||
308 | /* Passive mode off */ | 301 | /* Passive mode off */ |
@@ -311,7 +304,7 @@ static int ip_vs_ftp_in(struct ip_vs_app *app, struct ip_vs_conn *cp, | |||
311 | /* | 304 | /* |
312 | * Now update or create a connection entry for it | 305 | * Now update or create a connection entry for it |
313 | */ | 306 | */ |
314 | IP_VS_DBG(1-debug, "protocol %s %u.%u.%u.%u:%d %u.%u.%u.%u:%d\n", | 307 | IP_VS_DBG(7, "protocol %s %u.%u.%u.%u:%d %u.%u.%u.%u:%d\n", |
315 | ip_vs_proto_name(iph->protocol), | 308 | ip_vs_proto_name(iph->protocol), |
316 | NIPQUAD(to), ntohs(port), NIPQUAD(cp->vaddr), 0); | 309 | NIPQUAD(to), ntohs(port), NIPQUAD(cp->vaddr), 0); |
317 | 310 | ||
@@ -372,11 +365,17 @@ static int __init ip_vs_ftp_init(void) | |||
372 | for (i=0; i<IP_VS_APP_MAX_PORTS; i++) { | 365 | for (i=0; i<IP_VS_APP_MAX_PORTS; i++) { |
373 | if (!ports[i]) | 366 | if (!ports[i]) |
374 | continue; | 367 | continue; |
368 | if (ports[i] < 0 || ports[i] > 0xffff) { | ||
369 | IP_VS_WARNING("ip_vs_ftp: Ignoring invalid " | ||
370 | "configuration port[%d] = %d\n", | ||
371 | i, ports[i]); | ||
372 | continue; | ||
373 | } | ||
375 | ret = register_ip_vs_app_inc(app, app->protocol, ports[i]); | 374 | ret = register_ip_vs_app_inc(app, app->protocol, ports[i]); |
376 | if (ret) | 375 | if (ret) |
377 | break; | 376 | break; |
378 | IP_VS_DBG(1-debug, "%s: loaded support on port[%d] = %d\n", | 377 | IP_VS_INFO("%s: loaded support on port[%d] = %d\n", |
379 | app->name, i, ports[i]); | 378 | app->name, i, ports[i]); |
380 | } | 379 | } |
381 | 380 | ||
382 | if (ret) | 381 | if (ret) |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 111ff39a08c5..159fa3f1ba67 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -89,7 +89,7 @@ int sysctl_tcp_frto; | |||
89 | int sysctl_tcp_nometrics_save; | 89 | int sysctl_tcp_nometrics_save; |
90 | 90 | ||
91 | int sysctl_tcp_moderate_rcvbuf = 1; | 91 | int sysctl_tcp_moderate_rcvbuf = 1; |
92 | int sysctl_tcp_abc = 1; | 92 | int sysctl_tcp_abc; |
93 | 93 | ||
94 | #define FLAG_DATA 0x01 /* Incoming frame contained data. */ | 94 | #define FLAG_DATA 0x01 /* Incoming frame contained data. */ |
95 | #define FLAG_WIN_UPDATE 0x02 /* Incoming ACK was a window update. */ | 95 | #define FLAG_WIN_UPDATE 0x02 /* Incoming ACK was a window update. */ |
diff --git a/net/ipv4/tcp_lp.c b/net/ipv4/tcp_lp.c index 1f977b6ee9a1..48f28d617ce6 100644 --- a/net/ipv4/tcp_lp.c +++ b/net/ipv4/tcp_lp.c | |||
@@ -3,13 +3,8 @@ | |||
3 | * | 3 | * |
4 | * TCP Low Priority is a distributed algorithm whose goal is to utilize only | 4 | * TCP Low Priority is a distributed algorithm whose goal is to utilize only |
5 | * the excess network bandwidth as compared to the ``fair share`` of | 5 | * the excess network bandwidth as compared to the ``fair share`` of |
6 | * bandwidth as targeted by TCP. Available from: | 6 | * bandwidth as targeted by TCP. |
7 | * http://www.ece.rice.edu/~akuzma/Doc/akuzma/TCP-LP.pdf | ||
8 | * | 7 | * |
9 | * Original Author: | ||
10 | * Aleksandar Kuzmanovic <akuzma@northwestern.edu> | ||
11 | * | ||
12 | * See http://www-ece.rice.edu/networks/TCP-LP/ for their implementation. | ||
13 | * As of 2.6.13, Linux supports pluggable congestion control algorithms. | 8 | * As of 2.6.13, Linux supports pluggable congestion control algorithms. |
14 | * Due to the limitation of the API, we take the following changes from | 9 | * Due to the limitation of the API, we take the following changes from |
15 | * the original TCP-LP implementation: | 10 | * the original TCP-LP implementation: |
@@ -24,11 +19,20 @@ | |||
24 | * o OWD is handled in relative format, where local time stamp will in | 19 | * o OWD is handled in relative format, where local time stamp will in |
25 | * tcp_time_stamp format. | 20 | * tcp_time_stamp format. |
26 | * | 21 | * |
27 | * Port from 2.4.19 to 2.6.16 as module by: | 22 | * Original Author: |
28 | * Wong Hoi Sing Edison <hswong3i@gmail.com> | 23 | * Aleksandar Kuzmanovic <akuzma@northwestern.edu> |
29 | * Hung Hing Lun <hlhung3i@gmail.com> | 24 | * Available from: |
25 | * http://www.ece.rice.edu/~akuzma/Doc/akuzma/TCP-LP.pdf | ||
26 | * Original implementation for 2.4.19: | ||
27 | * http://www-ece.rice.edu/networks/TCP-LP/ | ||
30 | * | 28 | * |
31 | * Version: $Id: tcp_lp.c,v 1.22 2006-05-02 18:18:19 hswong3i Exp $ | 29 | * 2.6.x module Authors: |
30 | * Wong Hoi Sing, Edison <hswong3i@gmail.com> | ||
31 | * Hung Hing Lun, Mike <hlhung3i@gmail.com> | ||
32 | * SourceForge project page: | ||
33 | * http://tcp-lp-mod.sourceforge.net/ | ||
34 | * | ||
35 | * Version: $Id: tcp_lp.c,v 1.24 2006/09/05 20:22:53 hswong3i Exp $ | ||
32 | */ | 36 | */ |
33 | 37 | ||
34 | #include <linux/config.h> | 38 | #include <linux/config.h> |
@@ -153,16 +157,19 @@ static u32 tcp_lp_remote_hz_estimator(struct sock *sk) | |||
153 | if (m < 0) | 157 | if (m < 0) |
154 | m = -m; | 158 | m = -m; |
155 | 159 | ||
156 | if (rhz != 0) { | 160 | if (rhz > 0) { |
157 | m -= rhz >> 6; /* m is now error in remote HZ est */ | 161 | m -= rhz >> 6; /* m is now error in remote HZ est */ |
158 | rhz += m; /* 63/64 old + 1/64 new */ | 162 | rhz += m; /* 63/64 old + 1/64 new */ |
159 | } else | 163 | } else |
160 | rhz = m << 6; | 164 | rhz = m << 6; |
161 | 165 | ||
166 | out: | ||
162 | /* record time for successful remote HZ calc */ | 167 | /* record time for successful remote HZ calc */ |
163 | lp->flag |= LP_VALID_RHZ; | 168 | if (rhz > 0) |
169 | lp->flag |= LP_VALID_RHZ; | ||
170 | else | ||
171 | lp->flag &= ~LP_VALID_RHZ; | ||
164 | 172 | ||
165 | out: | ||
166 | /* record reference time stamp */ | 173 | /* record reference time stamp */ |
167 | lp->remote_ref_time = tp->rx_opt.rcv_tsval; | 174 | lp->remote_ref_time = tp->rx_opt.rcv_tsval; |
168 | lp->local_ref_time = tp->rx_opt.rcv_tsecr; | 175 | lp->local_ref_time = tp->rx_opt.rcv_tsecr; |
@@ -333,6 +340,6 @@ static void __exit tcp_lp_unregister(void) | |||
333 | module_init(tcp_lp_register); | 340 | module_init(tcp_lp_register); |
334 | module_exit(tcp_lp_unregister); | 341 | module_exit(tcp_lp_unregister); |
335 | 342 | ||
336 | MODULE_AUTHOR("Wong Hoi Sing Edison, Hung Hing Lun"); | 343 | MODULE_AUTHOR("Wong Hoi Sing Edison, Hung Hing Lun Mike"); |
337 | MODULE_LICENSE("GPL"); | 344 | MODULE_LICENSE("GPL"); |
338 | MODULE_DESCRIPTION("TCP Low Priority"); | 345 | MODULE_DESCRIPTION("TCP Low Priority"); |
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c index 99a6eb23378b..3b55b4c8e2d1 100644 --- a/net/ipv6/datagram.c +++ b/net/ipv6/datagram.c | |||
@@ -696,7 +696,7 @@ int datagram_send_ctl(struct msghdr *msg, struct flowi *fl, | |||
696 | } | 696 | } |
697 | 697 | ||
698 | tc = *(int *)CMSG_DATA(cmsg); | 698 | tc = *(int *)CMSG_DATA(cmsg); |
699 | if (tc < 0 || tc > 0xff) | 699 | if (tc < -1 || tc > 0xff) |
700 | goto exit_f; | 700 | goto exit_f; |
701 | 701 | ||
702 | err = 0; | 702 | err = 0; |
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 3d6e9a351150..356a8a7ef22a 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
@@ -401,7 +401,7 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info, | |||
401 | if (hlimit < 0) | 401 | if (hlimit < 0) |
402 | hlimit = ipv6_get_hoplimit(dst->dev); | 402 | hlimit = ipv6_get_hoplimit(dst->dev); |
403 | 403 | ||
404 | tclass = np->cork.tclass; | 404 | tclass = np->tclass; |
405 | if (tclass < 0) | 405 | if (tclass < 0) |
406 | tclass = 0; | 406 | tclass = 0; |
407 | 407 | ||
@@ -497,7 +497,7 @@ static void icmpv6_echo_reply(struct sk_buff *skb) | |||
497 | if (hlimit < 0) | 497 | if (hlimit < 0) |
498 | hlimit = ipv6_get_hoplimit(dst->dev); | 498 | hlimit = ipv6_get_hoplimit(dst->dev); |
499 | 499 | ||
500 | tclass = np->cork.tclass; | 500 | tclass = np->tclass; |
501 | if (tclass < 0) | 501 | if (tclass < 0) |
502 | tclass = 0; | 502 | tclass = 0; |
503 | 503 | ||
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index 43327264e69c..a5eaaf693abf 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c | |||
@@ -362,7 +362,7 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, | |||
362 | break; | 362 | break; |
363 | 363 | ||
364 | case IPV6_TCLASS: | 364 | case IPV6_TCLASS: |
365 | if (val < 0 || val > 0xff) | 365 | if (val < -1 || val > 0xff) |
366 | goto e_inval; | 366 | goto e_inval; |
367 | np->tclass = val; | 367 | np->tclass = val; |
368 | retv = 0; | 368 | retv = 0; |
@@ -947,6 +947,8 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, | |||
947 | 947 | ||
948 | case IPV6_TCLASS: | 948 | case IPV6_TCLASS: |
949 | val = np->tclass; | 949 | val = np->tclass; |
950 | if (val < 0) | ||
951 | val = 0; | ||
950 | break; | 952 | break; |
951 | 953 | ||
952 | case IPV6_RECVTCLASS: | 954 | case IPV6_RECVTCLASS: |
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index d57e61ce4a7d..15b862d8acab 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -781,7 +781,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, | |||
781 | } | 781 | } |
782 | 782 | ||
783 | if (tclass < 0) { | 783 | if (tclass < 0) { |
784 | tclass = np->cork.tclass; | 784 | tclass = np->tclass; |
785 | if (tclass < 0) | 785 | if (tclass < 0) |
786 | tclass = 0; | 786 | tclass = 0; |
787 | } | 787 | } |
diff --git a/net/netfilter/xt_quota.c b/net/netfilter/xt_quota.c index 4cdba7469dc4..be8d3c26b568 100644 --- a/net/netfilter/xt_quota.c +++ b/net/netfilter/xt_quota.c | |||
@@ -11,6 +11,8 @@ | |||
11 | 11 | ||
12 | MODULE_LICENSE("GPL"); | 12 | MODULE_LICENSE("GPL"); |
13 | MODULE_AUTHOR("Sam Johnston <samj@samj.net>"); | 13 | MODULE_AUTHOR("Sam Johnston <samj@samj.net>"); |
14 | MODULE_ALIAS("ipt_quota"); | ||
15 | MODULE_ALIAS("ip6t_quota"); | ||
14 | 16 | ||
15 | static DEFINE_SPINLOCK(quota_lock); | 17 | static DEFINE_SPINLOCK(quota_lock); |
16 | 18 | ||
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index f9cef3671593..4172a5235916 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c | |||
@@ -626,8 +626,6 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packe | |||
626 | if ((int)snaplen < 0) | 626 | if ((int)snaplen < 0) |
627 | snaplen = 0; | 627 | snaplen = 0; |
628 | } | 628 | } |
629 | if (snaplen > skb->len-skb->data_len) | ||
630 | snaplen = skb->len-skb->data_len; | ||
631 | 629 | ||
632 | spin_lock(&sk->sk_receive_queue.lock); | 630 | spin_lock(&sk->sk_receive_queue.lock); |
633 | h = (struct tpacket_hdr *)packet_lookup_frame(po, po->head); | 631 | h = (struct tpacket_hdr *)packet_lookup_frame(po, po->head); |
@@ -644,7 +642,7 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packe | |||
644 | status &= ~TP_STATUS_LOSING; | 642 | status &= ~TP_STATUS_LOSING; |
645 | spin_unlock(&sk->sk_receive_queue.lock); | 643 | spin_unlock(&sk->sk_receive_queue.lock); |
646 | 644 | ||
647 | memcpy((u8*)h + macoff, skb->data, snaplen); | 645 | skb_copy_bits(skb, 0, (u8*)h + macoff, snaplen); |
648 | 646 | ||
649 | h->tp_len = skb->len; | 647 | h->tp_len = skb->len; |
650 | h->tp_snaplen = snaplen; | 648 | h->tp_snaplen = snaplen; |
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 0834c2ee9174..6f9151899795 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c | |||
@@ -238,9 +238,7 @@ void __netdev_watchdog_up(struct net_device *dev) | |||
238 | 238 | ||
239 | static void dev_watchdog_up(struct net_device *dev) | 239 | static void dev_watchdog_up(struct net_device *dev) |
240 | { | 240 | { |
241 | netif_tx_lock_bh(dev); | ||
242 | __netdev_watchdog_up(dev); | 241 | __netdev_watchdog_up(dev); |
243 | netif_tx_unlock_bh(dev); | ||
244 | } | 242 | } |
245 | 243 | ||
246 | static void dev_watchdog_down(struct net_device *dev) | 244 | static void dev_watchdog_down(struct net_device *dev) |