From nobody Tue Dec 17 09:00:27 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 4YC9kh3rNtz5gv2p; Tue, 17 Dec 2024 09:00:28 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YC9kh1k7tz3xch; Tue, 17 Dec 2024 09:00:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734426028; 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=5URY5iCYIDm5RL+6Q1x4c08YUqhs1EMJ0CvS+QtfrBE=; b=ancTAGXFHev9a/eEnqO/LJ32cYECTtTMTQ4NDgrp93MohximNoQOoiBpy7bM83gMeIfu6t gk4sDdBJowVhVCGDckONF0rjJLdeXWy/27n/H3C/RURr5HSiUeKeodpfrQ2UGNwq73emVG bVCwPVhsxfevGjP637mZVvw9SbCgjQlYY06yDo/U2HOFKzSmpFwiwZJz5zlI3s3Ype20K/ OYKQjmX5Z32B8JzvDmxDw29PniwDMfy4Nn0k1oUPFIq7Gsci5orrzFKOizuOk9Z2ih9hVG MvsjU21yR9+M52n2yMqh5KezmPxRUvQlrK+2VtuRGRMuAkFUujSFBcoW2b5kMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734426028; 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=5URY5iCYIDm5RL+6Q1x4c08YUqhs1EMJ0CvS+QtfrBE=; b=U7ZEa9Ucd/0/bX6MO7oxWmc+yh4oWnsNWl7BTEaBzvf6yUxQHLHPKBV65N/KSM1sxUEtae Qcy6CoPV/wnwFdG3OhKMaKQgzfvJ5O9bw88P+9Ivy1DGYeTWu3fjzcfF0RLS1GnbvECpqH KJYJLigTFgdoRfeUpZlwV+FPAul7JxyHRktU45rd2J+qDlC6giJlrzsK0ZuNpZMxLC5wrY 2f2xihiD5wiXNiuvQ3Vmvxdm3Y6m16m0Uf6LhioODBvABEcOI0r0JzDjdOFmMUclauW3Cp Txqvw+W23yHU0XNKh/YvLT/4sPIFwLRcEOhovP68/PfAAxNXlBjPUXcabcI9zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734426028; a=rsa-sha256; cv=none; b=DdGnEUN11XZvaGx0sDaguFDbzUSPopioY7bEaDga6EY5yfU0LaWLwF5oJZ/GwllK81wCyC pBtbZUBCvwjmW0PuzMwtYptR6NdvQIOx3lN1/lsuiB8A35v7fCjjvb6c1L4oTbdSp7lDht A2p06p+JHASRpwZpcz46V8I6rNSiKGndph6vzhgoTc6F5h39nUpcHDwDbPTjM/OmIWdu6g uqA5Q/iQY/Sskm5jJj75mCsFxpgsjkGb8MSwZlxgizKBAJe0yowjNi7hbW57MHql2Bol5K XmjgLhYd7iUSIaqscU5FGMhsbfLQr3Aui/fPiPIyRy5s0U3WKmpZUd8FAQpdKw== 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 4YC9kh0MCBzGlZ; Tue, 17 Dec 2024 09:00:28 +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 4BH90RPN000992; Tue, 17 Dec 2024 09:00:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BH90RYI000989; Tue, 17 Dec 2024 09:00:27 GMT (envelope-from git) Date: Tue, 17 Dec 2024 09:00:27 GMT Message-Id: <202412170900.4BH90RYI000989@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Osipov Subject: git: 58c7db14cd71 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 58c7db14cd71c41f59d80d26d921782c0c27d523 Auto-Submitted: auto-generated The branch main has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=58c7db14cd71c41f59d80d26d921782c0c27d523 commit 58c7db14cd71c41f59d80d26d921782c0c27d523 Author: Michael Osipov AuthorDate: 2024-12-02 13:25:45 +0000 Commit: Michael Osipov CommitDate: 2024-12-17 08:59:38 +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 --- 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 c5b6ec9b32c1..587c7412d80a 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -537,9 +537,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--) { @@ -559,6 +557,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);