On 2014/2/21 23:40, Tejun Heo wrote:
> Hello,
>
> On Fri, Feb 21, 2014 at 10:16:22AM +0800, Fengguang Wu wrote:
>> commit fb47fea7a59cf3d6387c566084a6684b5005af83
>> Author: Tejun Heo
>> AuthorDate: Thu Feb 13 15:16:35 2014 -0500
>> Commit: Tejun Heo
>> CommitDate: Thu Feb 13 15:16:35
On 2014/2/21 23:40, Tejun Heo wrote:
Hello,
On Fri, Feb 21, 2014 at 10:16:22AM +0800, Fengguang Wu wrote:
commit fb47fea7a59cf3d6387c566084a6684b5005af83
Author: Tejun Heo t...@kernel.org
AuthorDate: Thu Feb 13 15:16:35 2014 -0500
Commit: Tejun Heo t...@kernel.org
CommitDate: Thu
-a-newly-forked-task-gets-associate.patch
0006-cgroup-drop-task_lock-protection-around-task-cgroups.patch
0007-cgroup-update-cgroup_transfer_tasks-to-either-succee.patch
Acked-by: Li Zefan lize...@huawei.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body
, suggested by Tejun.
v3:
- Make the new argument as second-to-last arg, suggested by Tejun.
Reviewed-by: Tejun Heo t...@kernel.org
Signed-off-by: Li Zefan lize...@huawei.com
---
fs/kernfs/mount.c | 8 +++-
fs/sysfs/mount.c | 5 +++--
include/linux/kernfs.h | 9 +
3 files
[main] Setsockopt(1 2b 80d1000 4) on fd 223 [17:2:768]
[ 27.030764]
[ 27.031119] ===
[ 27.031833] [ INFO: suspicious RCU usage. ]
[ 27.032536] 3.14.0-rc3-02458-g837caba #2 Not tainted
[ 27.033378] ---
[ 27.044237]
On 2014/2/25 23:17, Tejun Heo wrote:
On Tue, Feb 25, 2014 at 07:19:55AM -0800, Greg Kroah-Hartman wrote:
On Tue, Feb 25, 2014 at 09:42:56AM -0500, Tejun Heo wrote:
On Tue, Feb 25, 2014 at 07:28:44PM +0800, Li Zefan wrote:
As mount() and kill_sb() is not a one-to-one match, we shoudn't get
ns
Commit-ID: d82fd25356b902703152c1800845661835541878
Gitweb: http://git.kernel.org/tip/d82fd25356b902703152c1800845661835541878
Author: Li Zefan
AuthorDate: Sat, 8 Feb 2014 14:17:26 +0800
Committer: Ingo Molnar
CommitDate: Sat, 22 Feb 2014 18:10:43 +0100
sched/rt: Remove
Commit-ID: 11c785b79ef2a669e4bf7be5cf2c3904b8fed015
Gitweb: http://git.kernel.org/tip/11c785b79ef2a669e4bf7be5cf2c3904b8fed015
Author: Li Zefan
AuthorDate: Sat, 8 Feb 2014 14:17:45 +0800
Committer: Ingo Molnar
CommitDate: Sat, 22 Feb 2014 18:11:10 +0100
sched/rt: Make
Commit-ID: d82fd25356b902703152c1800845661835541878
Gitweb: http://git.kernel.org/tip/d82fd25356b902703152c1800845661835541878
Author: Li Zefan lize...@huawei.com
AuthorDate: Sat, 8 Feb 2014 14:17:26 +0800
Committer: Ingo Molnar mi...@kernel.org
CommitDate: Sat, 22 Feb 2014 18:10:43
Commit-ID: 11c785b79ef2a669e4bf7be5cf2c3904b8fed015
Gitweb: http://git.kernel.org/tip/11c785b79ef2a669e4bf7be5cf2c3904b8fed015
Author: Li Zefan lize...@huawei.com
AuthorDate: Sat, 8 Feb 2014 14:17:45 +0800
Committer: Ingo Molnar mi...@kernel.org
CommitDate: Sat, 22 Feb 2014 18:11:10
Commit-ID: 673ca1919f2b0b83a377395454d5edd12f946bbf
Gitweb: http://git.kernel.org/tip/673ca1919f2b0b83a377395454d5edd12f946bbf
Author: Li Zefan
AuthorDate: Sat, 8 Feb 2014 14:17:26 +0800
Committer: Thomas Gleixner
CommitDate: Fri, 21 Feb 2014 21:43:19 +0100
sched/rt: Remove
Commit-ID: 6bd5d275ea039721f6fd382a15dc6adc949c77ec
Gitweb: http://git.kernel.org/tip/6bd5d275ea039721f6fd382a15dc6adc949c77ec
Author: Li Zefan
AuthorDate: Sat, 8 Feb 2014 14:17:45 +0800
Committer: Thomas Gleixner
CommitDate: Fri, 21 Feb 2014 21:43:19 +0100
sched/rt: Make
Commit-ID: 6bd5d275ea039721f6fd382a15dc6adc949c77ec
Gitweb: http://git.kernel.org/tip/6bd5d275ea039721f6fd382a15dc6adc949c77ec
Author: Li Zefan lize...@huawei.com
AuthorDate: Sat, 8 Feb 2014 14:17:45 +0800
Committer: Thomas Gleixner t...@linutronix.de
CommitDate: Fri, 21 Feb 2014 21:43
Commit-ID: 673ca1919f2b0b83a377395454d5edd12f946bbf
Gitweb: http://git.kernel.org/tip/673ca1919f2b0b83a377395454d5edd12f946bbf
Author: Li Zefan lize...@huawei.com
AuthorDate: Sat, 8 Feb 2014 14:17:26 +0800
Committer: Thomas Gleixner t...@linutronix.de
CommitDate: Fri, 21 Feb 2014 21:43
, suggested by Tejun.
Signed-off-by: Li Zefan
---
This fix is for 3.14.
---
fs/kernfs/mount.c | 8 +++-
fs/sysfs/mount.c | 5 +++--
include/linux/kernfs.h | 9 +
3 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/fs/kernfs/mount.c b/fs/kernfs/mount.c
index
, suggested by Tejun.
Signed-off-by: Li Zefan lize...@huawei.com
---
This fix is for 3.14.
---
fs/kernfs/mount.c | 8 +++-
fs/sysfs/mount.c | 5 +++--
include/linux/kernfs.h | 9 +
3 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/fs/kernfs/mount.c b/fs/kernfs
e: Tue Feb 11 11:52:47 2014 -0500
> Commit: Tejun Heo
> CommitDate: Tue Feb 11 11:52:47 2014 -0500
>
> cgroup: introduce cgroup_tree_mutex
>
> Signed-off-by: Tejun Heo
> Acked-by: Li Zefan
>
Thanks for the report. It was introduced by
e61734c55c2
:47 2014 -0500
Commit: Tejun Heo t...@kernel.org
CommitDate: Tue Feb 11 11:52:47 2014 -0500
cgroup: introduce cgroup_tree_mutex
Signed-off-by: Tejun Heo t...@kernel.org
Acked-by: Li Zefan lize...@huawei.com
Thanks for the report. It was introduced
On 2014/2/19 7:12, Tejun Heo wrote:
> Hey,
>
> On Mon, Feb 17, 2014 at 11:54:59AM +0800, Li Zefan wrote:
>> I think we have to fix kernfs in order to fix refcnt leak in sysfs
>> and cgroupfs. This fix is for 3.14, but it creates conflic
On 2014/2/19 7:12, Tejun Heo wrote:
Hey,
On Mon, Feb 17, 2014 at 11:54:59AM +0800, Li Zefan wrote:
I think we have to fix kernfs in order to fix refcnt leak in sysfs
and cgroupfs. This fix is for 3.14, but it creates conflicts for
cgroup-next.
As mount() and kill_sb
(), and instead we should
get the refcnt only when kernfs_mount() allocated a new superblock.
Signed-off-by: Li Zefan
---
fs/kernfs/mount.c | 7 ++-
fs/sysfs/mount.c | 5 +++--
include/linux/kernfs.h | 9 +
3 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/fs/kernfs
ess NULL pointer.
The bug was introduced by commit de00ffa56ea3132c6013fc8f07133b8a1014cf53
("cgroup: make cgroup_subsys->base_cftypes use cgroup_add_cftypes()").
Reported-by: Fengguang Wu
Signed-off-by: Li Zefan
---
kernel/cgroup.c | 3 +++
1 file changed, 3 insertions(+)
diff --g
].ss
is NULL, we'll access NULL pointer.
The bug was introduced by commit de00ffa56ea3132c6013fc8f07133b8a1014cf53
(cgroup: make cgroup_subsys-base_cftypes use cgroup_add_cftypes()).
Reported-by: Fengguang Wu fengguang...@intel.com
Signed-off-by: Li Zefan lize...@huawei.com
---
kernel/cgroup.c
(), and instead we should
get the refcnt only when kernfs_mount() allocated a new superblock.
Signed-off-by: Li Zefan lize...@huawei.com
---
fs/kernfs/mount.c | 7 ++-
fs/sysfs/mount.c | 5 +++--
include/linux/kernfs.h | 9 +
3 files changed, 14 insertions(+), 7 deletions(-)
diff
g cgroup_add_cftypes(). This is done
> as a separate step in cgroup_init() instead of a part of
> cgroup_init_subsys(). This is because cgroup_init_subsys() can be
> called very early during boot when kmalloc() isn't available yet.
>
> Signed-off-by: Tejun Heo
On 2014/2/15 12:03, Li Zefan wrote:
> If we mount the same cgroupfs in serveral mount points, and then
> umount all of them, kill_sb() will be called only once.
>
> Therefore it's wrong to increment top_cgroup's refcnt when we find
> an existing cgroup_root.
>
> Try:
>
On 2014/2/15 12:03, Li Zefan wrote:
If we mount the same cgroupfs in serveral mount points, and then
umount all of them, kill_sb() will be called only once.
Therefore it's wrong to increment top_cgroup's refcnt when we find
an existing cgroup_root.
Try:
# mount -t cgroup -o
of a part of
cgroup_init_subsys(). This is because cgroup_init_subsys() can be
called very early during boot when kmalloc() isn't available yet.
Signed-off-by: Tejun Heo t...@kernel.org
Acked-by: Li Zefan lize...@huawei.com
[0.02] Calibrating delay loop (skipped
and drop it after kernfs_mount().
Signed-off-by: Li Zefan
---
kernel/cgroup.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 37d94a2..eaffc08 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -1477,6 +1477,7 @@ static struct
g boot. I'm wondering whether the better
> approach would be just adding "cgroup_disable=all" handling which
> disables the whole cgroup rather than tempting fate with this
> on-demand craziness.
>
> Signed-off-by: Tejun Heo
> Cc: sta...@vger.kernel.org
Acked-by:
On 2014/2/15 4:47, Tejun Heo wrote:
> Currently, there's nothing explicitly preventing
> cgroup_enable_task_cg_lists() from missing set PF_EXITING and race
> against cgroup_exit(), and, depending on the timing, cgroup_exit()
> seemingly may finish with the task still linked on css_set leading to
>
于 2014年02月14日 17:36, Li Zefan 写道:
> If we mount the same cgroupfs in serveral mount points, and then
> umount all of them, kill_sb() will be called only once.
>
> Therefore it's wrong to increment top_cgroup's refcnt when we find
> an existing cgroup_root.
>
> Try:
>
upwards.
Signed-off-by: Li Zefan
---
kernel/cgroup.c | 32
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 37d94a2..5bfe738 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -1498,6 +1498,22 @@ retry
-22
With this fix:
# Documentation/accounting/getdelays -C /cgroup
sleeping 305, blocked 0, running 1, stopped 0, uninterruptible 1
Signed-off-by: Li Zefan
---
fs/kernfs/dir.c | 2 +-
fs/kernfs/kernfs-internal.h | 1 +
fs/kernfs/mount.c | 2 +-
3 files changed, 3 inserti
My kernel fails to boot, because blkcg calls cgroup_path() while
cgroupfs is not mounted.
Fix both cgroup_name() and cgroup_path().
Signed-off-by: Li Zefan
---
include/linux/cgroup.h | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/include/linux/cgroup.h b
css_set_lock has been converted to css_set_rwsem, and rwsem can't
nested inside rcu_read_lock.
Signed-off-by: Li Zefan
---
kernel/cgroup.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index af4ecc3..0e794ca 100644
--- a/kernel
We should free the memory allocated in parse_cgroupfs_options() before
calling this function again.
Signed-off-by: Li Zefan
---
kernel/cgroup.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 0e794ca..37d94a2 100644
--- a/kernel/cgroup.c
+++ b
We should free the memory allocated in parse_cgroupfs_options() before
calling this function again.
Signed-off-by: Li Zefan lize...@huawei.com
---
kernel/cgroup.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 0e794ca..37d94a2 100644
--- a/kernel
css_set_lock has been converted to css_set_rwsem, and rwsem can't
nested inside rcu_read_lock.
Signed-off-by: Li Zefan lize...@huawei.com
---
kernel/cgroup.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index af4ecc3..0e794ca
My kernel fails to boot, because blkcg calls cgroup_path() while
cgroupfs is not mounted.
Fix both cgroup_name() and cgroup_path().
Signed-off-by: Li Zefan lize...@huawei.com
---
include/linux/cgroup.h | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/include
With this fix:
# Documentation/accounting/getdelays -C /cgroup
sleeping 305, blocked 0, running 1, stopped 0, uninterruptible 1
Signed-off-by: Li Zefan lize...@huawei.com
---
fs/kernfs/dir.c | 2 +-
fs/kernfs/kernfs-internal.h | 1 +
fs/kernfs/mount.c | 2 +-
3 files changed
upwards.
Signed-off-by: Li Zefan lize...@huawei.com
---
kernel/cgroup.c | 32
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 37d94a2..5bfe738 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -1498,6
于 2014年02月14日 17:36, Li Zefan 写道:
If we mount the same cgroupfs in serveral mount points, and then
umount all of them, kill_sb() will be called only once.
Therefore it's wrong to increment top_cgroup's refcnt when we find
an existing cgroup_root.
Try:
# mount -t cgroup -o cpuacct
On 2014/2/15 4:47, Tejun Heo wrote:
Currently, there's nothing explicitly preventing
cgroup_enable_task_cg_lists() from missing set PF_EXITING and race
against cgroup_exit(), and, depending on the timing, cgroup_exit()
seemingly may finish with the task still linked on css_set leading to
list
approach would be just adding cgroup_disable=all handling which
disables the whole cgroup rather than tempting fate with this
on-demand craziness.
Signed-off-by: Tejun Heo t...@kernel.org
Cc: sta...@vger.kernel.org
Acked-by: Li Zefan lize...@huawei.com
--
To unsubscribe from this list: send
and drop it after kernfs_mount().
Signed-off-by: Li Zefan lize...@huawei.com
---
kernel/cgroup.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 37d94a2..eaffc08 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -1477,6 +1477,7
boot.
I added the PF_EXITING check years ago:
commit 0e04388f0189fa1f6812a8e1cb6172136eada87e
Author: Li Zefan
Date: Thu Apr 17 11:37:15 2008 +0800
cgroup: fix a race condition in manipulating tsk->cg_list
Now the only race I see is caused by checking tsk->cg
years ago:
commit 0e04388f0189fa1f6812a8e1cb6172136eada87e
Author: Li Zefan l...@cn.fujitsu.com
Date: Thu Apr 17 11:37:15 2008 +0800
cgroup: fix a race condition in manipulating tsk-cg_list
Now the only race I see is caused by checking tsk-cg_list without locking
in cgroup_exit
On 2014/2/9 21:52, Tejun Heo wrote:
> css_scan_tasks() doesn't have any user left. Remove it.
>
I always dislike css_scan_tasks().
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at
ocking during iteration and removes css_scan_tasks().
>
> 0010-0015 clean up migration path to prepare for the planned
> migration taskset handling update.
>
Acked-by: Li Zefan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a
On 2014/2/12 17:12, Michal Hocko wrote:
> Li has pointed out that my previous backport was not correct because
> err_unlock label releases a reference to supperblock which was not taken
> before idr_alloc. I've also removed cgroup_mutex from free_css_id as per
> Li.
> Fixed in this version.
>
-dynamic-cftype-addition-and-removal.patch
> 0005-cgroup-make-cgroup-hold-onto-its-kernfs_node.patch
> 0006-cgroup-remove-cgroup-name.patch
> 0007-cgroup-rename-cgroupfs_root-number_of_cgroups-to-nr_.patch
> 0008-cgroup-remove-cgroupfs_root-refcnt.patch
>
Ack-by: Li Zefan
--
To uns
On 2014/2/12 16:27, Tejun Heo wrote:
> On Wed, Feb 12, 2014 at 03:52:20PM +0800, Li Zefan wrote:
>> The caller won't check the return value but pass it to printk/seq_printf,
>> but now cgroup_path() might return -ENAMETOOLONG..
>
> cgroup_path() returns NULL on overflow whic
On 2014/2/12 16:27, Tejun Heo wrote:
On Wed, Feb 12, 2014 at 03:52:20PM +0800, Li Zefan wrote:
The caller won't check the return value but pass it to printk/seq_printf,
but now cgroup_path() might return -ENAMETOOLONG..
cgroup_path() returns NULL on overflow which printk handles fine
-cgroup-hold-onto-its-kernfs_node.patch
0006-cgroup-remove-cgroup-name.patch
0007-cgroup-rename-cgroupfs_root-number_of_cgroups-to-nr_.patch
0008-cgroup-remove-cgroupfs_root-refcnt.patch
Ack-by: Li Zefan lize...@huawei.com
--
To unsubscribe from this list: send the line unsubscribe linux
On 2014/2/12 17:12, Michal Hocko wrote:
Li has pointed out that my previous backport was not correct because
err_unlock label releases a reference to supperblock which was not taken
before idr_alloc. I've also removed cgroup_mutex from free_css_id as per
Li.
Fixed in this version.
Looks
migration taskset handling update.
Acked-by: Li Zefan lize...@huawei.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http
On 2014/2/9 21:52, Tejun Heo wrote:
css_scan_tasks() doesn't have any user left. Remove it.
I always dislike css_scan_tasks().
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at
> diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
> index dd52e7f..30eee3b 100644
> --- a/kernel/sched/debug.c
> +++ b/kernel/sched/debug.c
> @@ -111,8 +111,7 @@ static char *task_group_path(struct task_group *tg)
> if (autogroup_path(tg, group_path, PATH_MAX))
>
On 2014/2/12 14:37, Tejun Heo wrote:
> Hello, Li.
>
> On Wed, Feb 12, 2014 at 02:28:53PM +0800, Li Zefan wrote:
>> v2:
>> - Don't call deactivate_super() inside cgroup_mutex, as cgroup_kill_sb()
>> will be called if sb refcnt reaches 0. I don't think this can
uess
is probably correct.
Fixes: 4e96ee8e981b ("cgroup: convert cgroup_ida to cgroup_idr")
Reported-by: Michal Hocko
Signed-off-by: Li Zefan
---
Also rebased on "cgroup: fix error return from cgroup_create()".
---
include/linux/c
On 2014/2/12 10:15, Li Zefan wrote:
> On 2014/2/12 0:26, Michal Hocko wrote:
>> On Tue 11-02-14 10:41:05, Tejun Heo wrote:
>> [...]
>>> @@ -4254,12 +4256,12 @@ static long cgroup_create(struct cgroup *parent,
>>> struct dentry *dentry,
>>>
On 2014/2/12 0:26, Michal Hocko wrote:
> On Tue 11-02-14 10:41:05, Tejun Heo wrote:
> [...]
>> @@ -4254,12 +4256,12 @@ static long cgroup_create(struct cgroup *parent,
>> struct dentry *dentry,
>>
>> return 0;
>>
>> -err_unlock:
>> -mutex_unlock(_mutex);
>> -/* Release the
On 2014/2/11 18:20, Michal Hocko wrote:
> Hi Li,
> good work in reproducing the issue so quickly!
> I have tried to backport this patch to 3.12 kernel but the code has
> changed since then.
> The only two instances of idr_remove which are called outside of
> cgroup_mutex seem to be:
> -
>> --- a/fs/jffs2/nodemgmt.c
>> +++ b/fs/jffs2/nodemgmt.c
>> @@ -216,15 +216,20 @@ int jffs2_reserve_space_gc(struct jffs2_sb_info *c,
>> uint32_t minsize,
>>
>> jffs2_dbg(1, "%s(): Requested 0x%x bytes\n", __func__, minsize);
>>
>> -spin_lock(>erase_completion_lock);
>> -
/cgroup.c| 1712
> ++++++++-
> kernel/events/core.c | 17
> mm/memcontrol.c| 16
> mm/memory-failure.c|8
> 7 files changed, 754 insertions(+), 1077 deletions(-)
>
Looks good to me!
Acked-by: Li Zefan
Will look into
{alloc,remove}().
Fixes: 4e96ee8e981b ("cgroup: convert cgroup_ida to cgroup_idr")
Cc: #3.12+
Reported-by: Michal Hocko
Signed-off-by: Li Zefan
---
include/linux/cgroup.h | 2 ++
kernel/cgroup.c| 30 --
2 files changed, 18 insertions(+), 14 deletions(-)
d
...@suse.cz
Signed-off-by: Li Zefan lize...@huawei.com
---
include/linux/cgroup.h | 2 ++
kernel/cgroup.c| 30 --
2 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 5c09759..9450f02 100644
| 1712
-
kernel/events/core.c | 17
mm/memcontrol.c| 16
mm/memory-failure.c|8
7 files changed, 754 insertions(+), 1077 deletions(-)
Looks good to me!
Acked-by: Li Zefan lize...@huawei.com
Will look into remaining
--- a/fs/jffs2/nodemgmt.c
+++ b/fs/jffs2/nodemgmt.c
@@ -216,15 +216,20 @@ int jffs2_reserve_space_gc(struct jffs2_sb_info *c,
uint32_t minsize,
jffs2_dbg(1, %s(): Requested 0x%x bytes\n, __func__, minsize);
-spin_lock(c-erase_completion_lock);
-while(ret == -EAGAIN) {
+
On 2014/2/11 18:20, Michal Hocko wrote:
Hi Li,
good work in reproducing the issue so quickly!
I have tried to backport this patch to 3.12 kernel but the code has
changed since then.
The only two instances of idr_remove which are called outside of
cgroup_mutex seem to be:
- cgroup_create
On 2014/2/12 0:26, Michal Hocko wrote:
On Tue 11-02-14 10:41:05, Tejun Heo wrote:
[...]
@@ -4254,12 +4256,12 @@ static long cgroup_create(struct cgroup *parent,
struct dentry *dentry,
return 0;
-err_unlock:
-mutex_unlock(cgroup_mutex);
-/* Release the reference count
On 2014/2/12 10:15, Li Zefan wrote:
On 2014/2/12 0:26, Michal Hocko wrote:
On Tue 11-02-14 10:41:05, Tejun Heo wrote:
[...]
@@ -4254,12 +4256,12 @@ static long cgroup_create(struct cgroup *parent,
struct dentry *dentry,
return 0;
-err_unlock:
- mutex_unlock(cgroup_mutex
-off-by: Li Zefan lize...@huawei.com
---
Also rebased on cgroup: fix error return from cgroup_create().
---
include/linux/cgroup.h | 2 ++
kernel/cgroup.c| 47 ++-
2 files changed, 28 insertions(+), 21 deletions(-)
diff --git a/include/linux
On 2014/2/12 14:37, Tejun Heo wrote:
Hello, Li.
On Wed, Feb 12, 2014 at 02:28:53PM +0800, Li Zefan wrote:
v2:
- Don't call deactivate_super() inside cgroup_mutex, as cgroup_kill_sb()
will be called if sb refcnt reaches 0. I don't think this can happen,
as cgroup_create() is called through
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index dd52e7f..30eee3b 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -111,8 +111,7 @@ static char *task_group_path(struct task_group *tg)
if (autogroup_path(tg, group_path, PATH_MAX))
return
This is a leftover from commit e23ee74777f389369431d77390c4b09332ce026a
("sched/rt: Simplify pull_rt_task() logic and remove .leaf_rt_rq_list").
Signed-off-by: Li Zefan
---
kernel/sched/core.c | 1 -
kernel/sched/sched.h | 4
2 files changed, 5 deletions(-)
diff --git a/ke
It's a bootstrap function.
Signed-off-by: Li Zefan
---
kernel/sched/rt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 1c40655..e45ec9a 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -1825,7 +1825,7 @@ static void
(Add Michal back to the Cc list, and Cc cgroup mailing list)
On 2014/2/7 17:21, Glyn Normington wrote:
> Hi Michal
>
> On 6 Feb 2014, at 18:59, Michal Hocko wrote:
>
>> On Wed 05-02-14 14:39:52, Glyn Normington wrote:
>>> Reading cgroups.txt and casting around the net leads me to believe
>>>
@wait is a local variable, so if we don't remove it from the wait queue
list, later wake_up() may end up accessing invalid memory.
This was spotted by eyes.
Cc:
Signed-off-by: Li Zefan
---
fs/jffs2/nodemgmt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/jffs2/nodemgmt.c b/fs/jffs2
This was found by our internal debugging feature on runtime, but this
bug won't lead to deadlock, as the structure that this lock is embedded
in is freed on error.
Cc:
Signed-off-by: Li Zefan
---
fs/jffs2/readinode.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/jffs2/readinode.c b
)
[] (do_sync_write+0x98/0xd4)
[] (vfs_write+0xa8/0x150)
[] (sys_write+0x3c/0xc0)]
Fix this by adding a cond_resched() in the while loop.
Cc:
Signed-off-by: Li Zefan
---
fs/jffs2/nodemgmt.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/fs/jffs2/nodemgmt.c b/fs/jffs2
This was found by our internal debugging feature on runtime, but this
bug won't lead to deadlock, as the structure that this lock is embedded
in is freed on error.
Cc: sta...@vger.kernel.org
Signed-off-by: Li Zefan lize...@huawei.com
---
fs/jffs2/readinode.c | 3 +++
1 file changed, 3 insertions
] (__generic_file_aio_write+0x3a4/0x414)
[c00e15c0] (generic_file_aio_write+0x5c/0xbc)
[c012334c] (do_sync_write+0x98/0xd4)
[c0123a84] (vfs_write+0xa8/0x150)
[c0123d74] (sys_write+0x3c/0xc0)]
Fix this by adding a cond_resched() in the while loop.
Cc: sta...@vger.kernel.org
Signed-off-by: Li Zefan lize
@wait is a local variable, so if we don't remove it from the wait queue
list, later wake_up() may end up accessing invalid memory.
This was spotted by eyes.
Cc: sta...@vger.kernel.org
Signed-off-by: Li Zefan lize...@huawei.com
---
fs/jffs2/nodemgmt.c | 1 +
1 file changed, 1 insertion(+)
diff
(Add Michal back to the Cc list, and Cc cgroup mailing list)
On 2014/2/7 17:21, Glyn Normington wrote:
Hi Michal
On 6 Feb 2014, at 18:59, Michal Hocko mho...@suse.cz wrote:
On Wed 05-02-14 14:39:52, Glyn Normington wrote:
Reading cgroups.txt and casting around the net leads me to believe
This is a leftover from commit e23ee74777f389369431d77390c4b09332ce026a
(sched/rt: Simplify pull_rt_task() logic and remove .leaf_rt_rq_list).
Signed-off-by: Li Zefan lize...@huawei.com
---
kernel/sched/core.c | 1 -
kernel/sched/sched.h | 4
2 files changed, 5 deletions(-)
diff --git
It's a bootstrap function.
Signed-off-by: Li Zefan lize...@huawei.com
---
kernel/sched/rt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 1c40655..e45ec9a 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -1825,7 +1825,7
This is finally done!
We'll have our most important vacation in China, so I won't be responsive
until next next Monday. I'll review those patches when I come back to work.
On 2014/1/29 7:54, Tejun Heo wrote:
> Hello,
>
> cgroup filesystem code was derived from the original sysfs
>
This is finally done!
We'll have our most important vacation in China, so I won't be responsive
until next next Monday. I'll review those patches when I come back to work.
On 2014/1/29 7:54, Tejun Heo wrote:
Hello,
cgroup filesystem code was derived from the original sysfs
implementation
> 0001-0002 drop cgroup module support.
>
> 0003-0004 are cleanups.
>
> 0005-0006 remove cgroup_root_mutex.
>
Acked-by: Li Zefan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
> /**
> - * for_each_subsys - iterate all loaded cgroup subsystems
> + * for_each_subsys - iterate all enabled cgroup subsystems
> * @ss: the iteration cursor
> * @ssid: the index of @ss, CGROUP_SUBSYS_COUNT after reaching the end
> - *
> - * Iterates through all loaded subsystems. Should be
On 2014/1/28 23:32, Tejun Heo wrote:
> cgroup_root_from_opts() checks whether (!opts->subsys_mask &&
> !opts->none) and returns NULL if so. After that, if allocation fails,
> returns ERR_PTR(-ENOMEM). The caller, cgroup_mount(), doesn't treat
> NULL as an error but set opts.new_root to NULL;
, which actually reduces LOC.
>
> Signed-off-by: Tejun Heo
> Cc: sta...@vger.kernel.org
Good catch!
Acked-by: Li Zefan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at
On 2014/1/28 23:32, Tejun Heo wrote:
> When cgroup_mount() fails to allocate an id for the root, it didn't
> set ret before jumping to unlock_drop ending up returning 0 after a
> failure. Fix it.
>
> Signed-off-by: Tejun Heo
> Cc: sta...@vger.kernel.org
Acked-by: Li Zefan
On 2014/1/28 23:32, Tejun Heo wrote:
> cgroup_create() was returning 0 after allocation failures. Fix it.
>
> Signed-off-by: Tejun Heo
> Cc: sta...@vger.kernel.org
Acked-by: Li Zefan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body
On 2014/1/28 23:32, Tejun Heo wrote:
cgroup_create() was returning 0 after allocation failures. Fix it.
Signed-off-by: Tejun Heo t...@kernel.org
Cc: sta...@vger.kernel.org
Acked-by: Li Zefan lize...@huawei.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel
On 2014/1/28 23:32, Tejun Heo wrote:
When cgroup_mount() fails to allocate an id for the root, it didn't
set ret before jumping to unlock_drop ending up returning 0 after a
failure. Fix it.
Signed-off-by: Tejun Heo t...@kernel.org
Cc: sta...@vger.kernel.org
Acked-by: Li Zefan lize
...@kernel.org
Cc: sta...@vger.kernel.org
Good catch!
Acked-by: Li Zefan lize...@huawei.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read
On 2014/1/28 23:32, Tejun Heo wrote:
cgroup_root_from_opts() checks whether (!opts-subsys_mask
!opts-none) and returns NULL if so. After that, if allocation fails,
returns ERR_PTR(-ENOMEM). The caller, cgroup_mount(), doesn't treat
NULL as an error but set opts.new_root to NULL; however,
301 - 400 of 1870 matches
Mail list logo