From nobody Fri Aug 26 18:19:37 2022 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 4MDp5Q0scqz4ZdfN; Fri, 26 Aug 2022 18:19:38 +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 4MDp5Q0J1Rz3bhL; Fri, 26 Aug 2022 18:19:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661537978; 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=XgSIEA6J9nhtxglk4PTjPxD3Bn8Y0qWZr2aWTIuxCPQ=; b=S2QGXlIzuEFRBcCxSIDWwNxke41kQ1QLUUOdrV7i84zdSz3dbE1Okgl7gp9RpfVRJ454Yw KI1nAU+wwH3vwH50y+6ZA8BJ9bbE85WQYTIKh/b9PXeb5vOsJgkps8feUQkZkqYZ4EWcBj 2cUH8GZv28a6PCrf9CkGxe6L5lPGMCKx8ea7/UuEzEHU8rGXThJKxKu6V2W3pH+vfUVq0c hc8imnU0mDSuOLhB58T8BTUdQhC8MrsNJrC4sv2+tczlKY+Q2brmcQ14qy9VLft7dat9VI A+pjuILV5wWbBbt91E/B3zDEAC1iAEs0xS7l7+EYnMIEe5FHwNBlCU3aBCc8Vg== 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 4MDp5P6TWnzV4L; Fri, 26 Aug 2022 18:19:37 +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 27QIJbJ9033296; Fri, 26 Aug 2022 18:19:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27QIJbjH033295; Fri, 26 Aug 2022 18:19:37 GMT (envelope-from git) Date: Fri, 26 Aug 2022 18:19:37 GMT Message-Id: <202208261819.27QIJbjH033295@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: e3885a7893d4 - main - soo_stat: Ensure error is always initialized. 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e3885a7893d48f8d38cba427f3fb9a404d1bde23 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661537978; 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=XgSIEA6J9nhtxglk4PTjPxD3Bn8Y0qWZr2aWTIuxCPQ=; b=GSnta3erMUdiLp19mGZnRyRIDMtCRihrtfVJBExpboXI7LwgggRTE4tutwd5gEo5D8zEss 3Jl3Ox93tNlDngTOdYSZkoZr+UgtZjGme5+8Ebcgrf4kiDiXpl2/ohCt3iSRBEgo2FkPj5 fYc7ZyCaynnktZ+DXa0Mfd5rpo8F73IL0MLdWt5gfJI02LGB7yl/GEBRAbqs22Vt0MmE2E B0J4G5EiPXvbJG80BJVF5KquKATA2g+NI6tmGLetr2qb8X+M9pOGZZjrEKbt1/ks6slv6h pX6UWWMYfw6O533H5/n5TDDPRU30F/rkg7d6UytrzkCH/Mrn/vr2wdm2kixo+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661537978; a=rsa-sha256; cv=none; b=GQ8EPzkTjOkhwloDgezV2mMiAGIXZ31Rg15G0T+uJvjjlwZykK4WNMV0uGUY4vJp3rkEPG nHVLl5F0ob94eSvd962Mpqq1tcQZP4T9Pskkn8TlWa490K8TYW2nmJTKfEd50kPjSsdadp DEflcTm1avdwysZFnhm+tP6+pFlVI0Lcs4zVgttW0IYdygh/tEi2pdk76D3qZMEu4qINH4 ityMJsDxKaNVLVGLKMay0kgN32agNZRWY/6DiNXBgDcTUkMRZmdOS3CjpHBpc0JFAh/o8k wSX77RXiIhoa1t03NA7+WbTd8nIce7Kfhj/I/nQW511ybfO67NfcfDrC6TV1iQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e3885a7893d48f8d38cba427f3fb9a404d1bde23 commit e3885a7893d48f8d38cba427f3fb9a404d1bde23 Author: John Baldwin AuthorDate: 2022-08-26 18:17:55 +0000 Commit: John Baldwin CommitDate: 2022-08-26 18:17:55 +0000 soo_stat: Ensure error is always initialized. In kernels without MAC, error is not set for sockets whose protocol layer does not implement the pr_sense hook. Reported by: Jenkins (powerpc kernel builds) Fixes: 7c04ca1fad67 sockets: for stat(2) on a socket don't report hiwat as block size --- sys/kern/sys_socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/sys_socket.c b/sys/kern/sys_socket.c index 5c10e2217686..3455cfee564c 100644 --- a/sys/kern/sys_socket.c +++ b/sys/kern/sys_socket.c @@ -303,7 +303,7 @@ static int soo_stat(struct file *fp, struct stat *ub, struct ucred *active_cred) { struct socket *so = fp->f_data; - int error; + int error = 0; bzero((caddr_t)ub, sizeof (*ub)); ub->st_mode = S_IFSOCK;