From nobody Wed Jul 20 08:47:07 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Lnq7w0SXFz4WRcd; Wed, 20 Jul 2022 08:47:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Lnq7v75Sgz45B9; Wed, 20 Jul 2022 08:47:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658306828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Spx8+voD0SVIRQ+O1RQMXuTEYWHlpJcEOnzPB2T/g3M=; b=XOp4IY4Armq35KTtJZC1qVMijmDRL82WYpTfKwGAUsMFCxk2IY5EHvpAmqIyiUkWRR/s6O M+3S47JthbA4foigLOyGJUohVNTLr2xZVvLlfgQee7MHOL1M1g03+iXD/jqmmJyF5R5N4Q nDj90NaStKIaZumlnrERh06rbYVOu65Xv+/TC8CaA6Qq4f83G6Qg6e7DS5xksmNiYUY69c vdiNGuYgyi///xX6f1WsCbEOUGe9WAs3HFTaG5HSDFoxdZ/9XoYcNDqGoXh98+BS0WXk95 MolJ1EBuMf1o/GWbcJBpp/l7mRFByRXZ57qgeP7K36rWI2U2YPNbtyZc66vmgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Lnq7v6879zsM5; Wed, 20 Jul 2022 08:47:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 26K8l7gc075431; Wed, 20 Jul 2022 08:47:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26K8l79V075430; Wed, 20 Jul 2022 08:47:07 GMT (envelope-from git) Date: Wed, 20 Jul 2022 08:47:07 GMT Message-Id: <202207200847.26K8l79V075430@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: 0996dd7df688 - main - cuse(3): Fix an off-by-one. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0996dd7df688921bd41b255e4cdcc155fda8461a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658306828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Spx8+voD0SVIRQ+O1RQMXuTEYWHlpJcEOnzPB2T/g3M=; b=aWEyOXtyLm6JEuRP/eTAXH4QY5A2hrFQ3tDqFBjbSF9QwdhtBYXe5dt1W7KF/9W5wYlm7H 2xaALnqtKbmOH2x6aG1O3z0hJovtbQfOnCfvv7xrLL2ZZMtCAXsiuhRPe449i3vbIVtvZB llfpWcNX9Q7GwRFU4h4ERuB/WaQLmStH805+Y8j+3Dg8rOzkI5pTpF1Sw/Yxba2K3zFZda VJ4dy+w9PyBI3V0UABMXzqtluFSVKiMqM0js5/GV0ypfpUCA3DnC/ziqKlXskhLt/NgPTu kQaAUBc7zb+2OJDGQCIcB1V1lplgaoVR1yNSF71KsSzp0OKTyhKUw+C4ydUQDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658306828; a=rsa-sha256; cv=none; b=dxdnCgwNletsk0+9H53z6NtXzIlSvG3x74Z099Pq6qeOgm1LbVwqtIrCqoDssJfaQohf08 JwZhaL8e7RoT+NfNI9K+kRgUQxfyGlO1BexIzABZVb7746Cq2yv/TkuOECDToSoSkfw6QW EoZ5oytNiE5NpcpDgihUF7jhM8KCHYC0qHgOUs3Fln5fN7ih0PaxvFuL7QNP/EBWuT52k4 Rx8kemiaV/OmlmvkXmrB2NNk2rAX+R0NRnWPCjwW0e/oWaoL+BMX6AtsXoFUJdlZLlfUW1 EZr2gUxXWlCWed8vttdqccS07XwjsR/vXLSglnBYPp0tKkoz78J2vxvA+ZdhVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=0996dd7df688921bd41b255e4cdcc155fda8461a commit 0996dd7df688921bd41b255e4cdcc155fda8461a Author: Hans Petter Selasky AuthorDate: 2022-07-13 13:53:49 +0000 Commit: Hans Petter Selasky CommitDate: 2022-07-20 08:41:11 +0000 cuse(3): Fix an off-by-one. The page allocation limit is inclusive and not exclusive. MFC after: 1 week Sponsored by: NVIDIA Networking --- sys/fs/cuse/cuse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/cuse/cuse.c b/sys/fs/cuse/cuse.c index 7c7d8ec20493..5a0d0263738e 100644 --- a/sys/fs/cuse/cuse.c +++ b/sys/fs/cuse/cuse.c @@ -1159,7 +1159,7 @@ cuse_server_ioctl(struct cdev *dev, unsigned long cmd, error = ENOMEM; break; } - if (pai->page_count >= CUSE_ALLOC_PAGES_MAX) { + if (pai->page_count > CUSE_ALLOC_PAGES_MAX) { error = ENOMEM; break; }