]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - include/linux/netlink.h
[NETLINK]: Mark attribute construction exception unlikely
[mirror_ubuntu-zesty-kernel.git] / include / linux / netlink.h
index 7c1f3b1d2ee5a3e3b6c6cda0794a4847e6e044ae..2aee0f51087646361f89d0c2bc32adb6ca27c3cf 100644 (file)
@@ -192,7 +192,7 @@ extern int netlink_unregister_notifier(struct notifier_block *nb);
 /* finegrained unicast helpers: */
 struct sock *netlink_getsockbyfilp(struct file *filp);
 int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock,
-               long timeo, struct sock *ssk);
+                     long *timeo, struct sock *ssk);
 void netlink_detachskb(struct sock *sk, struct sk_buff *skb);
 int netlink_sendskb(struct sock *sk, struct sk_buff *skb);
 
@@ -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); })