diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-06-17 21:16:55 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-06-17 21:16:55 -0400 |
commit | 4b337c5f245b6587ba844ac7bb13c313a2912f7b (patch) | |
tree | 999c6a6580b76a083c8efb9dabff709d1c49fcd0 /net | |
parent | 492b057c426e4aa747484958e18e9da29003985d (diff) | |
parent | 3fe0344faf7fdcb158bd5c1a9aec960a8d70c8e8 (diff) |
Merge commit 'origin/master' into next
Diffstat (limited to 'net')
-rw-r--r-- | net/core/skbuff.c | 8 | ||||
-rw-r--r-- | net/core/sock.c | 2 | ||||
-rw-r--r-- | net/ipv4/inet_timewait_sock.c | 3 | ||||
-rw-r--r-- | net/rxrpc/ar-connection.c | 10 | ||||
-rw-r--r-- | net/rxrpc/ar-connevent.c | 7 | ||||
-rw-r--r-- | net/sunrpc/svc.c | 2 |
6 files changed, 30 insertions, 2 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 1a94a3037370..5c93435b0347 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/module.h> | 39 | #include <linux/module.h> |
40 | #include <linux/types.h> | 40 | #include <linux/types.h> |
41 | #include <linux/kernel.h> | 41 | #include <linux/kernel.h> |
42 | #include <linux/kmemcheck.h> | ||
42 | #include <linux/mm.h> | 43 | #include <linux/mm.h> |
43 | #include <linux/interrupt.h> | 44 | #include <linux/interrupt.h> |
44 | #include <linux/in.h> | 45 | #include <linux/in.h> |
@@ -201,6 +202,8 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask, | |||
201 | skb->data = data; | 202 | skb->data = data; |
202 | skb_reset_tail_pointer(skb); | 203 | skb_reset_tail_pointer(skb); |
203 | skb->end = skb->tail + size; | 204 | skb->end = skb->tail + size; |
205 | kmemcheck_annotate_bitfield(skb, flags1); | ||
206 | kmemcheck_annotate_bitfield(skb, flags2); | ||
204 | /* make sure we initialize shinfo sequentially */ | 207 | /* make sure we initialize shinfo sequentially */ |
205 | shinfo = skb_shinfo(skb); | 208 | shinfo = skb_shinfo(skb); |
206 | atomic_set(&shinfo->dataref, 1); | 209 | atomic_set(&shinfo->dataref, 1); |
@@ -217,6 +220,8 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask, | |||
217 | struct sk_buff *child = skb + 1; | 220 | struct sk_buff *child = skb + 1; |
218 | atomic_t *fclone_ref = (atomic_t *) (child + 1); | 221 | atomic_t *fclone_ref = (atomic_t *) (child + 1); |
219 | 222 | ||
223 | kmemcheck_annotate_bitfield(child, flags1); | ||
224 | kmemcheck_annotate_bitfield(child, flags2); | ||
220 | skb->fclone = SKB_FCLONE_ORIG; | 225 | skb->fclone = SKB_FCLONE_ORIG; |
221 | atomic_set(fclone_ref, 1); | 226 | atomic_set(fclone_ref, 1); |
222 | 227 | ||
@@ -635,6 +640,9 @@ struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t gfp_mask) | |||
635 | n = kmem_cache_alloc(skbuff_head_cache, gfp_mask); | 640 | n = kmem_cache_alloc(skbuff_head_cache, gfp_mask); |
636 | if (!n) | 641 | if (!n) |
637 | return NULL; | 642 | return NULL; |
643 | |||
644 | kmemcheck_annotate_bitfield(n, flags1); | ||
645 | kmemcheck_annotate_bitfield(n, flags2); | ||
638 | n->fclone = SKB_FCLONE_UNAVAILABLE; | 646 | n->fclone = SKB_FCLONE_UNAVAILABLE; |
639 | } | 647 | } |
640 | 648 | ||
diff --git a/net/core/sock.c b/net/core/sock.c index 06e26b77ad9e..b0ba569bc973 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -945,6 +945,8 @@ static struct sock *sk_prot_alloc(struct proto *prot, gfp_t priority, | |||
945 | sk = kmalloc(prot->obj_size, priority); | 945 | sk = kmalloc(prot->obj_size, priority); |
946 | 946 | ||
947 | if (sk != NULL) { | 947 | if (sk != NULL) { |
948 | kmemcheck_annotate_bitfield(sk, flags); | ||
949 | |||
948 | if (security_sk_alloc(sk, family, priority)) | 950 | if (security_sk_alloc(sk, family, priority)) |
949 | goto out_free; | 951 | goto out_free; |
950 | 952 | ||
diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c index 68a8d892c711..61283f928825 100644 --- a/net/ipv4/inet_timewait_sock.c +++ b/net/ipv4/inet_timewait_sock.c | |||
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/kmemcheck.h> | ||
12 | #include <net/inet_hashtables.h> | 13 | #include <net/inet_hashtables.h> |
13 | #include <net/inet_timewait_sock.h> | 14 | #include <net/inet_timewait_sock.h> |
14 | #include <net/ip.h> | 15 | #include <net/ip.h> |
@@ -120,6 +121,8 @@ struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk, const int stat | |||
120 | if (tw != NULL) { | 121 | if (tw != NULL) { |
121 | const struct inet_sock *inet = inet_sk(sk); | 122 | const struct inet_sock *inet = inet_sk(sk); |
122 | 123 | ||
124 | kmemcheck_annotate_bitfield(tw, flags); | ||
125 | |||
123 | /* Give us an identity. */ | 126 | /* Give us an identity. */ |
124 | tw->tw_daddr = inet->daddr; | 127 | tw->tw_daddr = inet->daddr; |
125 | tw->tw_rcv_saddr = inet->rcv_saddr; | 128 | tw->tw_rcv_saddr = inet->rcv_saddr; |
diff --git a/net/rxrpc/ar-connection.c b/net/rxrpc/ar-connection.c index 67e38a056240..9f1ce841a0bb 100644 --- a/net/rxrpc/ar-connection.c +++ b/net/rxrpc/ar-connection.c | |||
@@ -444,6 +444,11 @@ int rxrpc_connect_call(struct rxrpc_sock *rx, | |||
444 | conn = list_entry(bundle->avail_conns.next, | 444 | conn = list_entry(bundle->avail_conns.next, |
445 | struct rxrpc_connection, | 445 | struct rxrpc_connection, |
446 | bundle_link); | 446 | bundle_link); |
447 | if (conn->state >= RXRPC_CONN_REMOTELY_ABORTED) { | ||
448 | list_del_init(&conn->bundle_link); | ||
449 | bundle->num_conns--; | ||
450 | continue; | ||
451 | } | ||
447 | if (--conn->avail_calls == 0) | 452 | if (--conn->avail_calls == 0) |
448 | list_move(&conn->bundle_link, | 453 | list_move(&conn->bundle_link, |
449 | &bundle->busy_conns); | 454 | &bundle->busy_conns); |
@@ -461,6 +466,11 @@ int rxrpc_connect_call(struct rxrpc_sock *rx, | |||
461 | conn = list_entry(bundle->unused_conns.next, | 466 | conn = list_entry(bundle->unused_conns.next, |
462 | struct rxrpc_connection, | 467 | struct rxrpc_connection, |
463 | bundle_link); | 468 | bundle_link); |
469 | if (conn->state >= RXRPC_CONN_REMOTELY_ABORTED) { | ||
470 | list_del_init(&conn->bundle_link); | ||
471 | bundle->num_conns--; | ||
472 | continue; | ||
473 | } | ||
464 | ASSERTCMP(conn->avail_calls, ==, RXRPC_MAXCALLS); | 474 | ASSERTCMP(conn->avail_calls, ==, RXRPC_MAXCALLS); |
465 | conn->avail_calls = RXRPC_MAXCALLS - 1; | 475 | conn->avail_calls = RXRPC_MAXCALLS - 1; |
466 | ASSERT(conn->channels[0] == NULL && | 476 | ASSERT(conn->channels[0] == NULL && |
diff --git a/net/rxrpc/ar-connevent.c b/net/rxrpc/ar-connevent.c index dc5cb1e19509..0505cdc4d6d4 100644 --- a/net/rxrpc/ar-connevent.c +++ b/net/rxrpc/ar-connevent.c | |||
@@ -150,11 +150,15 @@ static int rxrpc_process_event(struct rxrpc_connection *conn, | |||
150 | u32 serial; | 150 | u32 serial; |
151 | int loop, ret; | 151 | int loop, ret; |
152 | 152 | ||
153 | if (conn->state >= RXRPC_CONN_REMOTELY_ABORTED) | 153 | if (conn->state >= RXRPC_CONN_REMOTELY_ABORTED) { |
154 | kleave(" = -ECONNABORTED [%u]", conn->state); | ||
154 | return -ECONNABORTED; | 155 | return -ECONNABORTED; |
156 | } | ||
155 | 157 | ||
156 | serial = ntohl(sp->hdr.serial); | 158 | serial = ntohl(sp->hdr.serial); |
157 | 159 | ||
160 | _enter("{%d},{%u,%%%u},", conn->debug_id, sp->hdr.type, serial); | ||
161 | |||
158 | switch (sp->hdr.type) { | 162 | switch (sp->hdr.type) { |
159 | case RXRPC_PACKET_TYPE_ABORT: | 163 | case RXRPC_PACKET_TYPE_ABORT: |
160 | if (skb_copy_bits(skb, 0, &tmp, sizeof(tmp)) < 0) | 164 | if (skb_copy_bits(skb, 0, &tmp, sizeof(tmp)) < 0) |
@@ -199,6 +203,7 @@ static int rxrpc_process_event(struct rxrpc_connection *conn, | |||
199 | return 0; | 203 | return 0; |
200 | 204 | ||
201 | default: | 205 | default: |
206 | _leave(" = -EPROTO [%u]", sp->hdr.type); | ||
202 | return -EPROTO; | 207 | return -EPROTO; |
203 | } | 208 | } |
204 | } | 209 | } |
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 8847add6ca16..5ed8931dfe98 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c | |||
@@ -124,7 +124,7 @@ svc_pool_map_choose_mode(void) | |||
124 | { | 124 | { |
125 | unsigned int node; | 125 | unsigned int node; |
126 | 126 | ||
127 | if (num_online_nodes() > 1) { | 127 | if (nr_online_nodes > 1) { |
128 | /* | 128 | /* |
129 | * Actually have multiple NUMA nodes, | 129 | * Actually have multiple NUMA nodes, |
130 | * so split pools on NUMA node boundaries | 130 | * so split pools on NUMA node boundaries |