DragonFlyBSD Kernel Audit
DF-1804 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/dev/misc/snp/snp.c b/sys/dev/misc/snp/snp.c
--- a/sys/dev/misc/snp/snp.c
+++ b/sys/dev/misc/snp/snp.c
@@ -166,7 +166,9 @@
 		error = uiomove(ibuf, (size_t)ilen, uio);
 		if (error != 0)
 			break;
+		lwkt_gettoken(&snp_token);
 		snp_in(snp, ibuf, ilen);
+		lwkt_reltoken(&snp_token);
 		/* Hackish, but probably the least of all evils. */
 		iov.iov_base = ibuf;
 		iov.iov_len = ilen;