Date: Mon, 30 Nov 2020 20:53:45 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368194 - head/sys/dev/qat Message-ID: <202011302053.0AUKrjTW028851@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Mon Nov 30 20:53:45 2020 New Revision: 368194 URL: https://svnweb.freebsd.org/changeset/base/368194 Log: qat: Initialize the crypto device ID to -1 instead of 0 Otherwise qat_detach() may attempt to deregister an unrelated crypto driver if an error occurs in qat_attach() before crypto_get_driverid() is called, since 0 is a valid driver ID. MFC after: 3 days Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/dev/qat/qat.c Modified: head/sys/dev/qat/qat.c ============================================================================== --- head/sys/dev/qat/qat.c Mon Nov 30 20:53:25 2020 (r368193) +++ head/sys/dev/qat/qat.c Mon Nov 30 20:53:45 2020 (r368194) @@ -357,6 +357,7 @@ qat_attach(device_t dev) sc->sc_dev = dev; sc->sc_rev = pci_get_revid(dev); + sc->sc_crypto.qcy_cid = -1; qatp = qat_lookup(dev); memcpy(&sc->sc_hw, qatp->qatp_hw, sizeof(struct qat_hw));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011302053.0AUKrjTW028851>