Index: kernel/generic/src/proc/task.c
===================================================================
--- kernel/generic/src/proc/task.c	(revision 80dabb8d5cd8827e3f43939b3ce35fcce1382a99)
+++ kernel/generic/src/proc/task.c	(revision 1e1e5e1f552946adaf5576371c0d6cd57ecfd5a9)
@@ -46,4 +46,5 @@
 #include <synch/waitq.h>
 #include <arch.h>
+#include <arch/barrier.h>
 #include <panic.h>
 #include <adt/avl.h>
@@ -260,6 +261,14 @@
 	if (rc != EOK)
 		return rc;
-	
-	uspace_arg_t *kernel_uarg = (uspace_arg_t *) malloc(sizeof(uspace_arg_t), 0);
+
+	/*
+	 * Not very efficient and it would be better to call it on code only,
+	 * but this whole function is a temporary hack anyway and one day it
+	 * will go in favor of the userspace dynamic loader.
+	 */
+	smc_coherence_block(kimage, size);
+	
+	uspace_arg_t *kernel_uarg;
+	kernel_uarg = (uspace_arg_t *) malloc(sizeof(uspace_arg_t), 0);
 	if (kernel_uarg == NULL) {
 		free(kimage);
@@ -290,7 +299,7 @@
 	
 	as_area_t *area = as_area_create(as,
-		AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE,
-		LOADED_PROG_STACK_PAGES_NO * PAGE_SIZE, USTACK_ADDRESS,
-		AS_AREA_ATTR_NONE, &anon_backend, NULL);
+	    AS_AREA_READ | AS_AREA_WRITE | AS_AREA_CACHEABLE,
+	    LOADED_PROG_STACK_PAGES_NO * PAGE_SIZE, USTACK_ADDRESS,
+	    AS_AREA_ATTR_NONE, &anon_backend, NULL);
 	if (area == NULL) {
 		as_destroy(as);
@@ -312,5 +321,5 @@
 	
 	thread_t *thread = thread_create(uinit, kernel_uarg, task,
-		THREAD_FLAG_USPACE, "user", false);
+	    THREAD_FLAG_USPACE, "user", false);
 	if (thread == NULL) {
 		task_destroy(task);
@@ -443,13 +452,13 @@
 
 #ifdef __32_BITS__	
-	printf("%-6" PRIu64 " %-10s %-3" PRIu32 " %10p %10p %9" PRIu64 "%c %7ld %6ld",
-		t->taskid, t->name, t->context, t, t->as, cycles, suffix,
-		atomic_get(&t->refcount), atomic_get(&t->active_calls));
+	printf("%-6" PRIu64 " %-10s %-3" PRIu32 " %10p %10p %9" PRIu64
+	    "%c %7ld %6ld", t->taskid, t->name, t->context, t, t->as, cycles,
+	    suffix, atomic_get(&t->refcount), atomic_get(&t->active_calls));
 #endif
 
 #ifdef __64_BITS__
-	printf("%-6" PRIu64 " %-10s %-3" PRIu32 " %18p %18p %9" PRIu64 "%c %7ld %6ld",
-		t->taskid, t->name, t->context, t, t->as, cycles, suffix,
-		atomic_get(&t->refcount), atomic_get(&t->active_calls));
+	printf("%-6" PRIu64 " %-10s %-3" PRIu32 " %18p %18p %9" PRIu64
+	    "%c %7ld %6ld", t->taskid, t->name, t->context, t, t->as, cycles,
+	    suffix, atomic_get(&t->refcount), atomic_get(&t->active_calls));
 #endif
 
@@ -475,14 +484,14 @@
 #ifdef __32_BITS__	
 	printf("taskid name       ctx address    as         "
-		"cycles     threads calls  callee\n");
+	    "cycles     threads calls  callee\n");
 	printf("------ ---------- --- ---------- ---------- "
-		"---------- ------- ------ ------>\n");
+	    "---------- ------- ------ ------>\n");
 #endif
 
 #ifdef __64_BITS__
 	printf("taskid name       ctx address            as                 "
-		"cycles     threads calls  callee\n");
+	    "cycles     threads calls  callee\n");
 	printf("------ ---------- --- ------------------ ------------------ "
-		"---------- ------- ------ ------>\n");
+	    "---------- ------- ------ ------>\n");
 #endif
 
