Thread (247 messages) 247 messages, 7 authors, 2021-03-18

Re: [RFC v8 12/20] um: lkl: initialization and cleanup

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2021-03-14 20:41:36
Also in: linux-um

On Wed, 2021-01-20 at 11:27 +0900, Hajime Tazaki wrote:
+	panic_blink = lkl_panic_blink;
Using a panic notifier would seem more appropriate?
+	init_sem = lkl_sem_alloc(0);
what's the deal with this?
+	if (!init_sem)
+		return -ENOMEM;
+
+	ret = lkl_cpu_init();
+	if (ret)
+		goto out_free_init_sem;
+
+	ret = lkl_thread_create(lkl_run_kernel, NULL);
+	if (!ret) {
+		ret = -ENOMEM;
+		goto out_free_init_sem;
+	}
+
+	lkl_sem_down(init_sem);
+	lkl_sem_free(init_sem);
You free it before the kernel really even started?

johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help