[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1348635140-20225-11-git-send-email-gaofeng@cn.fujitsu.com>
Date: Wed, 26 Sep 2012 12:52:20 +0800
From: Gao feng <gaofeng@...fujitsu.com>
To: davem@...emloft.net
Cc: netfilter-devel@...r.kernel.org, linux-rdma@...r.kernel.org,
netdev@...r.kernel.org, eric.dumazet@...il.com,
pablo@...filter.org, steffen.klassert@...unet.com,
linux-crypto@...r.kernel.org, jengelh@...i.de,
stephen.hemminger@...tta.com, Gao feng <gaofeng@...fujitsu.com>,
Roland Dreier <roland@...nel.org>,
Sean Hefty <sean.hefty@...el.com>
Subject: [PATCH 11/11] infiniband: pass rdma_cm module to netlink_dump_start
use proper netlink_dump_control.done and .module to avoid panic.
Signed-off-by: Gao feng <gaofeng@...fujitsu.com>
Cc: Roland Dreier <roland@...nel.org>
Cc: Sean Hefty <sean.hefty@...el.com>
---
drivers/infiniband/core/cma.c | 3 ++-
drivers/infiniband/core/netlink.c | 2 ++
include/rdma/rdma_netlink.h | 1 +
3 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 7172559..d1febf0 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -3495,7 +3495,8 @@ out:
}
static const struct ibnl_client_cbs cma_cb_table[] = {
- [RDMA_NL_RDMA_CM_ID_STATS] = { .dump = cma_get_id_stats },
+ [RDMA_NL_RDMA_CM_ID_STATS] = { .dump = cma_get_id_stats,
+ .module = THIS_MODULE },
};
static int __init cma_init(void)
diff --git a/drivers/infiniband/core/netlink.c b/drivers/infiniband/core/netlink.c
index 3ae2bfd..1468827 100644
--- a/drivers/infiniband/core/netlink.c
+++ b/drivers/infiniband/core/netlink.c
@@ -154,6 +154,8 @@ static int ibnl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
{
struct netlink_dump_control c = {
.dump = client->cb_table[op].dump,
+ .done = netlink_dump_done,
+ .module = client->cb_table[op].module,
};
return netlink_dump_start(nls, skb, nlh, &c);
}
diff --git a/include/rdma/rdma_netlink.h b/include/rdma/rdma_netlink.h
index 3c5363a..bd3d8b2 100644
--- a/include/rdma/rdma_netlink.h
+++ b/include/rdma/rdma_netlink.h
@@ -39,6 +39,7 @@ struct rdma_cm_id_stats {
struct ibnl_client_cbs {
int (*dump)(struct sk_buff *skb, struct netlink_callback *nlcb);
+ struct module *module;
};
int ibnl_init(void);
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists