mount failed while remounting different controllers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

When looking into “Failure: ltp/cgroup_regression_test.sh”, I found a
problem which can be reproduced by the following scripts:

  # cat test_remount.sh
  #!/bin/bash
  mkdir cgroup
  mount -t cgroup -o hugetlb,pids xxx cgroup
  mkdir cgroup/0
  rmdir cgroup/0
  umount cgroup
  mount -t cgroup -o pids xxx cgroup
  # sh test_remount.sh
  mount: xxx is already mounted or /root/cgroup busy

The situation can be described as follows.
rmdir                            umount
cgroup_rmdir
 kill_css
  css_killed_ref_fn
   queue work to destroy css
                                 cgroup_kill_sb
                                  cgroup_put
work performed to destroy css

Since the percpu_ref of the cgroup_root->cgrp.css hasn't been switched
to atomic mode, cgroup_root can't be destroyed even if not referenced
any more. And it will cause the remount failure in rebind_subsystems()
while remounting different controllers.

I have no idea how to solve this problem. If we offline the controller
root when there are no alive child, it will trigger the mount hang for
memory controller(commit 3c606d35fe).

Any ideas? Or should we solve this problem?

Thanks.
Jiufei



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux