aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamie Gritton <jamie@FreeBSD.org>2021-09-29 17:20:36 +0000
committerJamie Gritton <jamie@FreeBSD.org>2021-09-29 17:20:36 +0000
commit747a47261eee59b6e9c437cd2c1b3979df5c32ac (patch)
tree6e083f666e1461b205cc0d759d92d7b2ddeb0f5e
parentf6de51d3e0315891f6ea9d12340b98336df409b7 (diff)
downloadsrc-747a47261eee59b6e9c437cd2c1b3979df5c32ac.tar.gz
src-747a47261eee59b6e9c437cd2c1b3979df5c32ac.zip
Fix error return of kern.ipc.posix_shm_list, which caused it (and thus
"posixshmcontrol ls") to fail for all jails that didn't happen to own the last shm object in the list.
-rw-r--r--sys/kern/uipc_shm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c
index c672c0477b95..63c4250f640f 100644
--- a/sys/kern/uipc_shm.c
+++ b/sys/kern/uipc_shm.c
@@ -2045,8 +2045,10 @@ sysctl_posix_shm_list(SYSCTL_HANDLER_ARGS)
LIST_FOREACH(shmm, &shm_dictionary[i], sm_link) {
error = shm_fill_kinfo_locked(shmm->sm_shmfd,
&kif, true);
- if (error == EPERM)
+ if (error == EPERM) {
+ error = 0;
continue;
+ }
if (error != 0)
break;
pack_kinfo(&kif);