From 0fbbc37da3d41d70bffa50b706b75c3776dae77b Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Tue, 17 May 2016 11:59:38 +0000 Subject: [PATCH] Make iscsi_ioctl_daemon_send() actually work by adding missing locking. MFC after: 1 month Sponsored by: The FreeBSD Foundation --- sys/dev/iscsi/iscsi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/iscsi/iscsi.c b/sys/dev/iscsi/iscsi.c index 9c8080c44bf8..62a9c32c5577 100644 --- a/sys/dev/iscsi/iscsi.c +++ b/sys/dev/iscsi/iscsi.c @@ -1620,7 +1620,9 @@ iscsi_ioctl_daemon_send(struct iscsi_softc *sc, KASSERT(error == 0, ("icl_pdu_append_data(..., M_WAITOK) failed")); free(data, M_ISCSI); } + ISCSI_SESSION_LOCK(is); icl_pdu_queue(ip); + ISCSI_SESSION_UNLOCK(is); return (0); }