DESC SKAS3: add locking around ->mm for PTRACE_SWITCH_MM EDESC From: Paolo 'Blaisorblade' Giarrusso I just discovered that task_lock() and task_unlock() is used to protect task_struct->mm... so this patch makes sure it is used for this purpose in SKAS code. Seeing this comment: /* * Protects ->fs, ->files, ->mm, ->ptrace, ->group_info, ->comm and * synchronises with wait4(). * * Nests both inside and outside of read_lock(&tasklist_lock). * It must not be nested with write_lock_irq(&tasklist_lock), * neither inside nor outside. */ static inline void task_lock(struct task_struct *p) I've verified to some extent that it is called even without holding tasklist_lock (for instance during execve).