summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle McMartin <kyle@mcmartin.ca>2010-11-26 15:16:03 -0500
committerKyle McMartin <kyle@mcmartin.ca>2010-11-26 15:16:03 -0500
commitb3e99df1c8efe575a715e62dea0c5d66ceaf52c4 (patch)
tree0a15bcabccbf4f65f43567a20537b13a2d3d1410
parent46d8659ae1fcada3dcb1a86691c29978dd907999 (diff)
downloaddom0-kernel-b3e99df1c8efe575a715e62dea0c5d66ceaf52c4.tar.gz
dom0-kernel-b3e99df1c8efe575a715e62dea0c5d66ceaf52c4.tar.xz
dom0-kernel-b3e99df1c8efe575a715e62dea0c5d66ceaf52c4.zip
quiet a netlink build warning the INET_DIAG fix caused
-rw-r--r--kernel.spec6
-rw-r--r--netlink-make-nlmsg_find_attr-take-a-const-ptr.patch29
2 files changed, 35 insertions, 0 deletions
diff --git a/kernel.spec b/kernel.spec
index ce8d1ae..f71c541 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -839,6 +839,7 @@ Patch14300: ipc-zero-struct-memory-for-compat-fns.patch
Patch14301: ipc-shm-fix-information-leak-to-user.patch
Patch14302: inet_diag-make-sure-we-run-the-same-bytecode-we-audited.patch
+Patch14307: netlink-make-nlmsg_find_attr-take-a-const-ptr.patch
Patch14303: posix-cpu-timers-workaround-to-suppress-problems-with-mt-exec.patch
@@ -1555,6 +1556,7 @@ ApplyPatch ipc-shm-fix-information-leak-to-user.patch
# rhbz#651264 (CVE-2010-3880)
ApplyPatch inet_diag-make-sure-we-run-the-same-bytecode-we-audited.patch
+ApplyPatch netlink-make-nlmsg_find_attr-take-a-const-ptr.patch
# rhbz#656264
ApplyPatch posix-cpu-timers-workaround-to-suppress-problems-with-mt-exec.patch
@@ -2216,6 +2218,10 @@ fi
%changelog
* Fri Nov 26 2010 Kyle McMartin <kyle@redhat.com>
+- netlink-make-nlmsg_find_attr-take-a-const-ptr.patch: quiet build warning
+ the INET_DIAG fix caused.
+
+* Fri Nov 26 2010 Kyle McMartin <kyle@redhat.com>
- Plug stack leaks in tty/serial drivers. (#648663, #648660)
* Tue Nov 23 2010 Kyle McMartin <kyle@redhat.com>
diff --git a/netlink-make-nlmsg_find_attr-take-a-const-ptr.patch b/netlink-make-nlmsg_find_attr-take-a-const-ptr.patch
new file mode 100644
index 0000000..5b75ca4
--- /dev/null
+++ b/netlink-make-nlmsg_find_attr-take-a-const-ptr.patch
@@ -0,0 +1,29 @@
+From 38f1f0db010ac5b981ae06f1fe2fd64095ebb171 Mon Sep 17 00:00:00 2001
+From: Nelson Elhage <nelhage@ksplice.com>
+Date: Wed, 3 Nov 2010 16:35:40 +0000
+Subject: [PATCH] netlink: Make nlmsg_find_attr take a const nlmsghdr*.
+
+This will let us use it on a nlmsghdr stored inside a netlink_callback.
+
+Signed-off-by: Nelson Elhage <nelhage@ksplice.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ include/net/netlink.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/include/net/netlink.h b/include/net/netlink.h
+index a63b219..c344646 100644
+--- a/include/net/netlink.h
++++ b/include/net/netlink.h
+@@ -384,7 +384,7 @@ static inline int nlmsg_parse(const struct nlmsghdr *nlh, int hdrlen,
+ *
+ * Returns the first attribute which matches the specified type.
+ */
+-static inline struct nlattr *nlmsg_find_attr(struct nlmsghdr *nlh,
++static inline struct nlattr *nlmsg_find_attr(const struct nlmsghdr *nlh,
+ int hdrlen, int attrtype)
+ {
+ return nla_find(nlmsg_attrdata(nlh, hdrlen),
+--
+1.7.3.2
+