diff options
Diffstat (limited to 'include/linux/genl_magic_func.h')
-rw-r--r-- | include/linux/genl_magic_func.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/genl_magic_func.h b/include/linux/genl_magic_func.h index 0b8a88e2e83e..023bc346b877 100644 --- a/include/linux/genl_magic_func.h +++ b/include/linux/genl_magic_func.h | |||
@@ -367,7 +367,8 @@ static inline int s_name ## _to_unpriv_skb(struct sk_buff *skb, \ | |||
367 | __is_signed) \ | 367 | __is_signed) \ |
368 | if (!exclude_sensitive || !((attr_flag) & DRBD_F_SENSITIVE)) { \ | 368 | if (!exclude_sensitive || !((attr_flag) & DRBD_F_SENSITIVE)) { \ |
369 | DPRINT_FIELD(">>", nla_type, name, s, NULL); \ | 369 | DPRINT_FIELD(">>", nla_type, name, s, NULL); \ |
370 | __put(skb, attr_nr, s->name); \ | 370 | if (__put(skb, attr_nr, s->name)) \ |
371 | goto nla_put_failure; \ | ||
371 | } | 372 | } |
372 | 373 | ||
373 | #undef __array | 374 | #undef __array |
@@ -375,9 +376,10 @@ static inline int s_name ## _to_unpriv_skb(struct sk_buff *skb, \ | |||
375 | __get, __put, __is_signed) \ | 376 | __get, __put, __is_signed) \ |
376 | if (!exclude_sensitive || !((attr_flag) & DRBD_F_SENSITIVE)) { \ | 377 | if (!exclude_sensitive || !((attr_flag) & DRBD_F_SENSITIVE)) { \ |
377 | DPRINT_ARRAY(">>",nla_type, name, s, NULL); \ | 378 | DPRINT_ARRAY(">>",nla_type, name, s, NULL); \ |
378 | __put(skb, attr_nr, min_t(int, maxlen, \ | 379 | if (__put(skb, attr_nr, min_t(int, maxlen, \ |
379 | s->name ## _len + (nla_type == NLA_NUL_STRING)),\ | 380 | s->name ## _len + (nla_type == NLA_NUL_STRING)),\ |
380 | s->name); \ | 381 | s->name)) \ |
382 | goto nla_put_failure; \ | ||
381 | } | 383 | } |
382 | 384 | ||
383 | #include GENL_MAGIC_INCLUDE_FILE | 385 | #include GENL_MAGIC_INCLUDE_FILE |