aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-04-03 17:33:42 -0400
committerDavid S. Miller <davem@davemloft.net>2008-04-03 17:33:42 -0400
commit3bb5da3837cc1aa17736b05139c9a22c3794851a (patch)
treec92d5684a866542b1cb20641607ac1643ce03a47 /net
parent7feb49c82a74bc7c091b8ab2a3f96baa33d08ece (diff)
parent9597362d354f8655ece324b01d0c640a0e99c077 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net')
-rw-r--r--net/9p/trans_fd.c2
-rw-r--r--net/core/sock.c4
-rw-r--r--net/rxrpc/ar-internal.h2
-rw-r--r--net/rxrpc/rxkad.c27
-rw-r--r--net/sunrpc/xprtrdma/svc_rdma_recvfrom.c23
5 files changed, 30 insertions, 28 deletions
diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
index 4e8d4e724b96..f624dff76852 100644
--- a/net/9p/trans_fd.c
+++ b/net/9p/trans_fd.c
@@ -1520,7 +1520,7 @@ static int __init p9_trans_fd_init(void)
1520 v9fs_register_trans(&p9_unix_trans); 1520 v9fs_register_trans(&p9_unix_trans);
1521 v9fs_register_trans(&p9_fd_trans); 1521 v9fs_register_trans(&p9_fd_trans);
1522 1522
1523 return 1; 1523 return 0;
1524} 1524}
1525 1525
1526module_init(p9_trans_fd_init); 1526module_init(p9_trans_fd_init);
diff --git a/net/core/sock.c b/net/core/sock.c
index 83e11f7260ff..f2ccb1620dc4 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1642,7 +1642,7 @@ static void sock_def_readable(struct sock *sk, int len)
1642{ 1642{
1643 read_lock(&sk->sk_callback_lock); 1643 read_lock(&sk->sk_callback_lock);
1644 if (sk->sk_sleep && waitqueue_active(sk->sk_sleep)) 1644 if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
1645 wake_up_interruptible(sk->sk_sleep); 1645 wake_up_interruptible_sync(sk->sk_sleep);
1646 sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_IN); 1646 sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_IN);
1647 read_unlock(&sk->sk_callback_lock); 1647 read_unlock(&sk->sk_callback_lock);
1648} 1648}
@@ -1656,7 +1656,7 @@ static void sock_def_write_space(struct sock *sk)
1656 */ 1656 */
1657 if ((atomic_read(&sk->sk_wmem_alloc) << 1) <= sk->sk_sndbuf) { 1657 if ((atomic_read(&sk->sk_wmem_alloc) << 1) <= sk->sk_sndbuf) {
1658 if (sk->sk_sleep && waitqueue_active(sk->sk_sleep)) 1658 if (sk->sk_sleep && waitqueue_active(sk->sk_sleep))
1659 wake_up_interruptible(sk->sk_sleep); 1659 wake_up_interruptible_sync(sk->sk_sleep);
1660 1660
1661 /* Should agree with poll, otherwise some programs break */ 1661 /* Should agree with poll, otherwise some programs break */
1662 if (sock_writeable(sk)) 1662 if (sock_writeable(sk))
diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h
index e58cc65728b5..c89b797b221d 100644
--- a/net/rxrpc/ar-internal.h
+++ b/net/rxrpc/ar-internal.h
@@ -23,7 +23,7 @@
23struct rxrpc_crypt { 23struct rxrpc_crypt {
24 union { 24 union {
25 u8 x[FCRYPT_BSIZE]; 25 u8 x[FCRYPT_BSIZE];
26 u32 n[2]; 26 __be32 n[2];
27 }; 27 };
28} __attribute__((aligned(8))); 28} __attribute__((aligned(8)));
29 29
diff --git a/net/rxrpc/rxkad.c b/net/rxrpc/rxkad.c
index f48434adb7c2..d1c296f2d617 100644
--- a/net/rxrpc/rxkad.c
+++ b/net/rxrpc/rxkad.c
@@ -261,6 +261,7 @@ static int rxkad_secure_packet(const struct rxrpc_call *call,
261 __be32 x[2]; 261 __be32 x[2];
262 } tmpbuf __attribute__((aligned(8))); /* must all be in same page */ 262 } tmpbuf __attribute__((aligned(8))); /* must all be in same page */
263 __be32 x; 263 __be32 x;
264 u32 y;
264 int ret; 265 int ret;
265 266
266 sp = rxrpc_skb(skb); 267 sp = rxrpc_skb(skb);
@@ -292,11 +293,11 @@ static int rxkad_secure_packet(const struct rxrpc_call *call,
292 sg_init_one(&sg[1], &tmpbuf, sizeof(tmpbuf)); 293 sg_init_one(&sg[1], &tmpbuf, sizeof(tmpbuf));
293 crypto_blkcipher_encrypt_iv(&desc, &sg[0], &sg[1], sizeof(tmpbuf)); 294 crypto_blkcipher_encrypt_iv(&desc, &sg[0], &sg[1], sizeof(tmpbuf));
294 295
295 x = ntohl(tmpbuf.x[1]); 296 y = ntohl(tmpbuf.x[1]);
296 x = (x >> 16) & 0xffff; 297 y = (y >> 16) & 0xffff;
297 if (x == 0) 298 if (y == 0)
298 x = 1; /* zero checksums are not permitted */ 299 y = 1; /* zero checksums are not permitted */
299 sp->hdr.cksum = htons(x); 300 sp->hdr.cksum = htons(y);
300 301
301 switch (call->conn->security_level) { 302 switch (call->conn->security_level) {
302 case RXRPC_SECURITY_PLAIN: 303 case RXRPC_SECURITY_PLAIN:
@@ -314,7 +315,7 @@ static int rxkad_secure_packet(const struct rxrpc_call *call,
314 break; 315 break;
315 } 316 }
316 317
317 _leave(" = %d [set %hx]", ret, x); 318 _leave(" = %d [set %hx]", ret, y);
318 return ret; 319 return ret;
319} 320}
320 321
@@ -492,6 +493,7 @@ static int rxkad_verify_packet(const struct rxrpc_call *call,
492 __be32 x[2]; 493 __be32 x[2];
493 } tmpbuf __attribute__((aligned(8))); /* must all be in same page */ 494 } tmpbuf __attribute__((aligned(8))); /* must all be in same page */
494 __be32 x; 495 __be32 x;
496 u16 y;
495 __be16 cksum; 497 __be16 cksum;
496 int ret; 498 int ret;
497 499
@@ -526,12 +528,12 @@ static int rxkad_verify_packet(const struct rxrpc_call *call,
526 sg_init_one(&sg[1], &tmpbuf, sizeof(tmpbuf)); 528 sg_init_one(&sg[1], &tmpbuf, sizeof(tmpbuf));
527 crypto_blkcipher_encrypt_iv(&desc, &sg[0], &sg[1], sizeof(tmpbuf)); 529 crypto_blkcipher_encrypt_iv(&desc, &sg[0], &sg[1], sizeof(tmpbuf));
528 530
529 x = ntohl(tmpbuf.x[1]); 531 y = ntohl(tmpbuf.x[1]);
530 x = (x >> 16) & 0xffff; 532 y = (y >> 16) & 0xffff;
531 if (x == 0) 533 if (y == 0)
532 x = 1; /* zero checksums are not permitted */ 534 y = 1; /* zero checksums are not permitted */
533 535
534 cksum = htons(x); 536 cksum = htons(y);
535 if (sp->hdr.cksum != cksum) { 537 if (sp->hdr.cksum != cksum) {
536 *_abort_code = RXKADSEALEDINCON; 538 *_abort_code = RXKADSEALEDINCON;
537 _leave(" = -EPROTO [csum failed]"); 539 _leave(" = -EPROTO [csum failed]");
@@ -1001,7 +1003,8 @@ static int rxkad_verify_response(struct rxrpc_connection *conn,
1001 struct rxrpc_crypt session_key; 1003 struct rxrpc_crypt session_key;
1002 time_t expiry; 1004 time_t expiry;
1003 void *ticket; 1005 void *ticket;
1004 u32 abort_code, version, kvno, ticket_len, csum, level; 1006 u32 abort_code, version, kvno, ticket_len, level;
1007 __be32 csum;
1005 int ret; 1008 int ret;
1006 1009
1007 _enter("{%d,%x}", conn->debug_id, key_serial(conn->server_key)); 1010 _enter("{%d,%x}", conn->debug_id, key_serial(conn->server_key));
diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
index ab54a736486e..c22d6b6f2db4 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
@@ -237,14 +237,12 @@ static void rdma_set_ctxt_sge(struct svc_rdma_op_ctxt *ctxt,
237 237
238static int rdma_read_max_sge(struct svcxprt_rdma *xprt, int sge_count) 238static int rdma_read_max_sge(struct svcxprt_rdma *xprt, int sge_count)
239{ 239{
240#ifdef RDMA_TRANSPORT_IWARP
241 if ((RDMA_TRANSPORT_IWARP == 240 if ((RDMA_TRANSPORT_IWARP ==
242 rdma_node_get_transport(xprt->sc_cm_id-> 241 rdma_node_get_transport(xprt->sc_cm_id->
243 device->node_type)) 242 device->node_type))
244 && sge_count > 1) 243 && sge_count > 1)
245 return 1; 244 return 1;
246 else 245 else
247#endif
248 return min_t(int, sge_count, xprt->sc_max_sge); 246 return min_t(int, sge_count, xprt->sc_max_sge);
249} 247}
250 248
@@ -324,15 +322,6 @@ next_sge:
324 ctxt->direction = DMA_FROM_DEVICE; 322 ctxt->direction = DMA_FROM_DEVICE;
325 clear_bit(RDMACTXT_F_READ_DONE, &ctxt->flags); 323 clear_bit(RDMACTXT_F_READ_DONE, &ctxt->flags);
326 clear_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags); 324 clear_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags);
327 if ((ch+1)->rc_discrim == 0) {
328 /*
329 * Checked in sq_cq_reap to see if we need to
330 * be enqueued
331 */
332 set_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags);
333 ctxt->next = hdr_ctxt;
334 hdr_ctxt->next = head;
335 }
336 325
337 /* Prepare READ WR */ 326 /* Prepare READ WR */
338 memset(&read_wr, 0, sizeof read_wr); 327 memset(&read_wr, 0, sizeof read_wr);
@@ -350,7 +339,17 @@ next_sge:
350 rdma_set_ctxt_sge(ctxt, &sge[ch_sge_ary[ch_no].start], 339 rdma_set_ctxt_sge(ctxt, &sge[ch_sge_ary[ch_no].start],
351 &sgl_offset, 340 &sgl_offset,
352 read_wr.num_sge); 341 read_wr.num_sge);
353 342 if (((ch+1)->rc_discrim == 0) &&
343 (read_wr.num_sge == ch_sge_ary[ch_no].count)) {
344 /*
345 * Mark the last RDMA_READ with a bit to
346 * indicate all RPC data has been fetched from
347 * the client and the RPC needs to be enqueued.
348 */
349 set_bit(RDMACTXT_F_LAST_CTXT, &ctxt->flags);
350 ctxt->next = hdr_ctxt;
351 hdr_ctxt->next = head;
352 }
354 /* Post the read */ 353 /* Post the read */
355 err = svc_rdma_send(xprt, &read_wr); 354 err = svc_rdma_send(xprt, &read_wr);
356 if (err) { 355 if (err) {