[PATCH 2/5] backports: add __sockaddr_check_size()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is used by net/bluetooth/l2cap_sock.c

Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
---
 backport/backport-include/linux/socket.h |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/backport/backport-include/linux/socket.h b/backport/backport-include/linux/socket.h
index 4187af2..8b6453e 100644
--- a/backport/backport-include/linux/socket.h
+++ b/backport/backport-include/linux/socket.h
@@ -10,4 +10,9 @@
 #define SOL_NFC		280
 #endif
 
+#ifndef __sockaddr_check_size
+#define __sockaddr_check_size(size)	\
+	BUILD_BUG_ON(((size) > sizeof(struct __kernel_sockaddr_storage)))
+#endif
+
 #endif /* __BACKPORT_SOCKET_H */
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux