The branch main has been updated by jamie:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=5f7d5709e0c242d5a5fa5516d6079433ee06c347

commit 5f7d5709e0c242d5a5fa5516d6079433ee06c347
Author:     Jamie Gritton <[email protected]>
AuthorDate: 2025-10-21 00:09:39 +0000
Commit:     Jamie Gritton <[email protected]>
CommitDate: 2025-10-21 00:09:39 +0000

    jail: fix an error condition that was returned without setting errno.
    
    MFC after:      3 days
---
 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;
                }

Reply via email to