diff --git a/base-linux/run/rm_session_mmap.run b/base-linux/run/rm_session_mmap.run
new file mode 100644
index 0000000000..6ac885b2c1
--- /dev/null
+++ b/base-linux/run/rm_session_mmap.run
@@ -0,0 +1,40 @@
+build "core init test/rm_session_mmap drivers/timer test/signal"
+
+create_boot_directory
+
+install_config {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+
+build_boot_image "core init test-rm_session_mmap timer test-signal"
+
+run_genode_until forever
+
diff --git a/base-linux/src/test/rm_session_mmap/main.cc b/base-linux/src/test/rm_session_mmap/main.cc
new file mode 100644
index 0000000000..2ecb908c5d
--- /dev/null
+++ b/base-linux/src/test/rm_session_mmap/main.cc
@@ -0,0 +1,53 @@
+/*
+ * \brief Linux: Test bug in rm_session_mmap.cc
+ * \author Christian Helmuth
+ * \date 2012-12-19
+ */
+
+/*
+ * Copyright (C) 2012 Genode Labs GmbH
+ *
+ * This file is part of the Genode OS framework, which is distributed
+ * under the terms of the GNU General Public License version 2.
+ */
+
+#include
+#include
+#include
+#include
+
+
+static void test_linux_rmmap_bug()
+{
+ enum { QUOTA = 1*1024*1024, CHUNK = 0x1000, ROUNDS = 0x10 };
+
+ using namespace Genode;
+
+ PLOG("line: %d", __LINE__);
+ Ram_connection ram;
+
+#if 1 /* transfer quota */
+ PLOG("line: %d", __LINE__);
+ ram.ref_account(env()->ram_session_cap());
+ env()->ram_session()->transfer_quota(ram.cap(), QUOTA);
+#endif
+
+ PLOG("line: %d", __LINE__);
+ for (unsigned i = 0; i < ROUNDS; ++i) {
+ Ram_dataspace_capability ds(ram.alloc(CHUNK));
+ PLOG("%d of %d pages allocated", (i + 1), ROUNDS);
+ }
+
+ PLOG("Done.");
+}
+
+
+int main()
+{
+ Genode::printf("--- test-rm_session_mmap started ---\n");
+
+// Timer::Connection timer;
+// timer.msleep(1000);
+
+ test_linux_rmmap_bug();
+}
diff --git a/base-linux/src/test/rm_session_mmap/target.mk b/base-linux/src/test/rm_session_mmap/target.mk
new file mode 100644
index 0000000000..fc9d741125
--- /dev/null
+++ b/base-linux/src/test/rm_session_mmap/target.mk
@@ -0,0 +1,3 @@
+TARGET = test-rm_session_mmap
+LIBS = cxx env
+SRC_CC = main.cc