summaryrefslogtreecommitdiffstats
path: root/0001-redhat-rh_kabi-Fix-RH_KABI_SET_SIZE-to-use-dereferen.patch
diff options
context:
space:
mode:
authorJeremy Cline <jcline@redhat.com>2020-04-23 16:47:21 -0400
committerJeremy Cline <jcline@redhat.com>2020-04-23 16:47:21 -0400
commitd1b6f8c7af0eb9a0a44b2d4723e58dde5eafa236 (patch)
tree842b7a6410c2572bc8c1643196f83d2e19d80e1e /0001-redhat-rh_kabi-Fix-RH_KABI_SET_SIZE-to-use-dereferen.patch
parent4f478aae8055f932b9a8fdd88d93db6b9da5709e (diff)
downloadkernel-d1b6f8c7af0eb9a0a44b2d4723e58dde5eafa236.tar.gz
kernel-d1b6f8c7af0eb9a0a44b2d4723e58dde5eafa236.tar.xz
kernel-d1b6f8c7af0eb9a0a44b2d4723e58dde5eafa236.zip
kernel-5.7.0-0.rc2.20200423git7adc4b399952.1
* Thu Apr 23 2020 CKI@GitLab <cki-project@redhat.com> [5.7.0-0.rc2.20200423git7adc4b399952.1] - 7adc4b399952 rebase - Match template format in kernel.spec.template ("Justin M. Forbes") - Break out the Patches into individual files for dist-git ("Justin M. Forbes") - Break the Red Hat patch into individual commits (Jeremy Cline) - Adjust module filtering so CONFIG_DRM_DP_CEC can be set (Jeremy Cline) - Add a script to generate release tags and branches (Jeremy Cline) - Set CONFIG_VDPA for fedora ("Justin M. Forbes") - Provide defaults in ark-rebase-patches.sh (Jeremy Cline) - Default ark-rebase-patches.sh to not report issues (Jeremy Cline) Resolves: rhbz# Signed-off-by: Jeremy Cline <jcline@redhat.com>
Diffstat (limited to '0001-redhat-rh_kabi-Fix-RH_KABI_SET_SIZE-to-use-dereferen.patch')
-rw-r--r--0001-redhat-rh_kabi-Fix-RH_KABI_SET_SIZE-to-use-dereferen.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/0001-redhat-rh_kabi-Fix-RH_KABI_SET_SIZE-to-use-dereferen.patch b/0001-redhat-rh_kabi-Fix-RH_KABI_SET_SIZE-to-use-dereferen.patch
new file mode 100644
index 000000000..d66a624e1
--- /dev/null
+++ b/0001-redhat-rh_kabi-Fix-RH_KABI_SET_SIZE-to-use-dereferen.patch
@@ -0,0 +1,47 @@
+From a1b242a1e3d4a0fb3712a7f63dc7a1fba01df75e Mon Sep 17 00:00:00 2001
+From: Tony Camuso <tcamuso@redhat.com>
+Date: Wed, 19 Feb 2020 11:52:17 +0100
+Subject: [PATCH] redhat: rh_kabi: Fix RH_KABI_SET_SIZE to use dereference
+ operator
+
+RH-Acked-by: Prarit Bhargava <prarit@redhat.com>
+RH-Acked-by: Jiri Benc <jbenc@redhat.com>
+
+Upstream Status: RHEL only
+
+Since this macro is intended to record the sizeof extension structs that
+are dynamically allocated, using the structure dereference operator '->'
+is a better choice, else the macro would have to be invoked with the
+_name argument dereferenced as (*_name).
+
+Also added a short note explaining that, unlike the other RH_KABI
+macros that are invoked from within structs, this macro is invoked
+outside a struct and therefore needs a semicolon termination.
+
+Upstream Status: RHEL only
+Signed-off-by: Tony Camuso <tcamuso@redhat.com>
+Signed-off-by: Jiri Benc <jbenc@redhat.com>
+---
+ include/linux/rh_kabi.h | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/include/linux/rh_kabi.h b/include/linux/rh_kabi.h
+index d551df994583..9a4fea93ad99 100644
+--- a/include/linux/rh_kabi.h
++++ b/include/linux/rh_kabi.h
+@@ -224,9 +224,11 @@
+ * This macro MUST be called when expanding a base struct with
+ * RH_KABI_SIZE_AND_EXTEND, and it MUST be called from the allocation site
+ * regardless of being allocated in the kernel or a module.
++ * Note: since this macro is intended to be invoked outside of a struct,
++ * a semicolon is necessary at the end of the line where it is invoked.
+ */
+ #define RH_KABI_SET_SIZE(_name, _struct) ({ \
+- _name._struct##_size_rh = sizeof(struct _struct##_rh); \
++ _name->_struct##_size_rh = sizeof(struct _struct##_rh); \
+ })
+
+ /*
+--
+2.26.0
+