The patch titled memrlimit: fix sleep inside sleeplock in mm_update_next_owner() has been removed from the -mm tree. Its filename was memrlimit-cgroup-mm-owner-callback-changes-to-add-task-info-memrlimit-fix-sleep-inside-sleeplock-in-mm_update_next_owner.patch This patch was dropped because it was folded into memrlimit-cgroup-mm-owner-callback-changes-to-add-task-info.patch The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: memrlimit: fix sleep inside sleeplock in mm_update_next_owner() From: Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx> We have a sleep inside a spinlock (read side locking of tasklist_lock). We try to acquire mmap_sem without releasing the read_lock. Since we have the task_struct of the new process, we can release the read_lock, before acquiring the task_lock of the chosen one. Cc: Hugh Dickins <hugh@xxxxxxxxxxx> Signed-off-by: Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx> Cc: Sudhir Kumar <skumar@xxxxxxxxxxxxxxxxxx> Cc: YAMAMOTO Takashi <yamamoto@xxxxxxxxxxxxx> Cc: Paul Menage <menage@xxxxxxxxxx> Cc: Li Zefan <lizf@xxxxxxxxxxxxxx> Cc: Pavel Emelianov <xemul@xxxxxxxxxx> Cc: Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> Cc: David Rientjes <rientjes@xxxxxxxxxx> Cc: Vivek Goyal <vgoyal@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/exit.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff -puN kernel/exit.c~memrlimit-cgroup-mm-owner-callback-changes-to-add-task-info-memrlimit-fix-sleep-inside-sleeplock-in-mm_update_next_owner kernel/exit.c --- a/kernel/exit.c~memrlimit-cgroup-mm-owner-callback-changes-to-add-task-info-memrlimit-fix-sleep-inside-sleeplock-in-mm_update_next_owner +++ a/kernel/exit.c @@ -633,28 +633,24 @@ retry: assign_new_owner: BUG_ON(c == p); get_task_struct(c); + read_unlock(&tasklist_lock); down_write(&mm->mmap_sem); /* * The task_lock protects c->mm from changing. * We always want mm->owner->mm == mm */ task_lock(c); - /* - * Delay read_unlock() till we have the task_lock() - * to ensure that c does not slip away underneath us - */ - read_unlock(&tasklist_lock); if (c->mm != mm) { task_unlock(c); - put_task_struct(c); up_write(&mm->mmap_sem); + put_task_struct(c); goto retry; } cgroup_mm_owner_callbacks(mm->owner, c); mm->owner = c; task_unlock(c); - put_task_struct(c); up_write(&mm->mmap_sem); + put_task_struct(c); } #endif /* CONFIG_MM_OWNER */ _ Patches currently in -mm which might be from balbir@xxxxxxxxxxxxxxxxxx are cgroup-use-read-lock-to-guard-find_existing_css_set.patch mark-res_counter_charge_locked-with-__must_check.patch memcg-make-global-var-read_mostly.patch memcg-avoid-unnecessary-initialization.patch memcg-clean-up-checking-of-the-disabled-flag.patch res_counter-limit-change-support-ebusy.patch memcg-limit-change-shrink-usage.patch memrlimit-add-memrlimit-controller-documentation.patch memrlimit-setup-the-memrlimit-controller.patch memrlimit-cgroup-mm-owner-callback-changes-to-add-task-info.patch memrlimit-cgroup-mm-owner-callback-changes-to-add-task-info-memrlimit-fix-sleep-inside-sleeplock-in-mm_update_next_owner.patch memrlimit-add-memrlimit-controller-accounting-and-control.patch memrlimit-add-memrlimit-controller-accounting-and-control-fix.patch memrlimit-add-memrlimit-controller-accounting-and-control-memrlimit-improve-fork-and-error-handling.patch memrlimit-improve-error-handling.patch memrlimit-improve-error-handling-update.patch memrlimit-handle-attach_task-failure-add-can_attach-callback.patch memrlimit-handle-attach_task-failure-add-can_attach-callback-update.patch distinct-tgid-tid-i-o-statistics.patch per-task-delay-accounting-add-memory-reclaim-delay.patch per-task-delay-accounting-update-document-and-getdelaysc-for-memory-reclaim.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html