From 39e7ddce214b018630bb1483df0826015f1a0ef2 Mon Sep 17 00:00:00 2001 From: Jiaolong He Date: Wed, 12 Jul 2023 14:13:57 +0800 Subject: [PATCH] chushi: kabi: add reserved fields for core structure of message queue add reserved fields to msg_msg for kernel binary interface compatibility or emergency bug fix. and initialize them to zero when allocated. Signed-off-by: Jiaolong He --- include/linux/msg.h | 4 ++++ ipc/msgutil.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/include/linux/msg.h b/include/linux/msg.h index 9a972a296b95..8b92a842f470 100644 --- a/include/linux/msg.h +++ b/include/linux/msg.h @@ -12,6 +12,10 @@ struct msg_msg { size_t m_ts; /* message text size */ struct msg_msgseg *next; void *security; + + unsigned long chushi_reserve1; + unsigned long chushi_reserve2; + /* the actual message follows immediately */ }; diff --git a/ipc/msgutil.c b/ipc/msgutil.c index d0a0e877cadd..5b52d1dc7a8d 100644 --- a/ipc/msgutil.c +++ b/ipc/msgutil.c @@ -56,6 +56,8 @@ static struct msg_msg *alloc_msg(size_t len) msg->next = NULL; msg->security = NULL; + msg->chushi_reserve1 = 0; + msg->chushi_reserve2 = 0; len -= alen; pseg = &msg->next;