bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 8/8] XXX fix the size of ipc_port structs


From: Justus Winter
Subject: [PATCH 8/8] XXX fix the size of ipc_port structs
Date: Fri, 29 Nov 2013 01:00:40 +0100

I do not know why this is happening, but w/o this, some kernel
pointers leak into the ip_protected_payload field. So it looks like
sizeof(struct ipc_tree_entry) is wrong here, not sure why
though. Maybe the global header is imported? But the compiler flags
should prevent this...
---
 ipc/ipc_init.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipc/ipc_init.c b/ipc/ipc_init.c
index ca7e791..092c6e0 100644
--- a/ipc/ipc_init.c
+++ b/ipc/ipc_init.c
@@ -80,7 +80,7 @@ ipc_bootstrap(void)
                        sizeof(struct ipc_tree_entry), 0, NULL, NULL, NULL, 0);
 
        kmem_cache_init(&ipc_object_caches[IOT_PORT], "ipc_port",
-                       sizeof(struct ipc_port), 0, NULL, NULL, NULL, 0);
+                       sizeof(struct ipc_port)+4, 0, NULL, NULL, NULL, 0);
 
        kmem_cache_init(&ipc_object_caches[IOT_PORT_SET], "ipc_pset",
                        sizeof(struct ipc_pset), 0, NULL, NULL, NULL, 0);
-- 
1.7.10.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]