genetlink: introduce and use genl_family_attrbuf()
This helper function allows family implementations to access their family's attrbuf. This gets rid of the attrbuf usage in families, and also adds locking validation, since it's not valid to use the attrbuf with parallel_ops or outside of the dumpit callback. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
4fe77d82ef
commit
c90c39dab3
@@ -262,7 +262,7 @@ int tipc_nlmsg_parse(const struct nlmsghdr *nlh, struct nlattr ***attr)
|
||||
{
|
||||
u32 maxattr = tipc_genl_family.maxattr;
|
||||
|
||||
*attr = tipc_genl_family.attrbuf;
|
||||
*attr = genl_family_attrbuf(&tipc_genl_family);
|
||||
if (!*attr)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user