Go to file
dholland 2c056b2ccb Fix (finally) the rest of PR 47040.
Revert the supporting logic in -r1.190 of vfs_lookup.c, and fix the
important change to set searchdir = NULL instead of searchdir =
foundobj. Then supply the necessary new supporting logic to cope with
some new cases where searchdir can be null.

This is at the point when lookup_once crosses a mountpoint going down;
the idea was to avoid coupling locks across filesystems as that has a
number of potentially negative consequences. At this stage of namei,
though, it's important to set searchdir to null as this is what is
used later on to handle other cases arising from crossing mount
points. If you set it to be the same as foundobj, that instead creates
the impression that you looked up "/." on the new volume, and that
causes odd things to happen in corner cases such as the one appearing
in PR 47040.

This fix ought to be pulled up to -6 and -7, and it probably could be
safely, but given the delicacy of this code and the fact that it's
taken me more than three years to find the combination of time and
intestinal fortitude to do it, as well as the minor nature of the
resulting wrong behavior observed so far, I think we'll let that part
go.

This change also exposes an annoying corner case: if you cross a mount
point and the root directory vnode of the new volume is not a
directory but a symlink, we now have no searchdir to follow the
symlink relative to. In principle one could hang onto the searchdir
from before calling lookup_once and use that, or complexify the
interface of lookup_once to hang onto it as desired for this case.
Alternatively one could add the necessary null checks to namei_follow
and allow only absolute symlinks in this case, as for an absolute
symlink one doesn't need the old searchdir. However, given that only
broken filesystems have symlinks as their root vnodes, I'm not going
to bother. Instead if this happens we'll just fail with ENOTDIR.
2016-04-12 04:02:55 +00:00
bin Remove some double quotes. 2016-04-04 13:05:56 +00:00
common fix infinite recursion through thr_getspecific 2016-02-28 02:56:39 +00:00
compat remove the xfree86 reachover makefiles and the vast majority of 2015-07-23 08:03:24 +00:00
crypto regen with old assembly stubs. 2016-03-21 19:13:15 +00:00
dist/pf Fix obviously broken condition. 2015-08-28 12:17:41 +00:00
distrib Fix libutil version bump 2016-04-11 17:00:36 +00:00
doc Note import of openresolv-3.8.0 2016-04-11 10:44:30 +00:00
etc Add regression tests for some past gdb bugs. 2016-04-08 10:09:16 +00:00
external Fix build for operesolv-3.8.0 2016-04-11 10:43:24 +00:00
extsrc
games tetris(6) is not limited to CRT displays. noted by tnn 2016-03-12 03:14:59 +00:00
gnu has moved to external/gpl3 2016-01-16 18:41:12 +00:00
include Implement pidfile_lock, pidfile_read and pidfile_clean. 2016-04-10 19:05:50 +00:00
lib From Ingo Schwarze: 2016-04-12 00:16:06 +00:00
libexec move the compiler hack closer to the source of the fail 2016-03-18 10:10:21 +00:00
regress PR/50941: David Binderman: fix printf format 2016-03-11 18:26:40 +00:00
rescue Remove rtsol(8) and rtsold(8) as their functionality is in dhcpcd(8). 2014-09-11 13:10:03 +00:00
sbin Separate nexthop caches from the routing table 2016-04-04 07:37:07 +00:00
share Clarify wording about when to use PSLIST_ENTRY_DESTROY. 2016-04-11 13:45:20 +00:00
sys Fix (finally) the rest of PR 47040. 2016-04-12 04:02:55 +00:00
tests Introduce pserialize-safe linked lists. 2016-04-09 04:39:46 +00:00
tools Disable stripping pcc tool. 2016-03-30 23:36:45 +00:00
usr.bin __diagused, not __unused -- used in an assert. 2016-04-07 23:29:59 +00:00
usr.sbin Sort sections. Use more markup. 2016-04-10 09:49:14 +00:00
build.sh Make evbarm64 (little endian) the default for aarch64. 2015-06-27 06:00:28 +00:00
BUILDING Document MKREPRO_TIMESTAMP. 2016-01-29 13:51:13 +00:00
Makefile fix direct reference to texinfo, bleh 2016-01-14 02:51:25 +00:00
Makefile.inc
UPDATING add a simple note about GCC 5.3. 2016-04-03 06:16:02 +00:00