summaryrefslogtreecommitdiff
path: root/include/linux/netlink.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/netlink.h')
-rw-r--r--include/linux/netlink.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index 8d2a8924705c..c20395edf2de 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -92,6 +92,14 @@ struct netlink_ext_ack {
(extack)->_msg = _msg; \
} while (0)
+#define NL_MOD_TRY_SET_ERR_MSG(extack, msg) do { \
+ static const char _msg[] = KBUILD_MODNAME ": " msg; \
+ struct netlink_ext_ack *_extack = (extack); \
+ \
+ if (_extack) \
+ _extack->_msg = _msg; \
+} while (0)
+
extern void netlink_kernel_release(struct sock *sk);
extern int __netlink_change_ngroups(struct sock *sk, unsigned int groups);
extern int netlink_change_ngroups(struct sock *sk, unsigned int groups);