genetlink: remove userhdr from struct genl_info
Only three families use info->userhdr today and going forward we discourage using fixed headers in new families. So having the pointer to user header in struct genl_info is an overkill. Compute the header pointer at runtime. Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Aaron Conole <aconole@redhat.com> Link: https://lore.kernel.org/r/20230814214723.2924989-4-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@ -943,7 +943,6 @@ static int genl_family_rcv_msg_doit(const struct genl_family *family,
|
||||
info.snd_portid = NETLINK_CB(skb).portid;
|
||||
info.nlhdr = nlh;
|
||||
info.genlhdr = nlmsg_data(nlh);
|
||||
info.userhdr = nlmsg_data(nlh) + GENL_HDRLEN;
|
||||
info.attrs = attrbuf;
|
||||
info.extack = extack;
|
||||
genl_info_net_set(&info, net);
|
||||
|
Reference in New Issue
Block a user