[PATCH] Fix memcpy WARNING in kernel

Hannes Diethelm <[email protected]>
Newsgroups dev.linux.lists.xenomai
Message-ID <[email protected]>
Related to https://lore.kernel.org/xenomai/[email protected]/T/#t I try my first
patch submit on a mailing list. I hope this is all right.

 From 34d65bcc3343b5323f19cd73561bf39d2652481c Mon Sep 17 00:00:00 2001
From: Hannes Diethelm <[email protected]>
Date: Fri, 10 Apr 2026 21:56:16 +0200
Subject: [PATCH] Fix memcpy WARNING in kernel

Warning was:
memcpy: detected field-spanning write (size 80) of single field "call->priv_data" at drivers/xenomai/net/stack/rtnet_rtpc.c:93 (size 0)

Signed-off-by: Hannes Diethelm <[email protected]>
---
  kernel/drivers/net/stack/include/rtnet_rtpc.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/drivers/net/stack/include/rtnet_rtpc.h b/kernel/drivers/net/stack/include/rtnet_rtpc.h
index 01d7ab152..f4ad47306 100644
--- a/kernel/drivers/net/stack/include/rtnet_rtpc.h
+++ b/kernel/drivers/net/stack/include/rtnet_rtpc.h
@@ -43,7 +43,7 @@ struct rt_proc_call {
  	atomic_t ref_count;
  	wait_queue_head_t call_wq;
  	rtpc_cleanup_proc cleanup_handler;
-	char priv_data[0] __attribute__((aligned(8)));
+	char priv_data[] __attribute__((aligned(8)));
  };
  
  #define CALL_PENDING 1000 /* result value for blocked calls */
-- 
2.47.3
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.