mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 16:52:18 +00:00
inet_diag: add module pointer to "struct inet_diag_handler"
Following patch is going to use RCU instead of inet_diag_table_mutex acquisition. This patch is a preparation, no change of behavior yet. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Guillaume Nault <gnault@redhat.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
e50e10ae5d
commit
db5914695a
@ -8,6 +8,7 @@
|
||||
struct inet_hashinfo;
|
||||
|
||||
struct inet_diag_handler {
|
||||
struct module *owner;
|
||||
void (*dump)(struct sk_buff *skb,
|
||||
struct netlink_callback *cb,
|
||||
const struct inet_diag_req_v2 *r);
|
||||
|
@ -58,6 +58,7 @@ static int dccp_diag_dump_one(struct netlink_callback *cb,
|
||||
}
|
||||
|
||||
static const struct inet_diag_handler dccp_diag_handler = {
|
||||
.owner = THIS_MODULE,
|
||||
.dump = dccp_diag_dump,
|
||||
.dump_one = dccp_diag_dump_one,
|
||||
.idiag_get_info = dccp_diag_get_info,
|
||||
|
@ -213,6 +213,7 @@ static int raw_diag_destroy(struct sk_buff *in_skb,
|
||||
#endif
|
||||
|
||||
static const struct inet_diag_handler raw_diag_handler = {
|
||||
.owner = THIS_MODULE,
|
||||
.dump = raw_diag_dump,
|
||||
.dump_one = raw_diag_dump_one,
|
||||
.idiag_get_info = raw_diag_get_info,
|
||||
|
@ -222,6 +222,7 @@ static int tcp_diag_destroy(struct sk_buff *in_skb,
|
||||
#endif
|
||||
|
||||
static const struct inet_diag_handler tcp_diag_handler = {
|
||||
.owner = THIS_MODULE,
|
||||
.dump = tcp_diag_dump,
|
||||
.dump_one = tcp_diag_dump_one,
|
||||
.idiag_get_info = tcp_diag_get_info,
|
||||
|
@ -237,6 +237,7 @@ static int udplite_diag_destroy(struct sk_buff *in_skb,
|
||||
#endif
|
||||
|
||||
static const struct inet_diag_handler udp_diag_handler = {
|
||||
.owner = THIS_MODULE,
|
||||
.dump = udp_diag_dump,
|
||||
.dump_one = udp_diag_dump_one,
|
||||
.idiag_get_info = udp_diag_get_info,
|
||||
@ -260,6 +261,7 @@ static int udplite_diag_dump_one(struct netlink_callback *cb,
|
||||
}
|
||||
|
||||
static const struct inet_diag_handler udplite_diag_handler = {
|
||||
.owner = THIS_MODULE,
|
||||
.dump = udplite_diag_dump,
|
||||
.dump_one = udplite_diag_dump_one,
|
||||
.idiag_get_info = udp_diag_get_info,
|
||||
|
@ -225,6 +225,7 @@ static void mptcp_diag_get_info(struct sock *sk, struct inet_diag_msg *r,
|
||||
}
|
||||
|
||||
static const struct inet_diag_handler mptcp_diag_handler = {
|
||||
.owner = THIS_MODULE,
|
||||
.dump = mptcp_diag_dump,
|
||||
.dump_one = mptcp_diag_dump_one,
|
||||
.idiag_get_info = mptcp_diag_get_info,
|
||||
|
@ -507,6 +507,7 @@ static void sctp_diag_dump(struct sk_buff *skb, struct netlink_callback *cb,
|
||||
}
|
||||
|
||||
static const struct inet_diag_handler sctp_diag_handler = {
|
||||
.owner = THIS_MODULE,
|
||||
.dump = sctp_diag_dump,
|
||||
.dump_one = sctp_diag_dump_one,
|
||||
.idiag_get_info = sctp_diag_get_info,
|
||||
|
Loading…
Reference in New Issue
Block a user