summaryrefslogtreecommitdiffstats
path: root/net/netlink
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2023-08-14 14:47:18 -0700
committerJakub Kicinski <kuba@kernel.org>2023-08-15 15:00:45 -0700
commit7288dd2fd4888c85c687f8ded69c280938d1a7b6 (patch)
treece4be8f0057fdbb735eaa91190525f2d11f7b870 /net/netlink
parent9272af109fe65d1a13f28c5c13777b62d3e97e8c (diff)
downloadlinux-7288dd2fd4888c85c687f8ded69c280938d1a7b6.tar.gz
linux-7288dd2fd4888c85c687f8ded69c280938d1a7b6.tar.bz2
linux-7288dd2fd4888c85c687f8ded69c280938d1a7b6.zip
genetlink: use attrs from struct genl_info
Since dumps carry struct genl_info now, use the attrs pointer from genl_info and remove the one in struct genl_dumpit_info. Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Link: https://lore.kernel.org/r/20230814214723.2924989-6-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/netlink')
-rw-r--r--net/netlink/genetlink.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index 82ad26970b9b..d47879d5a74c 100644
--- a/net/netlink/genetlink.c
+++ b/net/netlink/genetlink.c
@@ -846,7 +846,6 @@ static int genl_start(struct netlink_callback *cb)
}
info->family = ctx->family;
info->op = *ops;
- info->attrs = attrs;
info->info.snd_seq = cb->nlh->nlmsg_seq;
info->info.snd_portid = NETLINK_CB(cb->skb).portid;
info->info.nlhdr = cb->nlh;
@@ -864,7 +863,7 @@ static int genl_start(struct netlink_callback *cb)
}
if (rc) {
- genl_family_rcv_msg_attrs_free(info->attrs);
+ genl_family_rcv_msg_attrs_free(info->info.attrs);
genl_dumpit_info_free(info);
cb->data = NULL;
}
@@ -898,7 +897,7 @@ static int genl_done(struct netlink_callback *cb)
rc = ops->done(cb);
genl_op_unlock(info->family);
}
- genl_family_rcv_msg_attrs_free(info->attrs);
+ genl_family_rcv_msg_attrs_free(info->info.attrs);
genl_dumpit_info_free(info);
return rc;
}
@@ -1387,7 +1386,7 @@ static int ctrl_dumppolicy_start(struct netlink_callback *cb)
{
const struct genl_dumpit_info *info = genl_dumpit_info(cb);
struct ctrl_dump_policy_ctx *ctx = (void *)cb->ctx;
- struct nlattr **tb = info->attrs;
+ struct nlattr **tb = info->info.attrs;
const struct genl_family *rt;
struct genl_op_iter i;
int err;