From 2082b414aaa1575ee13131e0dfc11c6124fd926d Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Wed, 5 Dec 2007 03:31:53 -0800 Subject: [PATCH] --- yaml --- r: 78341 b: refs/heads/master c: f4d900a2cae94256f56be7769734100c7054bf00 h: refs/heads/master i: 78339: 8743bdf37ae01d0ca49d4e846c4fc7f94acc4680 v: v3 --- [refs] | 2 +- trunk/include/linux/netlink.h | 2 +- trunk/include/net/netlink.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index fa304ec547c6..ec6dbc19c07a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a59322be07c964e916d15be3df473fb7ba20c41e +refs/heads/master: f4d900a2cae94256f56be7769734100c7054bf00 diff --git a/trunk/include/linux/netlink.h b/trunk/include/linux/netlink.h index d5bfaba595c7..2aee0f510876 100644 --- a/trunk/include/linux/netlink.h +++ b/trunk/include/linux/netlink.h @@ -245,7 +245,7 @@ __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags) } #define NLMSG_NEW(skb, pid, seq, type, len, flags) \ -({ if (skb_tailroom(skb) < (int)NLMSG_SPACE(len)) \ +({ if (unlikely(skb_tailroom(skb) < (int)NLMSG_SPACE(len))) \ goto nlmsg_failure; \ __nlmsg_put(skb, pid, seq, type, len, flags); }) diff --git a/trunk/include/net/netlink.h b/trunk/include/net/netlink.h index 9298218c07f9..db4b935b6c7e 100644 --- a/trunk/include/net/netlink.h +++ b/trunk/include/net/netlink.h @@ -862,7 +862,7 @@ static inline int nla_put_msecs(struct sk_buff *skb, int attrtype, #define NLA_PUT(skb, attrtype, attrlen, data) \ do { \ - if (nla_put(skb, attrtype, attrlen, data) < 0) \ + if (unlikely(nla_put(skb, attrtype, attrlen, data) < 0)) \ goto nla_put_failure; \ } while(0)