mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
xfrm: Stop using NLA_PUT*().
These macros contain a hidden goto, and are thus extremely error prone and make code hard to audit. Signed-off-by: David S. Miller <davem@davemloft.net> Change-Id: I8d10940220e85d715753d409f55dbf74e553a4c2
This commit is contained in:
parent
303d8267f7
commit
06d7bc40bd
1 changed files with 3 additions and 2 deletions
|
@ -1685,8 +1685,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:
|
||||
|
|
Loading…
Reference in a new issue