Date: Tue, 15 May 2018 16:24:58 +0000 (UTC) From: Brooks Davis <brooks@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333635 - head/sys/compat/freebsd32 Message-ID: <201805151624.w4FGOw5K052736@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: brooks Date: Tue May 15 16:24:58 2018 New Revision: 333635 URL: https://svnweb.freebsd.org/changeset/base/333635 Log: Allow freebsd32 __sysctl(2) to return ENOMEM. This is required by programs like sockstat that read variably sized sysctls such as kern.file. The normal path has no such restriction and the restriction was added without comment along with initial support for freebsd32 in 2002 (r100384). Reviewed by: kib Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D15438 Modified: head/sys/compat/freebsd32/freebsd32_misc.c Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Tue May 15 15:56:52 2018 (r333634) +++ head/sys/compat/freebsd32/freebsd32_misc.c Tue May 15 16:24:58 2018 (r333635) @@ -2263,7 +2263,7 @@ freebsd32_sysctl(struct thread *td, struct freebsd32_s error = userland_sysctl(td, name, uap->namelen, uap->old, &oldlen, 1, uap->new, uap->newlen, &j, SCTL_MASK32); - if (error && error != ENOMEM) + if (error) return (error); if (uap->oldlenp) suword32(uap->oldlenp, j);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805151624.w4FGOw5K052736>