]> Zhao Yanbai Git Server - minix.git/commit
vfs: make m_out non-global 06/506/3
authorBen Gras <ben@minix3.org>
Fri, 12 Apr 2013 16:41:23 +0000 (16:41 +0000)
committerBen Gras <ben@minix3.org>
Fri, 12 Apr 2013 23:40:38 +0000 (23:40 +0000)
commitcef94e096ec2b8f3c0ab90f3af595a9c55bbe316
treea98c570eb0cad59fc7143b2a88b124f6e8e05a31
parentcb51426c6acb2793f0ac8dbd167afb1df9026918
vfs: make m_out non-global

m_out is shared between threads as the reply message, and it can happen
results get overwritten by another thread before the reply is sent. This
change

. makes m_out local to the message handling function,
  declared on the stack of the caller
. forces callers of reply() to give it a message, or
  declare the reply message has no significant fields except
  for the return code by calling replycode()

Change-Id: Id06300083a63c72c00f34f86a5c7d96e4bbdf9f6
19 files changed:
servers/vfs/device.c
servers/vfs/filedes.c
servers/vfs/glo.h
servers/vfs/link.c
servers/vfs/main.c
servers/vfs/misc.c
servers/vfs/mount.c
servers/vfs/open.c
servers/vfs/path.c
servers/vfs/pipe.c
servers/vfs/protect.c
servers/vfs/proto.h
servers/vfs/read.c
servers/vfs/select.c
servers/vfs/stadir.c
servers/vfs/table.c
servers/vfs/time.c
servers/vfs/utility.c
servers/vfs/write.c