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:
Johannes Berg 2016-10-24 14:40:01 +02:00 committed by David S. Miller
parent 4fe77d82ef
commit c90c39dab3
6 changed files with 55 additions and 35 deletions

View file

@ -73,6 +73,8 @@ struct genl_family {
struct module *module;
};
struct nlattr **genl_family_attrbuf(struct genl_family *family);
/**
* struct genl_info - receiving information
* @snd_seq: sending sequence number