forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'for-3.15-fixes' of git://git.kernel.org/pub/scm/linux/k…
…ernel/git/tj/cgroup Pull cgroup fixes from Tejun Heo: "During recent restructuring, device_cgroup unified config input check and enforcement logic; unfortunately, it turned out to share too much. Aristeu's patches fix the breakage and marked for -stable backport. The other two patches are fallouts from kernfs conversion. The blkcg change is temporary and will go away once kernfs internal locking gets simplified (patches pending)" * 'for-3.15-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: blkcg: use trylock on blkcg_pol_mutex in blkcg_reset_stats() device_cgroup: check if exception removal is allowed device_cgroup: fix the comment format for recently added functions device_cgroup: rework device access check and exception checking cgroup: fix the retry path of cgroup_mount()
- Loading branch information
Showing
3 changed files
with
177 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -451,7 +451,20 @@ static int blkcg_reset_stats(struct cgroup_subsys_state *css, | |
struct blkcg_gq *blkg; | ||
int i; | ||
|
||
mutex_lock(&blkcg_pol_mutex); | ||
/* | ||
* XXX: We invoke cgroup_add/rm_cftypes() under blkcg_pol_mutex | ||
* which ends up putting cgroup's internal cgroup_tree_mutex under | ||
* it; however, cgroup_tree_mutex is nested above cgroup file | ||
* active protection and grabbing blkcg_pol_mutex from a cgroup | ||
* file operation creates a possible circular dependency. cgroup | ||
* internal locking is planned to go through further simplification | ||
* and this issue should go away soon. For now, let's trylock | ||
* blkcg_pol_mutex and restart the write on failure. | ||
* | ||
* http://lkml.kernel.org/g/[email protected] | ||
*/ | ||
if (!mutex_trylock(&blkcg_pol_mutex)) | ||
return restart_syscall(); | ||
spin_lock_irq(&blkcg->lock); | ||
|
||
/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters