]> Git Repo - linux.git/blobdiff - kernel/fork.c
Merge tag 'usb-5.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
[linux.git] / kernel / fork.c
index 41906a52a7646346167d4979f6b1eaeb6b49a580..d66cd1014211b92de6e9f881089175395845265c 100644 (file)
@@ -225,8 +225,8 @@ static unsigned long *alloc_thread_stack_node(struct task_struct *tsk, int node)
                if (!s)
                        continue;
 
-               /* Clear the KASAN shadow of the stack. */
-               kasan_unpoison_shadow(s->addr, THREAD_SIZE);
+               /* Mark stack accessible for KASAN. */
+               kasan_unpoison_range(s->addr, THREAD_SIZE);
 
                /* Clear stale pointers from reused stack. */
                memset(s->addr, 0, THREAD_SIZE);
@@ -819,9 +819,8 @@ void __init fork_init(void)
        init_task.signal->rlim[RLIMIT_SIGPENDING] =
                init_task.signal->rlim[RLIMIT_NPROC];
 
-       for (i = 0; i < UCOUNT_COUNTS; i++) {
+       for (i = 0; i < UCOUNT_COUNTS; i++)
                init_user_ns.ucount_max[i] = max_threads/2;
-       }
 
 #ifdef CONFIG_VMAP_STACK
        cpuhp_setup_state(CPUHP_BP_PREPARE_DYN, "fork:vm_stack_cache",
@@ -1654,9 +1653,8 @@ static inline void init_task_pid_links(struct task_struct *task)
 {
        enum pid_type type;
 
-       for (type = PIDTYPE_PID; type < PIDTYPE_MAX; ++type) {
+       for (type = PIDTYPE_PID; type < PIDTYPE_MAX; ++type)
                INIT_HLIST_NODE(&task->pid_links[type]);
-       }
 }
 
 static inline void
This page took 0.025124 seconds and 4 git commands to generate.