Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F152689531
D18478.id51735.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D18478.id51735.diff
View Options
Index: sys/dev/cxgbe/crypto/t4_crypto.c
===================================================================
--- sys/dev/cxgbe/crypto/t4_crypto.c
+++ sys/dev/cxgbe/crypto/t4_crypto.c
@@ -1652,12 +1652,6 @@
struct ccr_softc *sc;
int32_t cid;
- /*
- * TODO: Crypto requests will panic if the parent device isn't
- * initialized so that the queues are up and running. Need to
- * figure out how to handle that correctly, maybe just reject
- * requests if the adapter isn't fully initialized?
- */
sc = device_get_softc(dev);
sc->dev = dev;
sc->adapter = device_get_softc(device_get_parent(dev));
@@ -2058,6 +2052,16 @@
}
sc = device_get_softc(dev);
+
+ /*
+ * XXX: Don't create a session if the queues aren't
+ * initialized. This is racy as the rxq can be destroyed by
+ * the associated VI detaching. Eventually ccr should use
+ * dedicated queues.
+ */
+ if (sc->rxq->iq.adapter == NULL || sc->txq->adapter == NULL)
+ return (ENXIO);
+
mtx_lock(&sc->lock);
if (sc->detaching) {
mtx_unlock(&sc->lock);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 17, 1:02 PM (3 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31660961
Default Alt Text
D18478.id51735.diff (1 KB)
Attached To
Mode
D18478: Reject new sessions if the necessary queues aren't initialized.
Attached
Detach File
Event Timeline
Log In to Comment