⬢ DragonFlyBSD Kernel Audit
DF-3052 / fix.diff
← back to finding ↓ download raw
--- a/sys/vfs/nfs/nfsm_subs.c
+++ b/sys/vfs/nfs/nfsm_subs.c
@@ -833,6 +833,14 @@
 		}
 		bp->b_error = error;
 		biodone(info->bio);
+
+		/*
+		 * DF-3052: the caller expects info->done() to own the
+		 * nfsm_info; on the early-abort path nothing else frees
+		 * it.  Free it here so forced-unmount storms do not leak
+		 * M_NFSREQ memory.
+		 */
+		kfree(info, M_NFSREQ);
 	}
 }