git: c6bf733736b5 - stable/15 - jail: fix an error condition that was returned without setting errno.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 24 Oct 2025 01:12:01 UTC
The branch stable/15 has been updated by jamie:
URL: https://cgit.FreeBSD.org/src/commit/?id=c6bf733736b505da1c353759a76d17a2ac54475a
commit c6bf733736b505da1c353759a76d17a2ac54475a
Author: Jamie Gritton <jamie@FreeBSD.org>
AuthorDate: 2025-10-21 00:09:39 +0000
Commit: Jamie Gritton <jamie@FreeBSD.org>
CommitDate: 2025-10-24 01:11:50 +0000
jail: fix an error condition that was returned without setting errno.
MFC after: 3 days
(cherry picked from commit 5f7d5709e0c242d5a5fa5516d6079433ee06c347)
---
sys/kern/kern_jail.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c
index 00732d55cd46..267b60ffb5bc 100644
--- a/sys/kern/kern_jail.c
+++ b/sys/kern/kern_jail.c
@@ -1088,6 +1088,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags)
else {
if (!(flags & (JAIL_USE_DESC | JAIL_AT_DESC | JAIL_GET_DESC |
JAIL_OWN_DESC))) {
+ error = EINVAL;
vfs_opterror(opts, "unexpected desc");
goto done_errmsg;
}
@@ -2518,6 +2519,7 @@ kern_jail_get(struct thread *td, struct uio *optuio, int flags)
} else if (error == 0) {
if (!(flags & (JAIL_USE_DESC | JAIL_AT_DESC | JAIL_GET_DESC |
JAIL_OWN_DESC))) {
+ error = EINVAL;
vfs_opterror(opts, "unexpected desc");
goto done;
}