]> Zhao Yanbai Git Server - minix.git/commit
VFS: make message pointer management more robust 69/3069/1
authorDavid van Moolenbroek <david@minix3.org>
Mon, 10 Aug 2015 16:07:31 +0000 (18:07 +0200)
committerDavid van Moolenbroek <david@minix3.org>
Mon, 31 Aug 2015 12:58:39 +0000 (12:58 +0000)
commit29e004d23b889741e86581fc54384bc656f7013b
treeb776d013f34257cae2172e3e044419ca609b8a27
parent56ac45c10b294dc800c4cce9e53df7b2ae2495d2
VFS: make message pointer management more robust

The previous approach of storing pointers to messages structures for
thread-blocking sendrec operations relied on several assumptions,
which if violated could lead to odd cases of memory corruption.
With this patch, VFS resets pointers right after use, avoiding that
any dangling pointers are accidentally dereferenced later.  This
approach was already used in some cases, but not all of them.

Change-Id: I752d994ea847b46228bd2ccf4e537deceb78fbaf
minix/servers/vfs/comm.c
minix/servers/vfs/device.c
minix/servers/vfs/main.c
minix/servers/vfs/worker.c