pivot_root.2: Add some more detail to the remaining EBUSY error

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2019-07-30 12:37:26 +02:00
parent 071505e9fb
commit b647c4c93a
1 changed files with 22 additions and 1 deletions

View File

@ -115,7 +115,28 @@ may fail with any of the same errors as
Additionally, it may fail with the following errors:
.TP
.B EBUSY
\fInew_root\fP or \fIput_old\fP are on the current root filesystem.
.\" Reconfirmed that the following error occurs on Linux 5.0 by
.\" specifying 'new_root' as "/rootfs" and 'put_old' as
.\" "/rootfs/oldrootfs", and *not* bind mounting "/rootfs" on top of
.\" itself. Of course, this is an odd situation, since a later check
.\" in the kernel code will in any case yield EINVAL if 'new_root' is
.\" not a mount point. However, when the system call was first added,
.\" 'new_root' was not required to be a mount point. So, this this
.\" error is nowadays probably just the result of crufty accumulation.
.\" This error can also occur if we bind mount "/" on top of itself
.\" and try to specify "/" as the 'new' (again, an odd situation). So,
.\" the EBUSY check in the kernel does still seem necessary to prevent
.\" that case. Furthermore, the "or put_old" piece is probably
.\" redundant text (although the check is in the kernel), since,
.\" in another check, 'put_old' is required to be under 'new_root'.
.I new_root
or
.I put_old
is on the current root filesystem.
(This error covers the pathological case where
.I new_root
is
.IR """/""" .)
.TP
.B EINVAL
.I new_root