git: 96df9d0478ab - stable/13 - nmount: Ignore errors when copying out an error string
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 02 Jan 2024 01:13:14 UTC
The branch stable/13 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=96df9d0478ab642ba4ee8d89b4c2bef6328aa74c
commit 96df9d0478ab642ba4ee8d89b4c2bef6328aa74c
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-12-26 01:43:21 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-01-02 01:12:45 +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
(cherry picked from commit 099d25c354d93d9cd9c9cd261428f5ab0547a194)
---
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 8ad5b34c729d..756ac4789c8c 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -882,7 +882,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);
}