From: Čestmír Kalina <ckalina(a)redhat.com>
kabi: fix dereference in RH_KABI_CHECK_EXT
Bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=2024595
Upstream Status: RHEL only
commit 975873f60708e90b224998160bf23de27b8b3bec
Author: Jiri Benc <jbenc(a)redhat.com>
Date: Wed, 1 Apr 2020 13:04:11 -0400
Similarly to the previous patch, there are parentheses needed aroung the
_ptr argument in RH_KABI_CHECK_EXT.
RH-Signed-off-by: Jiri Benc <jbenc(a)redhat.com>
Signed-off-by: Čestmír Kalina <ckalina(a)redhat.com>
Signed-off-by: Prarit Bhargava <prarit(a)redhat.com>
diff --git a/include/linux/rh_kabi.h b/include/linux/rh_kabi.h
index blahblah..blahblah 100644
--- a/include/linux/rh_kabi.h
+++ b/include/linux/rh_kabi.h
@@ -419,7 +419,7 @@
*/
#define RH_KABI_CHECK_EXT(_ptr, _struct, _field) ({ \
size_t __off = offsetof(struct _struct##_rh, _field); \
- _ptr->_struct##_size_rh > __off ? true : false; \
+ (_ptr)->_struct##_size_rh > __off ? true : false; \
})
#endif /* _LINUX_RH_KABI_H */
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1530