Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Jan 2024 00:37:32 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 7bc713a5a5cf - stable/14 - nmount: Ignore errors when copying out an error string
Message-ID:  <202401020037.4020bWWi085842@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=7bc713a5a5cf27140ad86a2ac805e9c0ea9bd083

commit 7bc713a5a5cf27140ad86a2ac805e9c0ea9bd083
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-12-26 01:43:21 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-01-02 00:29:58 +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 79a23b058add..c42fcfa7537b 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -1025,7 +1025,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);
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401020037.4020bWWi085842>