Commit e5a96cf6 authored by Wei Li's avatar Wei Li Committed by Zheng Zengkai
Browse files

kabi: fix build error when CONFIG_KABI_RESERVE=n

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4T1NF


CVE: NA

-------------------------------------------------

When CONFIG_KABI_RESERVE=n && CONFIG_KABI_SIZE_ALIGN_CHECKS=y, with kabi
reserved padding replaced by KABI_USE(), we will get the build error:

include/linux/kabi.h:383:3: error: static assertion failed: \
	"include/linux/fs.h:2306: long aaa is larger than . \
	Disable CONFIG_KABI_SIZE_ALIGN_CHECKS if debugging."
   _Static_assert(sizeof(struct{_new;}) <= sizeof(struct{_orig;}), \
   ^~~~~~~~~~~~~~

In fact, the result of KABI_USE() when CONFIG_KABI_RESERVE=n is weird,
update _KABI_REPLACE() to fix this.

Signed-off-by: default avatarWei Li <liwei391@huawei.com>
Reviewed-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent cf8834e7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment