Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 809d5fc9 authored by Gao feng's avatar Gao feng Committed by David S. Miller
Browse files

infiniband: pass rdma_cm module to netlink_dump_start



set netlink_dump_control.module to avoid panic.

Signed-off-by: default avatarGao feng <gaofeng@cn.fujitsu.com>
Cc: Roland Dreier <roland@kernel.org>
Cc: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6dc878a8
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3498,7 +3498,8 @@ static int cma_get_id_stats(struct sk_buff *skb, struct netlink_callback *cb)
}

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)
+1 −0
Original line number Diff line number Diff line
@@ -154,6 +154,7 @@ static int ibnl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
			{
				struct netlink_dump_control c = {
					.dump = client->cb_table[op].dump,
					.module = client->cb_table[op].module,
				};
				return netlink_dump_start(nls, skb, nlh, &c);
			}
+1 −0
Original line number Diff line number Diff line
@@ -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);