From nobody Tue Sep 06 11:50:03 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 4MMNwq413bz4bdDL; Tue, 6 Sep 2022 11:50:03 +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 4MMNwq3Pymz3qd5; Tue, 6 Sep 2022 11:50:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662465003; 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=bWE5l4iBxYV6RmTeItwl7tAooSq+k2ic8qdNi6V93rA=; b=bTZ0zn//Og2lR127M1QaKH29giaJC7j8fY6lw1Ar3D6lSJ4tebzVeeOc3zmxNszpc0/IiW 4QGuGCdwp75jw9pW7DjboeokNP4uOZnv6dQdjlChs52VUnqWMK4FWspUgmTn+f7JlniLBR xOq/RtqW3y2WjDXnpOs0XLFPVGwo3tHqEeTiEyxFBVnOuH4U5qpqyegCMQKM4SXeEanZWP 8M09Ap0wvBTr0n8M4cmfZIsNW6k8p2e53OQqMu3IhvOt4N76BEfFH6NvTdSS9Df3DpbZxF Kg8dlwm4zIO8ZF4WeGlo316mTu1Ob3jFMhgjysOZVuP1TfroCzk6Ek/VFc5EIg== 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 4MMNwq2SZ6z18xC; Tue, 6 Sep 2022 11:50:03 +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 286Bo3qE064111; Tue, 6 Sep 2022 11:50:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 286Bo3bj064108; Tue, 6 Sep 2022 11:50:03 GMT (envelope-from git) Date: Tue, 6 Sep 2022 11:50:03 GMT Message-Id: <202209061150.286Bo3bj064108@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: 0e391a3197f5 - main - ktls: Add missing NULL pointer check for TLS RX hardware offload. 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: 0e391a3197f5b4d7a48e26f5cb313548bd663ffc Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662465003; 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=bWE5l4iBxYV6RmTeItwl7tAooSq+k2ic8qdNi6V93rA=; b=ghg0JiO3Z0Nhj/uviRC8auDZC/Gfj8bzFT5PH2xuPxy8DqRAg/D6IUyGdSxvBPcfLTVaeO 3dmbYBB7nmXoPyGUTwZcgUUJSAyz1EQHcyzQaOjMoPx7Qqg1ShLEA3y0zWWnAtUquyzNpp pF4h9InQumubVctg+os4fQm8y25ir9dFAC/jXaWBEjXaIelDBO0Z003yd0vf6NEZvZSAJ9 QVZ/n4PNgudVV5nGKicFpTeWXzB+x13G1L+WPCvNOTyK0Kc8XZ0QrQCxnAgfUxyHEDJ7pL z1xxgCsdYW5hqWf8GVn5xGpMgsYeMR78oMmZ3p2Wq/f1Tpwms4C8bwYzzedi7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662465003; a=rsa-sha256; cv=none; b=vXXo8SgeGnk7bTg4d5HCLa68qddZH/UKJUNXqTSBVhkevyKa002fLzTKOF984/CEnEf6cM UB1O07ClqTu4oXQHprzTpJfenAr7ei3lgTnreMkCM0RJPo3Xxc9+PIO9LBsfBWi8LVZf7K 6CPvdyCkn9Q7vCRROqWIp3tIvQ0BB3NXyBjr4SESkaE/c0BsNcC3UIq+XgvXl364AW5dDM O2222RrycUPvC91s3p4rFUtJ7M60GVUKEKhA6SsNl2IwI0nibzWgIrFZrbcpe24VrbHR2E bWYkUk6uunymYRZ/I9Z1w4uh7mfjJj4gEk+mHMdevng+qjokHFfWDIiMQLrseQ== 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=0e391a3197f5b4d7a48e26f5cb313548bd663ffc commit 0e391a3197f5b4d7a48e26f5cb313548bd663ffc Author: Hans Petter Selasky AuthorDate: 2022-09-06 10:56:19 +0000 Commit: Hans Petter Selasky CommitDate: 2022-09-06 11:49:23 +0000 ktls: Add missing NULL pointer check for TLS RX hardware offload. The send tag pointer may be NULL when the ktls_reset_receive_tag() function is invoked. Add check for this. Reviewed by: gallatin @ Sponsored by: NVIDIA Networking --- sys/kern/uipc_ktls.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index ff20b3652407..bf91b774c0dc 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -1631,8 +1631,10 @@ ktls_reset_receive_tag(void *context, int pending) } SOCKBUF_LOCK(&so->so_rcv); - m_snd_tag_rele(tls->snd_tag); + mst = tls->snd_tag; tls->snd_tag = NULL; + if (mst != NULL) + m_snd_tag_rele(mst); ifp = tls->rx_ifp; if_ref(ifp);