From nobody Tue Dec 31 12:37:54 2024 X-Original-To: dev-commits-src-all@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 4YMsv66Tb5z5jP9r; Tue, 31 Dec 2024 12:37:54 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YMsv61hLkz4gHf; Tue, 31 Dec 2024 12:37:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735648674; 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=aEoDpS4QSKAl1FFJ+/5f/Zo/4RwGkA2abX6VaWmpRVQ=; b=kT19jk3ILlSOvpw47K5zf6QuuSomCktZIsrvLJT79eJc3WK7WiwuQy3AF1SRcYp7Xq2KBg 6LHLJNnkVv22UYR5PQuDCrQ73fdkUj+bNN82s8IqfEaN67FxqkPG9B9FIklCf1rvwVbD/Q wwQID3VCGp9nsRakH1ZIOj8SVYDlWfRsWZKU0CbfTudnOyNxU32HWU62YpZlLG1WMcxXvX 4efXfJVEbb1qjMCpFTnskcCYsCCqolOLCGzc/N2JNWCevDxZiZHvLibuE9iAwEp/duxvP5 Ji9sO+i1cg6CjFwG+bBy51lL5Fz2Dhfv21vSky6dgez3RDyYIZE8Sa3Vj8fRrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735648674; 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=aEoDpS4QSKAl1FFJ+/5f/Zo/4RwGkA2abX6VaWmpRVQ=; b=rU7mqERjrjdJa+1Q+WxZamNSZOMob7lDFtOD0bM4gDiJPT/VC6KjyKLNo48n7Gb+e4k/UI kGvf4sYTVcOYLBi0bCeDM2ev0wZeWXGedVjiRATcscMllYOPFIsalsQeW3fSWeTlFgC8Sy lrxSBKNyqxshvT72D1Be/fHa8YBsGUOSFLgDccI863s7bd7fiv290Qpjv6Mkzx7aW52nhB gZp03E5QPpxyn24mx8dB2w72LiXxaV2alTHHL7NodMujh5n3jpBfXRfRJd+bARcP+Hp35H BZ2loCwqxR+U9BGRH4OWmMMo3XqhioGolhweei2MG1hiVfAsu6VFme975jf4Bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1735648674; a=rsa-sha256; cv=none; b=WkY+8kLR4qFI3WUt8NutZ7xosyWnAPhOZDOmvGKQRbEiTcKerK+v13bkS8CXvu5dXQ7O3u 4eTD2TQdUH3RKnF1RFRGhLQExMH3Culxt17l/4fswjXkyEdKn+iFu+KCu2AzAOP2Miv2oX lOeyNRChfjSBjgIWamF8tmJuOcb84IgBMPnY4fYl5kBFSthqZ/nYRUVtXgRTTKjNfaB/PK WDd+O0qIM+0oazYeWwycYQRWmd4/gjmJYMVOvXeH65D0xs5DrX9VBYIaBFswzcTq+hWy0t 6G2fgJXVHNvTvfsb3+fsa8m79EeuAOuAQm+oX0GMYxQVQzZdgKMj4iyKN4eWyQ== 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 4YMsv60qH1zgB6; Tue, 31 Dec 2024 12:37:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4BVCbsbV093969; Tue, 31 Dec 2024 12:37:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BVCbscc093966; Tue, 31 Dec 2024 12:37:54 GMT (envelope-from git) Date: Tue, 31 Dec 2024 12:37:54 GMT Message-Id: <202412311237.4BVCbscc093966@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Osipov Subject: git: 3f00a0678b9d - stable/13 - linprocfs: Properly reset error variable for mtab generation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3f00a0678b9de3657d859e590adb3e646aebb2ae Auto-Submitted: auto-generated The branch stable/13 has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=3f00a0678b9de3657d859e590adb3e646aebb2ae commit 3f00a0678b9de3657d859e590adb3e646aebb2ae Author: Michael Osipov AuthorDate: 2024-12-02 13:25:45 +0000 Commit: Michael Osipov CommitDate: 2024-12-31 12:37:39 +0000 linprocfs: Properly reset error variable for mtab generation Both functions linprocfs_domtab() and linprocfs_doprocmountinfo() are logically identical, but the former fails with ECANCELED because error is not reset after the for loop. Reviewed by: jrm, fluffy MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D47865 (cherry picked from commit 58c7db14cd71c41f59d80d26d921782c0c27d523) --- sys/compat/linprocfs/linprocfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index f8bbb0d8fbfc..0a471f684680 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -543,9 +543,7 @@ linprocfs_domtab(PFS_FILL_ARGS) error = kern_getfsstat(td, &buf, SIZE_T_MAX, &count, UIO_SYSSPACE, MNT_WAIT); if (error != 0) { - free(buf, M_TEMP); - free(flep, M_TEMP); - return (error); + goto out; } for (sp = buf; count > 0; sp++, count--) { @@ -565,6 +563,8 @@ linprocfs_domtab(PFS_FILL_ARGS) sbuf_printf(sb, " 0 0\n"); } + error = 0; +out: free(buf, M_TEMP); free(flep, M_TEMP); return (error);