OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_76-4569-gb9647ac
Gerrit Code Review
Sat, 31 Jan 2015 08:29:46 -0500
The following commit has been merged in the master branch:
Author: Andrew Deason <email@example.com>
Date: Fri Jan 30 13:08:19 2015 -0600
SOLARIS: Avoid uninitialized caller_context_t
Currently we pass a caller_context_t* to some of Solaris' VFS
functions (VOP_SETATTR, VOP_READ, VOP_WRITE, VOP_RWLOCK,
VOP_RWUNLOCK), but the pointer we pass is to uninitialized memory.
This code was added in commit 51d76681, and this particular argument
is mentioned in
where the author doesn't really know what the argument is for.
Over 10 years later, it's still not obvious what this argument does,
since I cannot find any documentation for it. However, browsing
publicly-available Illumos/OpenSolaris source suggests this is used
for things like non-blocking operations for network filesystems, and
is only interpreted by certain filesystems in certain codepaths.
In any case, it's clear that we're not supposed to be passing in an
uninitialized structure, since the struct has actual members that are
sometimes interpreted by lower levels. Other callers in
Illumos/OpenSolaris source seem to just pass NULL here if they don't
need any special behavior. So, just pass NULL.
I am not aware of any issues caused by passing in this uninitialized
struct, and browsing Illumos source and discussing the issue with
Oracle engineers suggest there would currently not be any issues with
the cache filesystems we would be using.
However, it's always possible that issues could arise from this in the
future, or there are issues we don't know about. Any such issues would
almost certainly appear to be non-deterministic and be a nightmare to
track down. So just pass NULL, to avoid the potential issues.
Reviewed-by: Perry Ruiter <firstname.lastname@example.org>
Tested-by: BuildBot <email@example.com>
Reviewed-by: Daria Brashear <firstname.lastname@example.org>
src/afs/SOLARIS/osi_file.c | 6 +-----
src/afs/VNOPS/afs_vnop_read.c | 9 +++------
src/afs/VNOPS/afs_vnop_write.c | 10 +++-------
3 files changed, 7 insertions(+), 18 deletions(-)
OpenAFS Master Repository