Skip to contentSkip to conversation

LVM2/lib/mm memlock.c

PATCH [email protected] 1 participant 1 message Nov 18, 2009

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mornfall at sourceware.org 2009-11-18 18:22:33

Modified files:
lib/mm : memlock.c

Log message:
Issue an Internal error message whenever _memlock_count drops below 0.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/mm/memlock.c.diff?cvsroot=lvm2&r1=1.12&r2=1.13

lib/mm/memlock.c +2 -0
@@ -135,6 +135,8 @@
 	if (_memlock_count && (!--_memlock_count))
 		_unlock_mem();
 	log_debug("memlock_count dec to %d", _memlock_count);
+	if (_memlock_count < 0)
+		log_error("Internal error: _memlock_count has dropped below 0.");
 }
 
 int memlock(void)