Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f4d900a2 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller
Browse files

[NETLINK]: Mark attribute construction exception unlikely

parent a59322be
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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); })

+1 −1
Original line number Diff line number Diff line
@@ -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)