aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/netlink.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-09 03:02:35 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-09 03:02:35 -0400
commit1236d6bb6e19fc72ffc6bbcdeb1bfefe450e54ee (patch)
tree47da3feee8e263e8c9352c85cf518e624be3c211 /include/net/netlink.h
parent750b1a6894ecc9b178c6e3d0a1170122971b2036 (diff)
parent8a5776a5f49812d29fe4b2d0a2d71675c3facf3f (diff)
Merge 4.14-rc4 into staging-next
We want the staging/iio fixes in here as well to handle merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/net/netlink.h')
-rw-r--r--include/net/netlink.h73
1 files changed, 55 insertions, 18 deletions
diff --git a/include/net/netlink.h b/include/net/netlink.h
index e51cf5f81597..14c289393071 100644
--- a/include/net/netlink.h
+++ b/include/net/netlink.h
@@ -773,7 +773,10 @@ static inline int nla_parse_nested(struct nlattr *tb[], int maxtype,
773 */ 773 */
774static inline int nla_put_u8(struct sk_buff *skb, int attrtype, u8 value) 774static inline int nla_put_u8(struct sk_buff *skb, int attrtype, u8 value)
775{ 775{
776 return nla_put(skb, attrtype, sizeof(u8), &value); 776 /* temporary variables to work around GCC PR81715 with asan-stack=1 */
777 u8 tmp = value;
778
779 return nla_put(skb, attrtype, sizeof(u8), &tmp);
777} 780}
778 781
779/** 782/**
@@ -784,7 +787,9 @@ static inline int nla_put_u8(struct sk_buff *skb, int attrtype, u8 value)
784 */ 787 */
785static inline int nla_put_u16(struct sk_buff *skb, int attrtype, u16 value) 788static inline int nla_put_u16(struct sk_buff *skb, int attrtype, u16 value)
786{ 789{
787 return nla_put(skb, attrtype, sizeof(u16), &value); 790 u16 tmp = value;
791
792 return nla_put(skb, attrtype, sizeof(u16), &tmp);
788} 793}
789 794
790/** 795/**
@@ -795,7 +800,9 @@ static inline int nla_put_u16(struct sk_buff *skb, int attrtype, u16 value)
795 */ 800 */
796static inline int nla_put_be16(struct sk_buff *skb, int attrtype, __be16 value) 801static inline int nla_put_be16(struct sk_buff *skb, int attrtype, __be16 value)
797{ 802{
798 return nla_put(skb, attrtype, sizeof(__be16), &value); 803 __be16 tmp = value;
804
805 return nla_put(skb, attrtype, sizeof(__be16), &tmp);
799} 806}
800 807
801/** 808/**
@@ -806,7 +813,9 @@ static inline int nla_put_be16(struct sk_buff *skb, int attrtype, __be16 value)
806 */ 813 */
807static inline int nla_put_net16(struct sk_buff *skb, int attrtype, __be16 value) 814static inline int nla_put_net16(struct sk_buff *skb, int attrtype, __be16 value)
808{ 815{
809 return nla_put_be16(skb, attrtype | NLA_F_NET_BYTEORDER, value); 816 __be16 tmp = value;
817
818 return nla_put_be16(skb, attrtype | NLA_F_NET_BYTEORDER, tmp);
810} 819}
811 820
812/** 821/**
@@ -817,7 +826,9 @@ static inline int nla_put_net16(struct sk_buff *skb, int attrtype, __be16 value)
817 */ 826 */
818static inline int nla_put_le16(struct sk_buff *skb, int attrtype, __le16 value) 827static inline int nla_put_le16(struct sk_buff *skb, int attrtype, __le16 value)
819{ 828{
820 return nla_put(skb, attrtype, sizeof(__le16), &value); 829 __le16 tmp = value;
830
831 return nla_put(skb, attrtype, sizeof(__le16), &tmp);
821} 832}
822 833
823/** 834/**
@@ -828,7 +839,9 @@ static inline int nla_put_le16(struct sk_buff *skb, int attrtype, __le16 value)
828 */ 839 */
829static inline int nla_put_u32(struct sk_buff *skb, int attrtype, u32 value) 840static inline int nla_put_u32(struct sk_buff *skb, int attrtype, u32 value)
830{ 841{
831 return nla_put(skb, attrtype, sizeof(u32), &value); 842 u32 tmp = value;
843
844 return nla_put(skb, attrtype, sizeof(u32), &tmp);
832} 845}
833 846
834/** 847/**
@@ -839,7 +852,9 @@ static inline int nla_put_u32(struct sk_buff *skb, int attrtype, u32 value)
839 */ 852 */
840static inline int nla_put_be32(struct sk_buff *skb, int attrtype, __be32 value) 853static inline int nla_put_be32(struct sk_buff *skb, int attrtype, __be32 value)
841{ 854{
842 return nla_put(skb, attrtype, sizeof(__be32), &value); 855 __be32 tmp = value;
856
857 return nla_put(skb, attrtype, sizeof(__be32), &tmp);
843} 858}
844 859
845/** 860/**
@@ -850,7 +865,9 @@ static inline int nla_put_be32(struct sk_buff *skb, int attrtype, __be32 value)
850 */ 865 */
851static inline int nla_put_net32(struct sk_buff *skb, int attrtype, __be32 value) 866static inline int nla_put_net32(struct sk_buff *skb, int attrtype, __be32 value)
852{ 867{
853 return nla_put_be32(skb, attrtype | NLA_F_NET_BYTEORDER, value); 868 __be32 tmp = value;
869
870 return nla_put_be32(skb, attrtype | NLA_F_NET_BYTEORDER, tmp);
854} 871}
855 872
856/** 873/**
@@ -861,7 +878,9 @@ static inline int nla_put_net32(struct sk_buff *skb, int attrtype, __be32 value)
861 */ 878 */
862static inline int nla_put_le32(struct sk_buff *skb, int attrtype, __le32 value) 879static inline int nla_put_le32(struct sk_buff *skb, int attrtype, __le32 value)
863{ 880{
864 return nla_put(skb, attrtype, sizeof(__le32), &value); 881 __le32 tmp = value;
882
883 return nla_put(skb, attrtype, sizeof(__le32), &tmp);
865} 884}
866 885
867/** 886/**
@@ -874,7 +893,9 @@ static inline int nla_put_le32(struct sk_buff *skb, int attrtype, __le32 value)
874static inline int nla_put_u64_64bit(struct sk_buff *skb, int attrtype, 893static inline int nla_put_u64_64bit(struct sk_buff *skb, int attrtype,
875 u64 value, int padattr) 894 u64 value, int padattr)
876{ 895{
877 return nla_put_64bit(skb, attrtype, sizeof(u64), &value, padattr); 896 u64 tmp = value;
897
898 return nla_put_64bit(skb, attrtype, sizeof(u64), &tmp, padattr);
878} 899}
879 900
880/** 901/**
@@ -887,7 +908,9 @@ static inline int nla_put_u64_64bit(struct sk_buff *skb, int attrtype,
887static inline int nla_put_be64(struct sk_buff *skb, int attrtype, __be64 value, 908static inline int nla_put_be64(struct sk_buff *skb, int attrtype, __be64 value,
888 int padattr) 909 int padattr)
889{ 910{
890 return nla_put_64bit(skb, attrtype, sizeof(__be64), &value, padattr); 911 __be64 tmp = value;
912
913 return nla_put_64bit(skb, attrtype, sizeof(__be64), &tmp, padattr);
891} 914}
892 915
893/** 916/**
@@ -900,7 +923,9 @@ static inline int nla_put_be64(struct sk_buff *skb, int attrtype, __be64 value,
900static inline int nla_put_net64(struct sk_buff *skb, int attrtype, __be64 value, 923static inline int nla_put_net64(struct sk_buff *skb, int attrtype, __be64 value,
901 int padattr) 924 int padattr)
902{ 925{
903 return nla_put_be64(skb, attrtype | NLA_F_NET_BYTEORDER, value, 926 __be64 tmp = value;
927
928 return nla_put_be64(skb, attrtype | NLA_F_NET_BYTEORDER, tmp,
904 padattr); 929 padattr);
905} 930}
906 931
@@ -914,7 +939,9 @@ static inline int nla_put_net64(struct sk_buff *skb, int attrtype, __be64 value,
914static inline int nla_put_le64(struct sk_buff *skb, int attrtype, __le64 value, 939static inline int nla_put_le64(struct sk_buff *skb, int attrtype, __le64 value,
915 int padattr) 940 int padattr)
916{ 941{
917 return nla_put_64bit(skb, attrtype, sizeof(__le64), &value, padattr); 942 __le64 tmp = value;
943
944 return nla_put_64bit(skb, attrtype, sizeof(__le64), &tmp, padattr);
918} 945}
919 946
920/** 947/**
@@ -925,7 +952,9 @@ static inline int nla_put_le64(struct sk_buff *skb, int attrtype, __le64 value,
925 */ 952 */
926static inline int nla_put_s8(struct sk_buff *skb, int attrtype, s8 value) 953static inline int nla_put_s8(struct sk_buff *skb, int attrtype, s8 value)
927{ 954{
928 return nla_put(skb, attrtype, sizeof(s8), &value); 955 s8 tmp = value;
956
957 return nla_put(skb, attrtype, sizeof(s8), &tmp);
929} 958}
930 959
931/** 960/**
@@ -936,7 +965,9 @@ static inline int nla_put_s8(struct sk_buff *skb, int attrtype, s8 value)
936 */ 965 */
937static inline int nla_put_s16(struct sk_buff *skb, int attrtype, s16 value) 966static inline int nla_put_s16(struct sk_buff *skb, int attrtype, s16 value)
938{ 967{
939 return nla_put(skb, attrtype, sizeof(s16), &value); 968 s16 tmp = value;
969
970 return nla_put(skb, attrtype, sizeof(s16), &tmp);
940} 971}
941 972
942/** 973/**
@@ -947,7 +978,9 @@ static inline int nla_put_s16(struct sk_buff *skb, int attrtype, s16 value)
947 */ 978 */
948static inline int nla_put_s32(struct sk_buff *skb, int attrtype, s32 value) 979static inline int nla_put_s32(struct sk_buff *skb, int attrtype, s32 value)
949{ 980{
950 return nla_put(skb, attrtype, sizeof(s32), &value); 981 s32 tmp = value;
982
983 return nla_put(skb, attrtype, sizeof(s32), &tmp);
951} 984}
952 985
953/** 986/**
@@ -960,7 +993,9 @@ static inline int nla_put_s32(struct sk_buff *skb, int attrtype, s32 value)
960static inline int nla_put_s64(struct sk_buff *skb, int attrtype, s64 value, 993static inline int nla_put_s64(struct sk_buff *skb, int attrtype, s64 value,
961 int padattr) 994 int padattr)
962{ 995{
963 return nla_put_64bit(skb, attrtype, sizeof(s64), &value, padattr); 996 s64 tmp = value;
997
998 return nla_put_64bit(skb, attrtype, sizeof(s64), &tmp, padattr);
964} 999}
965 1000
966/** 1001/**
@@ -1010,7 +1045,9 @@ static inline int nla_put_msecs(struct sk_buff *skb, int attrtype,
1010static inline int nla_put_in_addr(struct sk_buff *skb, int attrtype, 1045static inline int nla_put_in_addr(struct sk_buff *skb, int attrtype,
1011 __be32 addr) 1046 __be32 addr)
1012{ 1047{
1013 return nla_put_be32(skb, attrtype, addr); 1048 __be32 tmp = addr;
1049
1050 return nla_put_be32(skb, attrtype, tmp);
1014} 1051}
1015 1052
1016/** 1053/**