git: 099d25c354d9 - main - nmount: Ignore errors when copying out an error string
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 26 Dec 2023 02:04:33 UTC
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=099d25c354d93d9cd9c9cd261428f5ab0547a194 commit 099d25c354d93d9cd9c9cd261428f5ab0547a194 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2023-12-26 01:43:21 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2023-12-26 02:04:01 +0000 nmount: Ignore errors when copying out an error string In general we copy error strings as part of reporting an error from lower layers, so if the copyout() fails there's nothing to do since we'd prefer to preserve the original error. This is in preparation for annotating copyin() and related functions with __result_use_check. Reviewed by: olce, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43147 --- sys/kern/vfs_mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 331e4887c200..347ec7f70aaf 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -1024,7 +1024,7 @@ bail: fsoptions->uio_iov[2 * errmsg_pos + 1].iov_base, fsoptions->uio_iov[2 * errmsg_pos + 1].iov_len); } else { - copyout(errmsg, + (void)copyout(errmsg, fsoptions->uio_iov[2 * errmsg_pos + 1].iov_base, fsoptions->uio_iov[2 * errmsg_pos + 1].iov_len); }