The branch main has been updated by imp:

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

commit ea60d917e5b1943c8638af056dbcdbb3646207f1
Author:     Ricardo Branco <rbra...@suse.de>
AuthorDate: 2025-02-06 21:46:19 +0000
Commit:     Warner Losh <i...@freebsd.org>
CommitDate: 2025-07-26 17:12:38 +0000

    linprocfs: Continue on error when reading process limits
    
    The process limits may be unavailable due to capsicum. Like other areas
    of the system, report what we can w/o error. This is what Linux does.
    
    PR: 283726
    Reviewed by: imp, dchagin
    Pull Request: https://github.com/freebsd/freebsd-src/pull/1592
---
 sys/compat/linprocfs/linprocfs.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c
index cfb054235489..1c6d64d6b8bc 100644
--- a/sys/compat/linprocfs/linprocfs.c
+++ b/sys/compat/linprocfs/linprocfs.c
@@ -1911,7 +1911,7 @@ linprocfs_doproclimits(PFS_FILL_ARGS)
                            "kern.sigqueue.max_pending_per_proc",
                            &res, &size, 0, 0, 0, 0);
                        if (error != 0)
-                               goto out;
+                               continue;
                        rl.rlim_cur = res;
                        rl.rlim_max = res;
                        break;
@@ -1919,7 +1919,7 @@ linprocfs_doproclimits(PFS_FILL_ARGS)
                        error = kernel_sysctlbyname(td,
                            "kern.ipc.msgmnb", &res, &size, 0, 0, 0, 0);
                        if (error != 0)
-                               goto out;
+                               continue;
                        rl.rlim_cur = res;
                        rl.rlim_max = res;
                        break;
@@ -1941,9 +1941,9 @@ linprocfs_doproclimits(PFS_FILL_ARGS)
                            li->desc, (unsigned long long)rl.rlim_cur,
                            (unsigned long long)rl.rlim_max, li->unit);
        }
-out:
+
        lim_free(limp);
-       return (error);
+       return (0);
 }
 
 /*

Reply via email to