freebsd-skq/sys/fs
Rick Macklem 6d7963ecd4 Ensure that the credentials field of the NFSv4 client open structure is
initialized.

bdrewery@ has reported panics "newnfs_copycred: negative nfsc_ngroups".
The only way I can see that this occurs is that the credentials field of
the open structure gets used before being filled in.
I am not sure quite how this happens, but for the file create case, the
code is serialized via the vnode lock on the directory. If, somehow, a
link to the same file gets created just after file creation, this might
occur.

This patch ensures that the credentials field is initialized to a reasonable
set of credentials before the structure is linked into any list, so I
this should ensure it is initialized before use.
I am committing the patch now, since bdrewery@ notes that the panics
are intermittent and it may be months before he knows if the patch fixes
his problem.

Reported by:	bdrewery
MFC after:	2 weeks
2017-06-22 00:17:15 +00:00
..
autofs Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
cd9660 Add MD_VERIFY option to enable O_VERIFY in open for vnode type. 2017-05-31 21:18:11 +00:00
cuse Minor code optimisation. 2017-05-31 21:05:24 +00:00
deadfs Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
devfs Commit the 64-bit inode project. 2017-05-23 09:29:05 +00:00
ext2fs Attempt to treat "metadata" as a collectively singular noun. 2017-06-20 20:22:34 +00:00
fdescfs Commit the 64-bit inode project. 2017-05-23 09:29:05 +00:00
fifofs Remove register keyword from sys/ and ANSIfy prototypes 2017-05-17 00:34:34 +00:00
fuse fuse: Implement FOPEN_KEEP_CACHE flag 2017-04-21 22:00:22 +00:00
msdosfs msdosfs: adjust #ifdefs to be similar to NetBSD 2017-06-12 20:42:37 +00:00
nandfs Commit the 64-bit inode project. 2017-05-23 09:29:05 +00:00
nfs Add the definition of maxbcachebuf to sys/buf.h. 2017-06-19 22:07:53 +00:00
nfsclient Ensure that the credentials field of the NFSv4 client open structure is 2017-06-22 00:17:15 +00:00
nfsserver Fix the NFS client/server so that it actually uses the 64bit ino_t filenos. 2017-06-18 21:48:31 +00:00
nullfs Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
procfs remove procfs ctl interface 2017-03-05 03:05:24 +00:00
pseudofs Forcibly remove the cached items from pseudofs vncache on module unload. 2017-01-09 20:14:18 +00:00
smbfs - Remove 'struct vmmeter' from 'struct pcpu', leaving only global vmmeter 2017-04-17 17:34:47 +00:00
tmpfs Remove mistakenly merged field. 2017-01-19 20:03:26 +00:00
udf On error, bread(9) zeroes buffer pointer, do not dereference it. 2016-11-22 13:24:57 +00:00
unionfs Renumber copyright clause 4 2017-02-28 23:42:47 +00:00