[PATCH] Validate pointer when copying mount namespace.

2015-04-28 Thread Leon Ma
t;] syscall_call+0x7/0xb Signed-off-by: Leon Ma --- fs/namespace.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/namespace.c b/fs/namespace.c index 1f4f9da..1c61c92 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -2788,7 +2788,7 @@ struct mnt_namespace *copy

[PATCH] Validate pointer when copying mount namespace.

2015-04-28 Thread Leon Ma
00020200 ffea [35046.389259] Call Trace: [35046.391693] [8085f98d] create_new_namespaces+0x4d/0x160 [35046.397106] [8085fbcf] unshare_nsproxy_namespaces+0x5f/0xa0 [35046.402870] [8083c7c4] SyS_unshare+0x104/0x240 [35046.407518] [80fe1700] syscall_call+0x7/0xb Signed-off-by: Leon Ma

[PATCH] move exit_task_work() before exit_fs().

2014-12-25 Thread Leon Ma
360] [] ? hrtimer_start_range_ns+0x14/0x20 [ 118.522368] [] ? binder_ioctl+0x15d/0x990 [ 118.522377] [] do_notify_resume+0x65/0x80 [ 118.522384] [] int_signal+0x12/0x17 Signed-off-by: Leon Ma Signed-off-by: Zhang Di Signed-off-by: Sun Zhonghua --- kernel/exit.c |4 ++-- 1 file changed, 2 insertions(+)

[PATCH] move exit_task_work() before exit_fs().

2014-12-25 Thread Leon Ma
/0x20 [ 118.522368] [8262a98d] ? binder_ioctl+0x15d/0x990 [ 118.522377] [82002ca5] do_notify_resume+0x65/0x80 [ 118.522384] [82844efa] int_signal+0x12/0x17 Signed-off-by: Leon Ma xindong...@intel.com Signed-off-by: Zhang Di di.zh...@intel.com Signed-off-by: Sun

[PATCH] rmap: validate pointer in anon_vma_clone

2014-05-06 Thread Leon Ma
If memory allocation failed in first loop, root will be NULL and will lead to kernel panic. Signed-off-by: Leon Ma --- mm/rmap.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mm/rmap.c b/mm/rmap.c index 9c3e773..6e53aed 100644 --- a/mm/rmap.c +++ b/mm/rmap.c

[PATCH] rmap: validate pointer in anon_vma_clone

2014-05-06 Thread Leon Ma
If memory allocation failed in first loop, root will be NULL and will lead to kernel panic. Signed-off-by: Leon Ma xindong...@intel.com --- mm/rmap.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mm/rmap.c b/mm/rmap.c index 9c3e773..6e53aed 100644 --- a/mm/rmap.c

[tip:timers/urgent] hrtimer: Prevent remote enqueue of leftmost timers

2014-04-30 Thread tip-bot for Leon Ma
Commit-ID: 012a45e3f4af68e86d85cce060c6c2fed56498b2 Gitweb: http://git.kernel.org/tip/012a45e3f4af68e86d85cce060c6c2fed56498b2 Author: Leon Ma AuthorDate: Wed, 30 Apr 2014 16:43:10 +0800 Committer: Thomas Gleixner CommitDate: Wed, 30 Apr 2014 12:34:51 +0200 hrtimer: Prevent remote

[PATCH] hrtimer:do not start hrtimer on other cpu if it is the leftmost timer.

2014-04-30 Thread Leon Ma
not set the event source. As a result, the timers on cpuY will expire later than expected. When this case is detected, we should start the timer on cpuX and program event source properly. Signed-off-by: Leon Ma --- kernel/hrtimer.c |5 + 1 file changed, 5 insertions(+) diff --git

[PATCH] hrtimer:do not start hrtimer on other cpu if it is the leftmost timer.

2014-04-30 Thread Leon Ma
not set the event source. As a result, the timers on cpuY will expire later than expected. When this case is detected, we should start the timer on cpuX and program event source properly. Signed-off-by: Leon Ma xindong...@intel.com --- kernel/hrtimer.c |5 + 1 file changed, 5 insertions

[tip:timers/urgent] hrtimer: Prevent remote enqueue of leftmost timers

2014-04-30 Thread tip-bot for Leon Ma
Commit-ID: 012a45e3f4af68e86d85cce060c6c2fed56498b2 Gitweb: http://git.kernel.org/tip/012a45e3f4af68e86d85cce060c6c2fed56498b2 Author: Leon Ma xindong...@intel.com AuthorDate: Wed, 30 Apr 2014 16:43:10 +0800 Committer: Thomas Gleixner t...@linutronix.de CommitDate: Wed, 30 Apr 2014 12:34

[PATCH] LMK: Optimize lowmem_shrink

2013-08-20 Thread Leon Ma
From: Leon Ma Date: Mon, 19 Aug 2013 14:22:38 +0800 Subject: [PATCH] LMK: Optimize lowmem_shrink. By comparing with selected_oom_score_adj instead of min_score_adj, we may do less calculation. Signed-off-by: Leon Ma --- drivers/staging/android/lowmemorykiller.c | 12 1 files

[PATCH] LMK: Optimize lowmem_shrink

2013-08-20 Thread Leon Ma
From: Leon Ma xindong...@intel.com Date: Mon, 19 Aug 2013 14:22:38 +0800 Subject: [PATCH] LMK: Optimize lowmem_shrink. By comparing with selected_oom_score_adj instead of min_score_adj, we may do less calculation. Signed-off-by: Leon Ma xindong...@intel.com --- drivers/staging/android

[PATCH] Enable dumping running process stack.

2013-08-19 Thread Leon Ma
From: Leon Ma Date: Fri, 16 Aug 2013 13:11:15 +0800 Subject: [PATCH] Enable dumping running process stack. Currently, if the process is running, we can not dump the stack via /proc//stack, because in __save_stack_address() it will return immediately if the address is not reliable. Sometimes one

[PATCH] LMK: Optimize lowmem_shrink

2013-08-19 Thread Leon Ma
From: Leon Ma Date: Mon, 19 Aug 2013 14:22:38 +0800 Subject: [PATCH] LMK: Optimize lowmem_shrink. By comparing with selected_oom_score_adj instead of min_score_adj, we may do less calculation. Signed-off-by: Leon Ma --- drivers/staging/android/lowmemorykiller.c | 12 1 files

[PATCH] LMK: Optimize lowmem_shrink

2013-08-19 Thread Leon Ma
From: Leon Ma xindong...@intel.com Date: Mon, 19 Aug 2013 14:22:38 +0800 Subject: [PATCH] LMK: Optimize lowmem_shrink. By comparing with selected_oom_score_adj instead of min_score_adj, we may do less calculation. Signed-off-by: Leon Ma xindong...@intel.com --- drivers/staging/android

[PATCH] Enable dumping running process stack.

2013-08-19 Thread Leon Ma
From: Leon Ma xindong...@intel.com Date: Fri, 16 Aug 2013 13:11:15 +0800 Subject: [PATCH] Enable dumping running process stack. Currently, if the process is running, we can not dump the stack via /proc/pid/stack, because in __save_stack_address() it will return immediately if the address