Skip to contentSkip to conversation

LVM2 ./WHATS_NEW lib/mm/memlock.c

PATCH [email protected] 1 participant 1 message Jun 24, 2010

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2010-06-24 08:29:31

Modified files:
. : WHATS_NEW
lib/mm : memlock.c

Log message:
Preload libc locale messages.

Preload libc.mo file for localized lvm before taking memory lock - this way we prevent disk access for some error paths in libdm, that prints localized errno messages while they are still in memory locked state.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1634&r2=1.1635
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/mm/memlock.c.diff?cvsroot=lvm2&r1=1.26&r2=1.27

WHATS_NEW +1 -0
@@ -1,5 +1,6 @@
 Version 2.02.69 - 
 ================================
+  Preload libc locale messages to prevent reading it in memory locked state.
   Fix handling of simultaneous mirror image and mirrored log image failure.
 
 Version 2.02.68 - 23rd June 2010
lib/mm/memlock.c +3 -0
@@ -216,6 +216,9 @@
 #endif
 	}
 
+	/* Force libc.mo load */
+	if (lock == LVM_MLOCK)
+		(void)strerror(0);
 	/* Reset statistic counters */
 	*mstats = 0;
 	rewind(_mapsh);