Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu Kernel Team (http://www.linux-archive.org/ubuntu-kernel-team/)
-   -   UBUNTU: Implement dummy security_sk_clone for compat-wireless (http://www.linux-archive.org/ubuntu-kernel-team/636309-ubuntu-implement-dummy-security_sk_clone-compat-wireless.html)

"James M. Leddy" 02-22-2012 06:37 PM

UBUNTU: Implement dummy security_sk_clone for compat-wireless
 
From: "James M. Leddy" <james.leddy@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@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


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team


All times are GMT. The time now is 01:31 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.