kernel/mem/lib/mem.c: make tests continue to run even though KSM is not enabled

When kernel KSM configuration is not enabled, we make testcases continue to run
instead of returning TCONF, e.g. oom01. And if KSM configuration is not enabled, in
the original code, "tst_brkm(TCONF, NULL, ...)" will be called, in this case, we
will forget to execute the restore operations defined in cleanup, which will forget
to restore the /proc/sys/vm/overcommit_memory to 0, and this will impact other test
cases in LTP, for example, fork14 in RHEL5 will succeed unexpectedly.

Signed-off-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
Acked-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
diff --git a/testcases/kernel/mem/lib/mem.c b/testcases/kernel/mem/lib/mem.c
index 37b37be..c7910db 100644
--- a/testcases/kernel/mem/lib/mem.c
+++ b/testcases/kernel/mem/lib/mem.c
@@ -145,11 +145,13 @@
 	tst_resm(TINFO, "start OOM testing for mlocked pages.");
 	oom(MLOCK, lite);
 
-	if (access(PATH_KSM, F_OK) == -1)
-		tst_brkm(TCONF, NULL, "KSM configuration is not enabled");
-
-	tst_resm(TINFO, "start OOM testing for KSM pages.");
-	oom(KSM, lite);
+	if (access(PATH_KSM, F_OK) == -1) {
+		tst_resm(TINFO, "KSM configuration is not enabled, "
+			 "skip OOM test for KSM pags");
+	} else {
+		tst_resm(TINFO, "start OOM testing for KSM pages.");
+		oom(KSM, lite);
+	}
 }
 
 /* KSM */