diff options
Diffstat (limited to 'net/rds/ib_cm.c')
-rw-r--r-- | net/rds/ib_cm.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c index c2d372f13dbb..88d0856cb797 100644 --- a/net/rds/ib_cm.c +++ b/net/rds/ib_cm.c | |||
@@ -32,6 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | #include <linux/kernel.h> | 33 | #include <linux/kernel.h> |
34 | #include <linux/in.h> | 34 | #include <linux/in.h> |
35 | #include <linux/slab.h> | ||
35 | #include <linux/vmalloc.h> | 36 | #include <linux/vmalloc.h> |
36 | 37 | ||
37 | #include "rds.h" | 38 | #include "rds.h" |
@@ -377,8 +378,8 @@ static u32 rds_ib_protocol_compatible(struct rdma_cm_event *event) | |||
377 | } | 378 | } |
378 | 379 | ||
379 | /* Even if len is crap *now* I still want to check it. -ASG */ | 380 | /* Even if len is crap *now* I still want to check it. -ASG */ |
380 | if (event->param.conn.private_data_len < sizeof (*dp) | 381 | if (event->param.conn.private_data_len < sizeof (*dp) || |
381 | || dp->dp_protocol_major == 0) | 382 | dp->dp_protocol_major == 0) |
382 | return RDS_PROTOCOL_3_0; | 383 | return RDS_PROTOCOL_3_0; |
383 | 384 | ||
384 | common = be16_to_cpu(dp->dp_protocol_minor_mask) & RDS_IB_SUPPORTED_PROTOCOLS; | 385 | common = be16_to_cpu(dp->dp_protocol_minor_mask) & RDS_IB_SUPPORTED_PROTOCOLS; |
@@ -694,6 +695,8 @@ int rds_ib_conn_alloc(struct rds_connection *conn, gfp_t gfp) | |||
694 | return -ENOMEM; | 695 | return -ENOMEM; |
695 | 696 | ||
696 | INIT_LIST_HEAD(&ic->ib_node); | 697 | INIT_LIST_HEAD(&ic->ib_node); |
698 | tasklet_init(&ic->i_recv_tasklet, rds_ib_recv_tasklet_fn, | ||
699 | (unsigned long) ic); | ||
697 | mutex_init(&ic->i_recv_mutex); | 700 | mutex_init(&ic->i_recv_mutex); |
698 | #ifndef KERNEL_HAS_ATOMIC64 | 701 | #ifndef KERNEL_HAS_ATOMIC64 |
699 | spin_lock_init(&ic->i_ack_lock); | 702 | spin_lock_init(&ic->i_ack_lock); |