Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115634948
D29688.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
980 B
Referenced Files
None
Subscribers
None
D29688.diff
View Options
diff --git a/sys/dev/iscsi/iscsi.h b/sys/dev/iscsi/iscsi.h
--- a/sys/dev/iscsi/iscsi.h
+++ b/sys/dev/iscsi/iscsi.h
@@ -132,6 +132,7 @@
TAILQ_HEAD(, iscsi_session) sc_sessions;
struct cv sc_cv;
unsigned int sc_last_session_id;
+ bool sc_unloading;
eventhandler_tag sc_shutdown_pre_eh;
eventhandler_tag sc_shutdown_post_eh;
};
diff --git a/sys/dev/iscsi/iscsi.c b/sys/dev/iscsi/iscsi.c
--- a/sys/dev/iscsi/iscsi.c
+++ b/sys/dev/iscsi/iscsi.c
@@ -1333,6 +1333,11 @@
}
if (is == NULL) {
+ if (sc->sc_unloading) {
+ sx_sunlock(&sc->sc_lock);
+ return (ENXIO);
+ }
+
/*
* No session requires attention from iscsid(8); wait.
*/
@@ -2560,6 +2565,12 @@
iscsi_unload(void)
{
+ /* Awaken any threads asleep in iscsi_ioctl(). */
+ sx_xlock(&sc->sc_lock);
+ sc->sc_unloading = true;
+ cv_signal(&sc->sc_cv);
+ sx_xunlock(&sc->sc_lock);
+
if (sc->sc_cdev != NULL) {
ISCSI_DEBUG("removing device node");
destroy_dev(sc->sc_cdev);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 27, 8:13 AM (17 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17815242
Default Alt Text
D29688.diff (980 B)
Attached To
Mode
D29688: iscsi: Kick threads out of iscsi_ioctl() during unload.
Attached
Detach File
Event Timeline
Log In to Comment