From nobody Wed Mar 29 07:52:26 2023 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 4Pmf0V43jqz429WH; Wed, 29 Mar 2023 07:52:26 +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 4Pmf0V3cXBz3PQh; Wed, 29 Mar 2023 07:52:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680076346; 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=ljm45tdAKfIYecQyqkTl35m9qjka30FwgN9YFDXYTTs=; b=EZbmMX7DACa9YjGMtG6zFFL/6AGwy1774wxHBqw1qpH6N/37wmnsrFmwlMhloF7X25Z4X4 Ud/lzyFSH1n6NCucH5FxFHyLBrkneJwPou7rWEm+ZizR2IV27C0oxOjBa919Cixdfbbx7X TICUKRorsbB4iIT1WFEVtgPT2U/egEP+0kj9aM7Bd4NB1iIOWHAXohfiTEUoTmSl0+Et46 toQXVErcOGke/CgPEPnhOaFmKCKP769sI/AjC3+G2rZgqdBGVouD+24CAjPPuAUD9nauNg BhYJr50gN2lbV1l0tgjL6yE9VAz1TpgPpyXEAw+88LUhXrLSRl/J118ueWCVVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680076346; 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=ljm45tdAKfIYecQyqkTl35m9qjka30FwgN9YFDXYTTs=; b=BMujmUtwPIpe0vxLwiFs3EaJpnfg7Jb+Ic/ffDaueHTKJ2u0GxctWNsEP2koydCiXOiTZL scOzons4JA2ExbZ3YGpV4mrdYkdvt0/vrir8Poosl4TDNx4Vsn/CXTqMvTihLgyTo9Pfws +uZruy18uJ8fkZ4F1wWQO9HRehhrPilqbC4+TDwW6N8jvyt8hEEZXVWyHcZFiSytMOzEup guD4DY1jbsHD0qtecJVnQeU3+QFO1FfsJvjjcOOQUgWXu6gD8+LNRB5AzkDbyJfP8yKdhH E+XT1uxbNU78W0jo8JKn/rMUtE+XLpQtthAUqNYMo0XT/lahxHhGkb/EQOr1kw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680076346; a=rsa-sha256; cv=none; b=UPtUx+SrXs7RunPUikLyiG7JxW9NP6qpRPw1npJhOv13r0AZD88pcAd3VhlYqX784vX80E 1Mn6EwAQr1wRuLITWZRHLr1Teuw3pmoIFQIkEICv3+JWomRJN8yaMNrnhFkg1tVcKZcebn wxgqhqJKToMTigyqhQ7EZxCE0GWUMZ2Yt3uGOZMmHZrKw/GXQxNPXE89pPB26WOfhcTYBU 9chFMFaR78rBvjqAVHpUIfjalOr2HUQrY/80F+XDvIFaASe6PpnhaGyvY925ZnvNt+9fmu KHG8RGi6Mzzr9TeC2YaHoMPQlT2n77Xug/Cw2NLcqDh0sByuE3MPMsa1GzUMCA== 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 4Pmf0V2h1QzMqZ; Wed, 29 Mar 2023 07:52:26 +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 32T7qQxT050781; Wed, 29 Mar 2023 07:52:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32T7qQY6050780; Wed, 29 Mar 2023 07:52:26 GMT (envelope-from git) Date: Wed, 29 Mar 2023 07:52:26 GMT Message-Id: <202303290752.32T7qQY6050780@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Roger=20Pau=20Monn=C3=A9?= Subject: git: 2d5e325303cf - main - xen/intr: always set xi_close in xen_intr_bind_isrc() 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: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2d5e325303cf9e7470b7846deba30af33046c31a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=2d5e325303cf9e7470b7846deba30af33046c31a commit 2d5e325303cf9e7470b7846deba30af33046c31a Author: Elliott Mitchell AuthorDate: 2022-10-11 19:25:12 +0000 Commit: Roger Pau Monné CommitDate: 2023-03-29 07:51:39 +0000 xen/intr: always set xi_close in xen_intr_bind_isrc() Appears errors are uncommon since calling xen_intr_release_isrc() on a xenisrc with xi_close in an undefined state could be bad. Fix this problematic lurking nasty. Reviewed by: royger MFC after: 1 week --- sys/x86/xen/xen_intr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/x86/xen/xen_intr.c b/sys/x86/xen/xen_intr.c index 262df1cefeea..37b18c05b8a6 100644 --- a/sys/x86/xen/xen_intr.c +++ b/sys/x86/xen/xen_intr.c @@ -6,6 +6,7 @@ * Copyright (c) 2002-2005, K A Fraser * Copyright (c) 2005, Intel Corporation * Copyright (c) 2012, Spectra Logic Corporation + * Copyright © 2021-2023, Elliott Mitchell * * This file may be distributed separately from the Linux kernel, or * incorporated into other software packages, subject to the following license: @@ -420,6 +421,7 @@ xen_intr_bind_isrc(struct xenisrc **isrcp, evtchn_port_t local_port, } } isrc->xi_port = local_port; + isrc->xi_close = 0; xen_intr_port_to_isrc[local_port] = isrc; refcount_init(&isrc->xi_refcount, 1); mtx_unlock(&xen_intr_isrc_lock);