diff options
Diffstat (limited to 'net')
| -rw-r--r-- | net/bluetooth/hci_sock.c | 6 | ||||
| -rw-r--r-- | net/core/dev.c | 69 | ||||
| -rw-r--r-- | net/ipv4/Kconfig | 7 | ||||
| -rw-r--r-- | net/ipv4/route.c | 4 | ||||
| -rw-r--r-- | net/ipv4/tcp_cong.c | 40 | ||||
| -rw-r--r-- | net/ipx/af_ipx.c | 2 | ||||
| -rw-r--r-- | net/socket.c | 3 | ||||
| -rw-r--r-- | net/sunrpc/rpc_pipe.c | 24 | ||||
| -rw-r--r-- | net/sunrpc/sched.c | 2 | ||||
| -rw-r--r-- | net/sunrpc/sunrpc_syms.c | 4 |
10 files changed, 114 insertions, 47 deletions
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index bfc9a35bad33..1dae3dfc66a9 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c | |||
| @@ -665,7 +665,8 @@ static int hci_sock_dev_event(struct notifier_block *this, unsigned long event, | |||
| 665 | /* Detach sockets from device */ | 665 | /* Detach sockets from device */ |
| 666 | read_lock(&hci_sk_list.lock); | 666 | read_lock(&hci_sk_list.lock); |
| 667 | sk_for_each(sk, node, &hci_sk_list.head) { | 667 | sk_for_each(sk, node, &hci_sk_list.head) { |
| 668 | lock_sock(sk); | 668 | local_bh_disable(); |
| 669 | bh_lock_sock_nested(sk); | ||
| 669 | if (hci_pi(sk)->hdev == hdev) { | 670 | if (hci_pi(sk)->hdev == hdev) { |
| 670 | hci_pi(sk)->hdev = NULL; | 671 | hci_pi(sk)->hdev = NULL; |
| 671 | sk->sk_err = EPIPE; | 672 | sk->sk_err = EPIPE; |
| @@ -674,7 +675,8 @@ static int hci_sock_dev_event(struct notifier_block *this, unsigned long event, | |||
| 674 | 675 | ||
| 675 | hci_dev_put(hdev); | 676 | hci_dev_put(hdev); |
| 676 | } | 677 | } |
| 677 | release_sock(sk); | 678 | bh_unlock_sock(sk); |
| 679 | local_bh_enable(); | ||
| 678 | } | 680 | } |
| 679 | read_unlock(&hci_sk_list.lock); | 681 | read_unlock(&hci_sk_list.lock); |
| 680 | } | 682 | } |
diff --git a/net/core/dev.c b/net/core/dev.c index 8301e2ac747f..f2b61111e26d 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
| @@ -116,6 +116,7 @@ | |||
| 116 | #include <linux/dmaengine.h> | 116 | #include <linux/dmaengine.h> |
| 117 | #include <linux/err.h> | 117 | #include <linux/err.h> |
| 118 | #include <linux/ctype.h> | 118 | #include <linux/ctype.h> |
| 119 | #include <linux/if_arp.h> | ||
| 119 | 120 | ||
| 120 | /* | 121 | /* |
| 121 | * The list of packet types we will receive (as opposed to discard) | 122 | * The list of packet types we will receive (as opposed to discard) |
| @@ -217,6 +218,73 @@ extern void netdev_unregister_sysfs(struct net_device *); | |||
| 217 | #define netdev_unregister_sysfs(dev) do { } while(0) | 218 | #define netdev_unregister_sysfs(dev) do { } while(0) |
| 218 | #endif | 219 | #endif |
| 219 | 220 | ||
| 221 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | ||
| 222 | /* | ||
| 223 | * register_netdevice() inits dev->_xmit_lock and sets lockdep class | ||
| 224 | * according to dev->type | ||
| 225 | */ | ||
| 226 | static const unsigned short netdev_lock_type[] = | ||
| 227 | {ARPHRD_NETROM, ARPHRD_ETHER, ARPHRD_EETHER, ARPHRD_AX25, | ||
| 228 | ARPHRD_PRONET, ARPHRD_CHAOS, ARPHRD_IEEE802, ARPHRD_ARCNET, | ||
| 229 | ARPHRD_APPLETLK, ARPHRD_DLCI, ARPHRD_ATM, ARPHRD_METRICOM, | ||
| 230 | ARPHRD_IEEE1394, ARPHRD_EUI64, ARPHRD_INFINIBAND, ARPHRD_SLIP, | ||
| 231 | ARPHRD_CSLIP, ARPHRD_SLIP6, ARPHRD_CSLIP6, ARPHRD_RSRVD, | ||
| 232 | ARPHRD_ADAPT, ARPHRD_ROSE, ARPHRD_X25, ARPHRD_HWX25, | ||
| 233 | ARPHRD_PPP, ARPHRD_CISCO, ARPHRD_LAPB, ARPHRD_DDCMP, | ||
| 234 | ARPHRD_RAWHDLC, ARPHRD_TUNNEL, ARPHRD_TUNNEL6, ARPHRD_FRAD, | ||
| 235 | ARPHRD_SKIP, ARPHRD_LOOPBACK, ARPHRD_LOCALTLK, ARPHRD_FDDI, | ||
| 236 | ARPHRD_BIF, ARPHRD_SIT, ARPHRD_IPDDP, ARPHRD_IPGRE, | ||
| 237 | ARPHRD_PIMREG, ARPHRD_HIPPI, ARPHRD_ASH, ARPHRD_ECONET, | ||
| 238 | ARPHRD_IRDA, ARPHRD_FCPP, ARPHRD_FCAL, ARPHRD_FCPL, | ||
| 239 | ARPHRD_FCFABRIC, ARPHRD_IEEE802_TR, ARPHRD_IEEE80211, | ||
| 240 | ARPHRD_IEEE80211_PRISM, ARPHRD_IEEE80211_RADIOTAP, ARPHRD_VOID, | ||
| 241 | ARPHRD_NONE}; | ||
| 242 | |||
| 243 | static const char *netdev_lock_name[] = | ||
| 244 | {"_xmit_NETROM", "_xmit_ETHER", "_xmit_EETHER", "_xmit_AX25", | ||
| 245 | "_xmit_PRONET", "_xmit_CHAOS", "_xmit_IEEE802", "_xmit_ARCNET", | ||
| 246 | "_xmit_APPLETLK", "_xmit_DLCI", "_xmit_ATM", "_xmit_METRICOM", | ||
| 247 | "_xmit_IEEE1394", "_xmit_EUI64", "_xmit_INFINIBAND", "_xmit_SLIP", | ||
| 248 | "_xmit_CSLIP", "_xmit_SLIP6", "_xmit_CSLIP6", "_xmit_RSRVD", | ||
| 249 | "_xmit_ADAPT", "_xmit_ROSE", "_xmit_X25", "_xmit_HWX25", | ||
| 250 | "_xmit_PPP", "_xmit_CISCO", "_xmit_LAPB", "_xmit_DDCMP", | ||
| 251 | "_xmit_RAWHDLC", "_xmit_TUNNEL", "_xmit_TUNNEL6", "_xmit_FRAD", | ||
| 252 | "_xmit_SKIP", "_xmit_LOOPBACK", "_xmit_LOCALTLK", "_xmit_FDDI", | ||
| 253 | "_xmit_BIF", "_xmit_SIT", "_xmit_IPDDP", "_xmit_IPGRE", | ||
| 254 | "_xmit_PIMREG", "_xmit_HIPPI", "_xmit_ASH", "_xmit_ECONET", | ||
| 255 | "_xmit_IRDA", "_xmit_FCPP", "_xmit_FCAL", "_xmit_FCPL", | ||
| 256 | "_xmit_FCFABRIC", "_xmit_IEEE802_TR", "_xmit_IEEE80211", | ||
| 257 | "_xmit_IEEE80211_PRISM", "_xmit_IEEE80211_RADIOTAP", "_xmit_VOID", | ||
| 258 | "_xmit_NONE"}; | ||
| 259 | |||
| 260 | static struct lock_class_key netdev_xmit_lock_key[ARRAY_SIZE(netdev_lock_type)]; | ||
| 261 | |||
| 262 | static inline unsigned short netdev_lock_pos(unsigned short dev_type) | ||
| 263 | { | ||
| 264 | int i; | ||
| 265 | |||
| 266 | for (i = 0; i < ARRAY_SIZE(netdev_lock_type); i++) | ||
| 267 | if (netdev_lock_type[i] == dev_type) | ||
| 268 | return i; | ||
| 269 | /* the last key is used by default */ | ||
| 270 | return ARRAY_SIZE(netdev_lock_type) - 1; | ||
| 271 | } | ||
| 272 | |||
| 273 | static inline void netdev_set_lockdep_class(spinlock_t *lock, | ||
| 274 | unsigned short dev_type) | ||
| 275 | { | ||
| 276 | int i; | ||
| 277 | |||
| 278 | i = netdev_lock_pos(dev_type); | ||
| 279 | lockdep_set_class_and_name(lock, &netdev_xmit_lock_key[i], | ||
| 280 | netdev_lock_name[i]); | ||
| 281 | } | ||
| 282 | #else | ||
| 283 | static inline void netdev_set_lockdep_class(spinlock_t *lock, | ||
| 284 | unsigned short dev_type) | ||
| 285 | { | ||
| 286 | } | ||
| 287 | #endif | ||
| 220 | 288 | ||
| 221 | /******************************************************************************* | 289 | /******************************************************************************* |
| 222 | 290 | ||
| @@ -3001,6 +3069,7 @@ int register_netdevice(struct net_device *dev) | |||
| 3001 | 3069 | ||
| 3002 | spin_lock_init(&dev->queue_lock); | 3070 | spin_lock_init(&dev->queue_lock); |
| 3003 | spin_lock_init(&dev->_xmit_lock); | 3071 | spin_lock_init(&dev->_xmit_lock); |
| 3072 | netdev_set_lockdep_class(&dev->_xmit_lock, dev->type); | ||
| 3004 | dev->xmit_lock_owner = -1; | 3073 | dev->xmit_lock_owner = -1; |
| 3005 | spin_lock_init(&dev->ingress_lock); | 3074 | spin_lock_init(&dev->ingress_lock); |
| 3006 | 3075 | ||
diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig index c68196cc56ab..010fbb2d45e9 100644 --- a/net/ipv4/Kconfig +++ b/net/ipv4/Kconfig | |||
| @@ -43,11 +43,11 @@ config IP_ADVANCED_ROUTER | |||
| 43 | asymmetric routing (packets from you to a host take a different path | 43 | asymmetric routing (packets from you to a host take a different path |
| 44 | than packets from that host to you) or if you operate a non-routing | 44 | than packets from that host to you) or if you operate a non-routing |
| 45 | host which has several IP addresses on different interfaces. To turn | 45 | host which has several IP addresses on different interfaces. To turn |
| 46 | rp_filter off use: | 46 | rp_filter on use: |
| 47 | 47 | ||
| 48 | echo 0 > /proc/sys/net/ipv4/conf/<device>/rp_filter | 48 | echo 1 > /proc/sys/net/ipv4/conf/<device>/rp_filter |
| 49 | or | 49 | or |
| 50 | echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter | 50 | echo 1 > /proc/sys/net/ipv4/conf/all/rp_filter |
| 51 | 51 | ||
| 52 | If unsure, say N here. | 52 | If unsure, say N here. |
| 53 | 53 | ||
| @@ -577,6 +577,7 @@ config TCP_CONG_VENO | |||
| 577 | config TCP_CONG_YEAH | 577 | config TCP_CONG_YEAH |
| 578 | tristate "YeAH TCP" | 578 | tristate "YeAH TCP" |
| 579 | depends on EXPERIMENTAL | 579 | depends on EXPERIMENTAL |
| 580 | select TCP_CONG_VEGAS | ||
| 580 | default n | 581 | default n |
| 581 | ---help--- | 582 | ---help--- |
| 582 | YeAH-TCP is a sender-side high-speed enabled TCP congestion control | 583 | YeAH-TCP is a sender-side high-speed enabled TCP congestion control |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index cb76e3c725a0..df9fe4f2e8cc 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
| @@ -2396,7 +2396,7 @@ static int ip_route_output_slow(struct rtable **rp, const struct flowi *oldflp) | |||
| 2396 | 2396 | ||
| 2397 | /* It is equivalent to inet_addr_type(saddr) == RTN_LOCAL */ | 2397 | /* It is equivalent to inet_addr_type(saddr) == RTN_LOCAL */ |
| 2398 | dev_out = ip_dev_find(oldflp->fl4_src); | 2398 | dev_out = ip_dev_find(oldflp->fl4_src); |
| 2399 | if ((dev_out == NULL) && !(sysctl_ip_nonlocal_bind)) | 2399 | if (dev_out == NULL) |
| 2400 | goto out; | 2400 | goto out; |
| 2401 | 2401 | ||
| 2402 | /* I removed check for oif == dev_out->oif here. | 2402 | /* I removed check for oif == dev_out->oif here. |
| @@ -2407,7 +2407,7 @@ static int ip_route_output_slow(struct rtable **rp, const struct flowi *oldflp) | |||
| 2407 | of another iface. --ANK | 2407 | of another iface. --ANK |
| 2408 | */ | 2408 | */ |
| 2409 | 2409 | ||
| 2410 | if (dev_out && oldflp->oif == 0 | 2410 | if (oldflp->oif == 0 |
| 2411 | && (MULTICAST(oldflp->fl4_dst) || oldflp->fl4_dst == htonl(0xFFFFFFFF))) { | 2411 | && (MULTICAST(oldflp->fl4_dst) || oldflp->fl4_dst == htonl(0xFFFFFFFF))) { |
| 2412 | /* Special hack: user can direct multicasts | 2412 | /* Special hack: user can direct multicasts |
| 2413 | and limited broadcast via necessary interface | 2413 | and limited broadcast via necessary interface |
diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c index 86b26539e54b..1260e52ad772 100644 --- a/net/ipv4/tcp_cong.c +++ b/net/ipv4/tcp_cong.c | |||
| @@ -276,30 +276,34 @@ int tcp_set_congestion_control(struct sock *sk, const char *name) | |||
| 276 | 276 | ||
| 277 | 277 | ||
| 278 | /* | 278 | /* |
| 279 | * Slow start (exponential increase) with | 279 | * Slow start is used when congestion window is less than slow start |
| 280 | * RFC3742 Limited Slow Start (fast linear increase) support. | 280 | * threshold. This version implements the basic RFC2581 version |
| 281 | * and optionally supports: | ||
| 282 | * RFC3742 Limited Slow Start - growth limited to max_ssthresh | ||
| 283 | * RFC3465 Appropriate Byte Counting - growth limited by bytes acknowledged | ||
| 281 | */ | 284 | */ |
| 282 | void tcp_slow_start(struct tcp_sock *tp) | 285 | void tcp_slow_start(struct tcp_sock *tp) |
| 283 | { | 286 | { |
| 284 | int cnt = 0; | 287 | int cnt; /* increase in packets */ |
| 285 | 288 | ||
| 286 | if (sysctl_tcp_abc) { | 289 | /* RFC3465: ABC Slow start |
| 287 | /* RFC3465: Slow Start | 290 | * Increase only after a full MSS of bytes is acked |
| 288 | * TCP sender SHOULD increase cwnd by the number of | 291 | * |
| 289 | * previously unacknowledged bytes ACKed by each incoming | 292 | * TCP sender SHOULD increase cwnd by the number of |
| 290 | * acknowledgment, provided the increase is not more than L | 293 | * previously unacknowledged bytes ACKed by each incoming |
| 291 | */ | 294 | * acknowledgment, provided the increase is not more than L |
| 292 | if (tp->bytes_acked < tp->mss_cache) | 295 | */ |
| 293 | return; | 296 | if (sysctl_tcp_abc && tp->bytes_acked < tp->mss_cache) |
| 294 | } | 297 | return; |
| 295 | 298 | ||
| 296 | if (sysctl_tcp_max_ssthresh > 0 && | 299 | if (sysctl_tcp_max_ssthresh > 0 && tp->snd_cwnd > sysctl_tcp_max_ssthresh) |
| 297 | tp->snd_cwnd > sysctl_tcp_max_ssthresh) | 300 | cnt = sysctl_tcp_max_ssthresh >> 1; /* limited slow start */ |
| 298 | cnt += sysctl_tcp_max_ssthresh>>1; | ||
| 299 | else | 301 | else |
| 300 | cnt += tp->snd_cwnd; | 302 | cnt = tp->snd_cwnd; /* exponential increase */ |
| 301 | 303 | ||
| 302 | /* RFC3465: We MAY increase by 2 if discovered delayed ack */ | 304 | /* RFC3465: ABC |
| 305 | * We MAY increase by 2 if discovered delayed ack | ||
| 306 | */ | ||
| 303 | if (sysctl_tcp_abc > 1 && tp->bytes_acked >= 2*tp->mss_cache) | 307 | if (sysctl_tcp_abc > 1 && tp->bytes_acked >= 2*tp->mss_cache) |
| 304 | cnt <<= 1; | 308 | cnt <<= 1; |
| 305 | tp->bytes_acked = 0; | 309 | tp->bytes_acked = 0; |
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c index 15419dd682fd..8400525177ab 100644 --- a/net/ipx/af_ipx.c +++ b/net/ipx/af_ipx.c | |||
| @@ -87,7 +87,7 @@ extern int ipxrtr_add_route(__be32 network, struct ipx_interface *intrfc, | |||
| 87 | unsigned char *node); | 87 | unsigned char *node); |
| 88 | extern void ipxrtr_del_routes(struct ipx_interface *intrfc); | 88 | extern void ipxrtr_del_routes(struct ipx_interface *intrfc); |
| 89 | extern int ipxrtr_route_packet(struct sock *sk, struct sockaddr_ipx *usipx, | 89 | extern int ipxrtr_route_packet(struct sock *sk, struct sockaddr_ipx *usipx, |
| 90 | struct iovec *iov, int len, int noblock); | 90 | struct iovec *iov, size_t len, int noblock); |
| 91 | extern int ipxrtr_route_skb(struct sk_buff *skb); | 91 | extern int ipxrtr_route_skb(struct sk_buff *skb); |
| 92 | extern struct ipx_route *ipxrtr_lookup(__be32 net); | 92 | extern struct ipx_route *ipxrtr_lookup(__be32 net); |
| 93 | extern int ipxrtr_ioctl(unsigned int cmd, void __user *arg); | 93 | extern int ipxrtr_ioctl(unsigned int cmd, void __user *arg); |
diff --git a/net/socket.c b/net/socket.c index 98a8f67abbfc..f4530196a70a 100644 --- a/net/socket.c +++ b/net/socket.c | |||
| @@ -261,8 +261,7 @@ static void init_once(void *foo, struct kmem_cache *cachep, unsigned long flags) | |||
| 261 | { | 261 | { |
| 262 | struct socket_alloc *ei = (struct socket_alloc *)foo; | 262 | struct socket_alloc *ei = (struct socket_alloc *)foo; |
| 263 | 263 | ||
| 264 | if (flags & SLAB_CTOR_CONSTRUCTOR) | 264 | inode_init_once(&ei->vfs_inode); |
| 265 | inode_init_once(&ei->vfs_inode); | ||
| 266 | } | 265 | } |
| 267 | 266 | ||
| 268 | static int init_inodecache(void) | 267 | static int init_inodecache(void) |
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index a2f1893bde53..5887457dc936 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c | |||
| @@ -828,19 +828,17 @@ init_once(void * foo, struct kmem_cache * cachep, unsigned long flags) | |||
| 828 | { | 828 | { |
| 829 | struct rpc_inode *rpci = (struct rpc_inode *) foo; | 829 | struct rpc_inode *rpci = (struct rpc_inode *) foo; |
| 830 | 830 | ||
| 831 | if (flags & SLAB_CTOR_CONSTRUCTOR) { | 831 | inode_init_once(&rpci->vfs_inode); |
| 832 | inode_init_once(&rpci->vfs_inode); | 832 | rpci->private = NULL; |
| 833 | rpci->private = NULL; | 833 | rpci->nreaders = 0; |
| 834 | rpci->nreaders = 0; | 834 | rpci->nwriters = 0; |
| 835 | rpci->nwriters = 0; | 835 | INIT_LIST_HEAD(&rpci->in_upcall); |
| 836 | INIT_LIST_HEAD(&rpci->in_upcall); | 836 | INIT_LIST_HEAD(&rpci->pipe); |
| 837 | INIT_LIST_HEAD(&rpci->pipe); | 837 | rpci->pipelen = 0; |
| 838 | rpci->pipelen = 0; | 838 | init_waitqueue_head(&rpci->waitq); |
| 839 | init_waitqueue_head(&rpci->waitq); | 839 | INIT_DELAYED_WORK(&rpci->queue_timeout, |
| 840 | INIT_DELAYED_WORK(&rpci->queue_timeout, | 840 | rpc_timeout_upcall_queue); |
| 841 | rpc_timeout_upcall_queue); | 841 | rpci->ops = NULL; |
| 842 | rpci->ops = NULL; | ||
| 843 | } | ||
| 844 | } | 842 | } |
| 845 | 843 | ||
| 846 | int register_rpc_pipefs(void) | 844 | int register_rpc_pipefs(void) |
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index b011eb625e49..944d75396fb3 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
| @@ -989,8 +989,6 @@ void rpc_killall_tasks(struct rpc_clnt *clnt) | |||
| 989 | spin_unlock(&rpc_sched_lock); | 989 | spin_unlock(&rpc_sched_lock); |
| 990 | } | 990 | } |
| 991 | 991 | ||
| 992 | static DECLARE_MUTEX_LOCKED(rpciod_running); | ||
| 993 | |||
| 994 | static void rpciod_killall(void) | 992 | static void rpciod_killall(void) |
| 995 | { | 993 | { |
| 996 | unsigned long flags; | 994 | unsigned long flags; |
diff --git a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c index 0d35bc796d00..73075dec83c0 100644 --- a/net/sunrpc/sunrpc_syms.c +++ b/net/sunrpc/sunrpc_syms.c | |||
| @@ -134,11 +134,7 @@ EXPORT_SYMBOL(nfsd_debug); | |||
| 134 | EXPORT_SYMBOL(nlm_debug); | 134 | EXPORT_SYMBOL(nlm_debug); |
| 135 | #endif | 135 | #endif |
| 136 | 136 | ||
| 137 | extern int register_rpc_pipefs(void); | ||
| 138 | extern void unregister_rpc_pipefs(void); | ||
| 139 | extern struct cache_detail ip_map_cache, unix_gid_cache; | 137 | extern struct cache_detail ip_map_cache, unix_gid_cache; |
| 140 | extern int init_socket_xprt(void); | ||
| 141 | extern void cleanup_socket_xprt(void); | ||
| 142 | 138 | ||
| 143 | static int __init | 139 | static int __init |
| 144 | init_sunrpc(void) | 140 | init_sunrpc(void) |
