mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-23 11:18:54 +00:00
filedesc: make sure to force table reload in fget_unlocked when count == 0
This is a fixup to r273843.
This commit is contained in:
parent
de9dd94772
commit
f55cf4b0d1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=273845
@ -2362,7 +2362,12 @@ fget_unlocked(struct filedesc *fdp, int fd, cap_rights_t *needrightsp,
|
||||
retry:
|
||||
count = fp->f_count;
|
||||
if (count == 0) {
|
||||
fdt = fdp->fd_files;
|
||||
/*
|
||||
* Force a reload. Other thread could reallocate the
|
||||
* table before this fd was closed, so it possible that
|
||||
* there is a stale fp pointer in cached version.
|
||||
*/
|
||||
fdt = *(struct fdescenttbl * volatile *)&(fdp->fd_files);
|
||||
continue;
|
||||
}
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user