[Oneiric][SRU][PATCH v2 1/1] UBUNTU: Implement dummy security_sk_clone for compat-wireless

James M. Leddy james.leddy at canonical.com
Wed Feb 22 19:37:16 UTC 2012


From: "James M. Leddy" <james.leddy at canonical.com>

BugLink: https://bugs.launchpad.net/bugs/914689

>From the upstream commit:

  This has been defined in include/linux/security.h for some time, but
  was only given an EXPORT_SYMBOL for 3.1.  Add a compat_* definition
  to avoid breaking the module load with an undefined symbol.

backport of compat :
  545ece91974440f6447bbd27a44775bdaeee8212
  0c51ea9ee6ad49b34dadf92798f7109f12cd0490

Signed-off-by: James M. Leddy <james.leddy at canonical.com>
---
 updates/cw-3.1/include/linux/compat-3.1.h |   13 +++++++++++++
 updates/cw-3.2/include/linux/compat-3.1.h |   13 +++++++++++++
 2 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/updates/cw-3.1/include/linux/compat-3.1.h b/updates/cw-3.1/include/linux/compat-3.1.h
index cff6521..492ec26 100644
--- a/updates/cw-3.1/include/linux/compat-3.1.h
+++ b/updates/cw-3.1/include/linux/compat-3.1.h
@@ -22,6 +22,8 @@
 #define br_port_exists(dev)	(dev->br_port)
 #endif
 
+#include <linux/security.h>
+
 #define genl_dump_check_consistent(cb, user_hdr, family)
 
 #define IFF_TX_SKB_SHARING	0x10000	/* The interface supports sharing
@@ -36,6 +38,17 @@
 	.prod_id = { NULL, NULL, (v3), NULL }, \
 	.prod_id_hash = { 0, 0, (vh3), 0 }, }
 
+/*
+ * This has been defined in include/linux/security.h for some time, but was
+ * only given an EXPORT_SYMBOL for 3.1.  Add a compat_* definition to avoid
+ * breaking the compile.
+ */
+#define security_sk_clone(a, b) compat_security_sk_clone(a, b)
+
+static inline void security_sk_clone(const struct sock *sk, struct sock *newsk)
+{
+}
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)) */
 
 #endif /* LINUX_3_1_COMPAT_H */
diff --git a/updates/cw-3.2/include/linux/compat-3.1.h b/updates/cw-3.2/include/linux/compat-3.1.h
index 93bb1f6..1b83318 100644
--- a/updates/cw-3.2/include/linux/compat-3.1.h
+++ b/updates/cw-3.2/include/linux/compat-3.1.h
@@ -5,6 +5,8 @@
 
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
 
+#include <linux/security.h>
+
 #define genl_dump_check_consistent(cb, user_hdr, family)
 
 #define IFF_TX_SKB_SHARING	0x10000	/* The interface supports sharing
@@ -19,6 +21,17 @@
 	.prod_id = { NULL, NULL, (v3), NULL }, \
 	.prod_id_hash = { 0, 0, (vh3), 0 }, }
 
+/*
+ * This has been defined in include/linux/security.h for some time, but was
+ * only given an EXPORT_SYMBOL for 3.1.  Add a compat_* definition to avoid
+ * breaking the compile.
+ */
+#define security_sk_clone(a, b) compat_security_sk_clone(a, b)
+
+static inline void security_sk_clone(const struct sock *sk, struct sock *newsk)
+{
+}
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)) */
 
 #endif /* LINUX_3_1_COMPAT_H */
-- 
1.7.5.4





More information about the kernel-team mailing list