From 7134b9ba603cf08c824966ce8985562dd5aab174 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Sun, 1 Apr 2012 21:04:21 -0400 Subject: [PATCH] --- yaml --- r: 300425 b: refs/heads/master c: e545d71390b50a8dab75efb182a4adc3c2603962 h: refs/heads/master i: 300423: 533e75d9417029a51171870f41c1904255a1f962 v: v3 --- [refs] | 2 +- trunk/include/net/xfrm.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 314a3f0a6188..6972aa9123dd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9d83ba4b6c6625de038f03cee18dd7bd89cee69b +refs/heads/master: e545d71390b50a8dab75efb182a4adc3c2603962 diff --git a/trunk/include/net/xfrm.h b/trunk/include/net/xfrm.h index 96239e78e621..1cb32bf107de 100644 --- a/trunk/include/net/xfrm.h +++ b/trunk/include/net/xfrm.h @@ -1682,8 +1682,9 @@ static inline int xfrm_mark_get(struct nlattr **attrs, struct xfrm_mark *m) static inline int xfrm_mark_put(struct sk_buff *skb, const struct xfrm_mark *m) { - if (m->m | m->v) - NLA_PUT(skb, XFRMA_MARK, sizeof(struct xfrm_mark), m); + if ((m->m | m->v) && + nla_put(skb, XFRMA_MARK, sizeof(struct xfrm_mark), m)) + goto nla_put_failure; return 0; nla_put_failure: