From owner-svn-src-stable@freebsd.org Wed Mar 22 17:19:29 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84189D185D5; Wed, 22 Mar 2017 17:19:29 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 629BF1239; Wed, 22 Mar 2017 17:19:29 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 4A3EE10A7DB; Wed, 22 Mar 2017 13:19:28 -0400 (EDT) From: John Baldwin To: Slawa Olhovchenkov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: Re: svn commit: r313450 - in stable/11: lib/libc/gen lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys Date: Wed, 22 Mar 2017 09:52:01 -0700 Message-ID: <3048399.ogXM26kenL@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20170322124049.GY70430@zxy.spb.ru> References: <201702081832.v18IWZlC001828@repo.freebsd.org> <18428734.CRRuMZqGsJ@ralph.baldwin.cx> <20170322124049.GY70430@zxy.spb.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Wed, 22 Mar 2017 13:19:28 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Mar 2017 17:19:29 -0000 On Wednesday, March 22, 2017 03:40:49 PM Slawa Olhovchenkov wrote: > On Tue, Mar 21, 2017 at 08:05:31PM -0700, John Baldwin wrote: > > > On Wednesday, March 15, 2017 05:30:53 PM Slawa Olhovchenkov wrote: > > > On Wed, Feb 08, 2017 at 06:32:35PM +0000, John Baldwin wrote: > > > > > > > Author: jhb > > > > Date: Wed Feb 8 18:32:35 2017 > > > > New Revision: 313450 > > > > URL: https://svnweb.freebsd.org/changeset/base/313450 > > > > > > > > Log: > > > > MFC 310638: > > > > Rename the 'flags' argument to getfsstat() to 'mode' and validate it. > > > > > > > > This argument is not a bitmask of flags, but only accepts a single value. > > > > Fail with EINVAL if an invalid value is passed to 'flag'. Rename the > > > > 'flags' argument to getmntinfo(3) to 'mode' as well to match. > > > > > > > > This is a followup to r308088. > > > > > > > kern_getfsstat(struct thread *td, struct statfs **buf, size_t bufsize, > > > > - size_t *countp, enum uio_seg bufseg, int flags) > > > > + size_t *countp, enum uio_seg bufseg, int mode) > > > > { > > > > struct mount *mp, *nmp; > > > > struct statfs *sfsp, *sp, *sptmp, *tofree; > > > > size_t count, maxcount; > > > > int error; > > > > > > > > + switch (mode) { > > > > + case MNT_WAIT: > > > > + case MNT_NOWAIT: > > > > + break; > > > > + default: > > > > + return (EINVAL); > > > > + } > > > > restart: > > > > > > This is break net-snmp UCD-SNMP-MIB::dskTable oid: > > > > > > 82434 snmpd CALL getfsstat(0,0,) > > > 82434 snmpd RET getfsstat -1 errno 22 Invalid argument > > > 82434 snmpd CALL getfsstat(0,0xfffffffffffffe28,MNT_NOWAIT) > > > 82434 snmpd RET getfsstat -1 errno 22 Invalid argument > > > 82434 snmpd CALL write(0x9,0x800f162ea,0x1) > > > void > netsnmp_fsys_arch_load( void ) > { > int n, i; > struct NSFS_STATFS *stats; > netsnmp_fsys_info *entry; > > /* > * Retrieve information about the currently mounted filesystems... > */ > n = NSFS_GETFSSTAT( NULL, 0, 0 ); > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Ah, thanks. I've created a bug with a patch to the port (218011). Would you be able to verify the patch works correctly? It changes this call to use MNT_NOWAIT. -- John Baldwin