[PATCH 1/6] mm: use vma_pages() to replace (vm_end - vm_start) PAGE_SHIFT

2013-04-15 Thread Libin
(*-vm_end - *-vm_start) PAGE_SHIFT operation is implemented as a inline funcion vma_pages() in linux/mm.h, so using it. Signed-off-by: Libin huawei.li...@huawei.com --- mm/memory.c | 2 +- mm/mmap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/memory.c b/mm

[PATCH 4/6] char: use vma_pages() to replace (vm_end - vm_start) PAGE_SHIFT

2013-04-15 Thread Libin
(*-vm_end - *-vm_start) PAGE_SHIFT operation is implemented as a inline funcion vma_pages() in linux/mm.h, so using it. Signed-off-by: Libin huawei.li...@huawei.com --- drivers/char/mspec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/mspec.c b/drivers/char

[PATCH 5/6] drm: use vma_pages() to replace (vm_end - vm_start) PAGE_SHIFT

2013-04-15 Thread Libin
(*-vm_end - *-vm_start) PAGE_SHIFT operation is implemented as a inline funcion vma_pages() in linux/mm.h, so using it. Signed-off-by: Libin huawei.li...@huawei.com --- drivers/gpu/drm/ttm/ttm_bo_vm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ttm

[PATCH 2/6] PCI: use vma_pages() to replace (vm_end - vm_start) PAGE_SHIFT

2013-04-15 Thread Libin
(*-vm_end - *-vm_start) PAGE_SHIFT operation is implemented as a inline funcion vma_pages() in linux/mm.h, so using it. Signed-off-by: Libin huawei.li...@huawei.com --- drivers/pci/pci-sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/pci-sysfs.c b/drivers

[PATCH 6/6] uio: use vma_pages() to replace (vm_end - vm_start) PAGE_SHIFT

2013-04-15 Thread Libin
(*-vm_end - *-vm_start) PAGE_SHIFT operation is implemented as a inline funcion vma_pages() in linux/mm.h, so using it. Signed-off-by: Libin huawei.li...@huawei.com --- drivers/uio/uio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c

[PATCH 3/6] ncpfs: use vma_pages() to replace (vm_end - vm_start) PAGE_SHIFT

2013-04-15 Thread Libin
(*-vm_end - *-vm_start) PAGE_SHIFT operation is implemented as a inline funcion vma_pages() in linux/mm.h, so using it. Signed-off-by: Libin huawei.li...@huawei.com --- fs/ncpfs/mmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ncpfs/mmap.c b/fs/ncpfs/mmap.c index

Re: [PATCH 3.8-stable] sched/debug: Fix sd-*_idx limit range avoiding overflow

2013-04-15 Thread libin
On 2013/4/15 22:15, Jonghwan Choi wrote: From: libin huawei.li...@huawei.com This patch looks like it should be in the 3.8-stable tree, should we apply it? yes, I think this patch should be applied to the 3.8-stable tree. Thanks. Libin -- From: libin huawei.li

[PATCH resend] sched: Fix sd-*_idx limit range avoiding overflow

2013-04-08 Thread libin
Commit 201c373e8e (sched/debug: Limit sd-*_idx range on sysctl) was an incomplete bug fix. This patch fixs sd-*_idx limit range to [0 ~ CPU_LOAD_IDX_MAX - 1] avioding array overflow caused by setting sd-*_idx to CPU_LOAD_IDX_MAX on sysctl. Signed-off-by: Libin huawei.li...@huawei.com --- kernel

[PATCH] sched: Fix comment of function rebalance_domains

2013-04-01 Thread Libin
The comment of function rebalance_domains mentions arch_init_sched_domains, but this function don't exist. The proper function is init_sched_domains. Signed-off-by: Libin huawei.li...@huawei.com --- kernel/sched/fair.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[PATCH] sched: Fix sd-*_idx limit range avoiding overflow

2013-04-02 Thread Libin
Commit 201c373e8e (sched/debug: Limit sd-*_idx range on sysctl) was an incomplete bug fix. This patch fixs sd-*_idx limit range to [0 ~ CPU_LOAD_IDX_MAX - 1] avioding array overflow caused by setting sd-*_idx to CPU_LOAD_IDX_MAX on sysctl. Signed-off-by: Libin huawei.li...@huawei.com --- kernel

[PATCH] Documentation/kmemcheck: update kmemcheck documentation

2013-08-23 Thread Libin
Kmemcheck configuration menu location correction in Documentation/ kmemcheck.txt Signed-off-by: Libin huawei.li...@huawei.com --- Documentation/kmemcheck.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/kmemcheck.txt b/Documentation/kmemcheck.txt index

[PATCH] workqueue: remove unnecessary goto statement

2013-08-23 Thread Libin
Using return NULL to replace goto statement and avoiding a redundant function call for free_workqueue_attrs(). If kzalloc for attrs of struct workqueue_attrs is failed, alloc_workqueue_attrs return NULL directedly. With no functional changs. Signed-off-by: Libin huawei.li...@huawei.com

Re: [PATCH] workqueue: Correct/Drop references to gcwq in Documentation

2013-08-19 Thread Libin
On 2013/8/16 22:47, Tejun Heo wrote: On Fri, Aug 16, 2013 at 01:33:17PM +0800, Libin wrote: No functional changes. This patch fixes the post gcwq comments in Documentation/workqueue.txt. Signed-off-by: Libin huawei.li...@huawei.com Thanks a lot for doing this. Can you please update

[PATCH v2 1/3] workqueue: Comment correction in file header

2013-08-20 Thread Libin
No functional change. There are two worker pools for each cpu in current implementation(one for normal work items and the other for high priority ones). Signed-off-by: Libin huawei.li...@huawei.com --- kernel/workqueue.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git

[PATCH v2 2/3] workqueue: Fix manage_workers() RETURNS description

2013-08-20 Thread Libin
No functional change. The comment of function manage_workers() RETURNS description is obvious wrong, same as the CONTEXT. Fix it. Signed-off-by: Libin huawei.li...@huawei.com --- kernel/workqueue.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kernel/workqueue.c b

[PATCH v2 3/3] workqueue: Correct/Drop references to gcwq in Documentation

2013-08-20 Thread Libin
No functional changes. This patch fixes the post gcwq comments in Documentation/workqueue.txt. Signed-off-by: Libin huawei.li...@huawei.com --- Documentation/workqueue.txt | 72 ++--- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git

[PATCH v2 0/3] workqueue: Comment/Doc correction with no functional change

2013-08-20 Thread Libin
This patch set doesn't make any functional differences. Libin (3): workqueue: Comment correction in file header workqueue: Fix manage_workers() RETURNS description workqueue: Correct/Drop references to gcwq in Documentation Documentation/workqueue.txt | 72

Re: [BUG REPORT]kernel panic with kmemcheck config

2013-08-21 Thread Libin
On 2013/8/21 12:46, Dave Hansen wrote: On 08/20/2013 07:45 PM, Libin wrote: [3.158023] [ cut here ] [3.162626] WARNING: CPU: 0 PID: 1 at arch/x86/mm/kmemcheck/kmemcheck.c:634 kmemcheck_fault+0xb1/0xc0() ... [3.314877] [81046aa7] ? kmemcheck_trap

[PATCH] workqueue: Comment correction in file header

2013-08-15 Thread Libin
No functional change. There are two worker pools for each cpu in current implementation(one for normal work items and the other for high priority ones). Signed-off-by: Libin huawei.li...@huawei.com --- kernel/workqueue.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH] workqueue: Fix manage_workers() RETURNS description

2013-08-15 Thread Libin
No functional change. The comment of function manage_workers() RETURNS description is obvious wrong, same as the CONTEXT. Fix it. Signed-off-by: Libin huawei.li...@huawei.com --- kernel/workqueue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/workqueue.c b

[PATCH] workqueue: Correct/Drop references to gcwq in Documentation

2013-08-15 Thread Libin
No functional changes. This patch fixes the post gcwq comments in Documentation/workqueue.txt. Signed-off-by: Libin huawei.li...@huawei.com --- Documentation/workqueue.txt | 60 ++--- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git

Re: [PATCH] workqueue: remove meaningless BUILD_BUG_ON() in init_workqueues()

2013-09-09 Thread Libin
into this one with the suggested update? Hello Tejun, I will update it according to your suggestion. Thanks! Libin Thanks. -- 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

Re: [PATCH] workqueue: fix potential reentrancy issue

2013-09-09 Thread Libin
Hello Tejun, On 2013/9/9 22:14, Tejun Heo wrote: On Mon, Sep 09, 2013 at 01:12:14PM +0800, Libin wrote: From: Li Bin huawei.li...@huawei.com When one work starts execution, the high bits of work's data contain pool ID. It can represent a maximum of WORK_OFFQ_POOL_NONE. Pool ID is assigned

[PATCH] workqueue: fix pool ID allocation leakage and remove BUILD_BUG_ON() in init_workqueues

2013-09-09 Thread Libin
From: Li Bin huawei.li...@huawei.com When one work starts execution, the high bits of work's data contain pool ID. It can represent a maximum of WORK_OFFQ_POOL_NONE. Pool ID is assigned WORK_OFFQ_POOL_NONE when the work being initialized indicating that no pool is associated and get_work_pool()

[PATCH] workqueue: remove redundant timer_stats_timer_set_start_info() call

2013-09-10 Thread Libin
From: Li Bin huawei.li...@huawei.com There is a redundant call for timer_stats_timer_set_start_info(), because it is the responsibility of the 'timer add' function: add_timer_on() |- timer_stats_timer_set_start_info() add_timer() |- mod_timer() |- __mod_timer() |-

Re: [PATCH] workqueue: remove redundant timer_stats_timer_set_start_info() call

2013-09-10 Thread Libin
On 2013/9/10 21:45, Tejun Heo wrote: On Tue, Sep 10, 2013 at 02:35:27PM +0800, Libin wrote: From: Li Bin huawei.li...@huawei.com There is a redundant call for timer_stats_timer_set_start_info(), because it is the responsibility of the 'timer add' function: add_timer_on

[PATCH] sched/rt: Fix comment of task_tick_rt()

2013-10-21 Thread Libin
From: Li Bin huawei.li...@huawei.com This issue was introduced by 454c7999(sched/rt: Fix SCHED_RR across cgroups) that missing the word 'not'. Fix it. Signed-off-by: Li Bin huawei.li...@huawei.com --- kernel/sched/rt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH] ipc/sem.c: fix small codingstyle

2013-10-15 Thread Libin
From: Li Bin huawei.li...@huawei.com small codingstyle fix: '*' should be adjacent to the data name. Signed-off-by: Li Bin huawei.li...@huawei.com --- ipc/sem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipc/sem.c b/ipc/sem.c index 8c4f59b..7583fe8 100644 ---

[PATCH] char: Use vma_pages() to replace (vm_end - vm_start) PAGE_SHIFT

2013-05-12 Thread Libin
(*-vm_end - *-vm_start) PAGE_SHIFT operation is implemented as a inline funcion vma_pages() in linux/mm.h, so using it. Signed-off-by: Libin huawei.li...@huawei.com --- drivers/char/mspec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/mspec.c b/drivers/char

Re: [PATCH] Documentation/kmemcheck: update kmemcheck documentation

2013-09-04 Thread Libin
On 2013/9/4 14:51, Pekka Enberg wrote: On Sat, Aug 24, 2013 at 3:31 AM, Libin huawei.li...@huawei.com wrote: Kmemcheck configuration menu location correction in Documentation/ kmemcheck.txt Signed-off-by: Libin huawei.li...@huawei.com Looks good to me. Andrew mind picking this up? Hi

[PATCH] workqueue: fix ordered workqueue in multi NUMA nodes platform

2013-09-04 Thread Libin
in different NUMA nodes. Signed-off-by: Libin huawei.li...@huawei.com --- kernel/workqueue.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 29b7985..42c6c29 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c

[PATCH] x86, smpboot: fix announce_cpu() to print the last OK

2013-09-05 Thread Libin
#15 #16 #17 OK [0.890495] smpboot: Booting Node 1, Processors #18 #19 #20 #21 #22 #23 But the last OK is lost, because 'nr_cpu_ids-1' represents the maxinum possible cpu id. It should use the maxinum present cpu id. Signed-off-by: Libin huawei.li...@huawei.com --- arch/x86/kernel/smpboot.c

[PATCH] workqueue: remove meaningless BUILD_BUG_ON() in init_workqueues()

2013-09-08 Thread Libin
From: Li Bin huawei.li...@huawei.com In the current implementation, this BUILD_BUG_ON makes no sense. First of all, the number of worker pools needed cannot be determined at compile time, because the number of backing pools for UNBOUND workqueues is dynamic based on the assigned custom

[PATCH] workqueue: fix potential reentrancy issue

2013-09-08 Thread Libin
From: Li Bin huawei.li...@huawei.com When one work starts execution, the high bits of work's data contain pool ID. It can represent a maximum of WORK_OFFQ_POOL_NONE. Pool ID is assigned WORK_OFFQ_POOL_NONE when the work being initialized indicating that no pool is associated and get_work_pool()

[PATCH] workqueue: fix comment typo for __queue_work()

2013-09-08 Thread Libin
From: Li Bin huawei.li...@huawei.com It seems the dying should be draining here. Signed-off-by: Li Bin huawei.li...@huawei.com --- kernel/workqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 987293d..e390f3a 100644 ---

[PATCH] Documentation/sched: update sched-design-CFS.txt documentation

2013-09-09 Thread Libin
From: Li Bin huawei.li...@huawei.com 2bd2d6f2dc (sched: Replace use of entity_key()) had remove the entity_key() which function is to subtract a tasks vruntime by its groups minvruntime as the rbtree key. The phrase there is a subtraction using rq-cfs.min_vruntime to account for possible

[PATCH 08/14] namespace: Fix invalid wakeup in zap_pid_ns_processes

2013-08-29 Thread Libin
; schedule(); } __set_current_state(TASK_RUNNING); ... To solve this problem, using preempt_disable() to bound the operaion that setting the task state and the conditions(set by the wake thread) validation. Signed-off-by: Libin huawei.li...@huawei.com --- kernel/pid_namespace.c | 4 1 file changed

[PATCH 09/14] rcutree: Fix invalid wakeup in rcu_wait

2013-08-29 Thread Libin
that and before __set_current_state(TASK_RUNNING), it triggers the invalid wakeup problem. To solve this problem, using preempt_disable() to bound the operaion that setting the task state and the conditions(set by the wake thread) validation. Signed-off-by: Libin huawei.li...@huawei.com --- kernel

[PATCH 02/14] audit: Fix invalid wakeup in kauditd_thread

2013-08-29 Thread Libin
); preempt_enable(); ... } Signed-off-by: Libin huawei.li...@huawei.com --- kernel/audit.c | 4 1 file changed, 4 insertions(+) diff --git a/kernel/audit.c b/kernel/audit.c index 91e53d0..a7d1346 100644 --- a/kernel/audit.c +++ b/kernel/audit.c @@ -455,15 +455,19 @@ static int kauditd_thread(void

[PATCH 12/14] trace: Fix invalid wakeup in ring_buffer_consumer_thread

2013-08-29 Thread Libin
that and before __set_current_state(TASK_RUNNING), it triggers the invalid wakeup problem. To solve this problem, using preempt_disable() to bound the operaion that setting the task state and the conditions(set by the wake thread) validation. Signed-off-by: Libin huawei.li...@huawei.com --- kernel

[PATCH 07/14] module: Fix invalid wakeup in wait_for_zero_refcount

2013-08-29 Thread Libin
(TASK_RUNNING); preempt_enable(); ... Signed-off-by: Libin huawei.li...@huawei.com --- kernel/module.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/module.c b/kernel/module.c index 2069158..22064e9 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -816,14

[PATCH 05/14] hrtimer: Fix invalid wakeup in do_nanosleep

2013-08-29 Thread Libin
that and before __set_current_state(TASK_RUNNING), it triggers the invalid wakeup problem. To solve this problem, using preempt_disable() to bound the operaion that setting the task state and the conditions(set by the wake thread) validation. Signed-off-by: Libin huawei.li...@huawei.com --- kernel

[PATCH 04/14] exit: Fix invalid wakeup in do_wait

2013-08-29 Thread Libin
that and before __set_current_state(TASK_RUNNING), it triggers the invalid wakeup problem. To solve this problem, using preempt_disable() to bound the operaion that setting the task state and the conditions(set by the wake thread) validation. Signed-off-by: Libin huawei.li...@huawei.com --- kernel

[PATCH 01/14] kthread: Fix invalid wakeup in kthreadd

2013-08-29 Thread Libin
-by: Libin huawei.li...@huawei.com --- kernel/kthread.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/kthread.c b/kernel/kthread.c index 760e86d..25c3fed 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c @@ -456,10 +456,15 @@ int kthreadd(void *unused

[PATCH 11/14] trace: Fix invalid wakeup in wait_to_die

2013-08-29 Thread Libin
(); schedule(); preempt_disable(); set_current_state(TASK_INTERRUPTIBLE); } __set_current_state(TASK_RUNNING); preempt_enable(); Signed-off-by: Libin huawei.li...@huawei.com --- kernel/trace/ring_buffer_benchmark.c | 4 1 file changed, 4 insertions(+) diff --git a/kernel

[PATCH 10/14] time: Fix invalid wakeup in alarmtimer_do_nsleep

2013-08-29 Thread Libin
that and before __set_current_state(TASK_RUNNING), it triggers the invalid wakeup problem. To solve this problem, using preempt_disable() to bound the operaion that setting the task state and the conditions(set by the wake thread) validation. Signed-off-by: Libin huawei.li...@huawei.com --- kernel/time

[PATCH 03/14] audit: Fix invalid wakeup in wait_for_auditd

2013-08-29 Thread Libin
(); } __set_current_state(TASK_RUNNING); preempt_enable(); ... Signed-off-by: Libin huawei.li...@huawei.com --- kernel/audit.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/audit.c b/kernel/audit.c index a7d1346..48d2f76 100644 --- a/kernel/audit.c +++ b/kernel/audit.c @@ -1060,14

[PATCH 06/14] irq: Fix invalid wakeup in irq_wait_for_interrupt

2013-08-29 Thread Libin
by the wake thread) validation. Signed-off-by: Libin huawei.li...@huawei.com --- kernel/irq/manage.c | 5 + 1 file changed, 5 insertions(+) diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 514bcfd..09cb02f 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -655,6 +655,7

[PATCH 13/14] workqueue: Fix invalid wakeup in rescuer_thread

2013-08-29 Thread Libin
that and before __set_current_state(TASK_RUNNING), it triggers the invalid wakeup problem. To solve this problem, using preempt_disable() to bound the operaion that setting the task state and the conditions(set by the wake thread) validation. Signed-off-by: Libin huawei.li...@huawei.com --- kernel

[PATCH 00/14] Fix bug about invalid wake up problem

2013-08-29 Thread Libin
)){ set_current_state(TASK_INTERRUPTIBLE); preempt_enable(); schedule(); preempt_disable(); } preempt_enable(); ... -- Libin (14): kthread: Fix invalid wakeup in kthreadd audit: Fix invalid wakeup in kauditd_thread

[PATCH 14/14] klist: Fix invalid wakeup in klist_remove

2013-08-29 Thread Libin
); if (waiter.woken) break; preempt_enable(); schedule(); preempt_disable(); } __set_current_state(TASK_RUNNING); preempt_enable(); ... Signed-off-by: Libin huawei.li...@huawei.com --- lib/klist.c | 4 1 file changed, 4 insertions(+) diff --git a/lib/klist.c

Re: [PATCH 00/14] Fix bug about invalid wake up problem

2013-08-29 Thread Libin
On 2013/8/29 21:57, Libin wrote: 2)Test: I have written a test module to trigger the problem by adding some synchronization condition. I will post it in the form of an attachment soon. Test result as follows: [103135.332683] wakeup_test: create two kernel threads - producer consumer

Re: [PATCH 00/14] Fix bug about invalid wake up problem

2013-08-29 Thread Libin
Hi all, I'm so sorry, please ignore this patch set! I have realized that there is no this problem in our kernel. Preempt_schedule() has set PREEMPT_ACTIVE before calling __schedule() and __schedule will check it if current state is not TASK_RUNNING, avoiding this preemption. Libin On 2013/8/29

Re: [PATCH V2] MIPS: change type of asid_cache to unsigned long

2014-05-30 Thread Libin
to the truncation operation caused by inappropriate type conversion, making tlb flush failure, causing problems of COW, triggering bus error or segment fault. Thanks, Libin -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More

[PATCH] workqueue: Fix comment typo for enum WQ_SYSFS

2013-12-08 Thread Libin
From: Li Bin huawei.li...@huawei.com s/wq_sysfs_register()/workqueue_sysfs_register() Signed-off-by: Li Bin huawei.li...@huawei.com --- include/linux/workqueue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index

[PATCH] workqueue: Remove redundant call for pwq_adjust_max_active

2013-12-08 Thread Libin
From: Li Bin huawei.li...@huawei.com In __alloc_workqueue_key(), alloc_and_link_pwqs() already called pwq_adjust_max_active() to update the pwq's max_active, but after that there is a redundant call for pwq_adjust_max_active. It is meanless, remove it. Signed-off-by: Li Bin

[PATCH] drivers/net: Fix potential incorrect call for udelay()

2013-12-23 Thread Libin
From: Li Bin huawei.li...@huawei.com The variable delay_time as a module parameter can be set a value exceeding the limit of the udelay function. This patch checks the delay_time value to select mdelay() or udelay(). Signed-off-by: Li Bin huawei.li...@huawei.com ---

Re: [PATCH] arm64: ftrace: function_graph: dump real return addr in call trace

2015-10-21 Thread libin
在 2015/10/20 23:32, Catalin Marinas 写道: On Thu, Oct 15, 2015 at 10:18:12AM -0400, Steven Rostedt wrote: On Thu, 15 Oct 2015 13:51:33 +0100 Will Deacon wrote: Is this the same old problem caused by e306dfd06fcb ("ARM64: unwind: Fix PC calculation")? I've said previously

Re: [PATCH] recordmcount: arm64: replace the ignored mcount call into nop

2015-10-30 Thread libin
在 2015/10/29 23:09, Will Deacon 写道: > On Thu, Oct 29, 2015 at 09:35:42PM +0800, kbuild test robot wrote: >> [auto build test ERROR on arm64/for-next/core -- if it's inappropriate base, >> please suggest rules for selecting the more suitable base] >> >> url: >>

Re: [PATCH 1/3] recordmcount: fix endianness handling bug for nop_mcount

2015-10-30 Thread libin
on 2015/10/30 16:31, Li Bin wrote: > In nop_mcount, shdr->sh_offset and welp->r_offset should handle > endianness properly, otherwise it will trigger Segmentation fault > if the recordmcount main and file.o have different endianness. > For more information, please refer to

Re: [PATCH 3/3] recordmcount: arm64: replace the ignored mcount call into nop

2015-10-30 Thread libin
on 2015/10/30 16:31, Li Bin wrote: > By now, the recordmcount only records the function that in > following sections: > .text/.ref.text/.sched.text/.spinlock.text/.irqentry.text/ > .kprobes.text/.text.unlikely > > For the function that not in these sections, the call mcount > will be in place

Re: [PATCH 1/3] recordmcount: fix endianness handling bug for nop_mcount

2015-10-30 Thread libin
on 2015/10/30 22:35, Sergei Shtylyov wrote: > Hello. > > On 10/30/2015 11:31 AM, Li Bin wrote: > >> In nop_mcount, shdr->sh_offset and welp->r_offset should handle >> endianness properly, otherwise it will trigger Segmentation fault >> if the recordmcount main and file.o have different

[PATCH] recordmcount: fix endianness handling bug for nop_mcount

2015-11-02 Thread libin
In nop_mcount, shdr->sh_offset and welp->r_offset should handle endianness properly, otherwise it will trigger Segmentation fault if the recordmcount main and file.o have different endianness. Cc: # 3.0+ Signed-off-by: Li Bin ---

Re: [PATCH] arm64: ftrace: stop using kstop_machine to enable/disable tracing

2015-12-03 Thread libin
on 2015/12/2 20:36, Will Deacon wrote: > On Sat, Nov 28, 2015 at 03:50:09PM +0800, Li Bin wrote: >> On arm64, kstop_machine which is hugely disruptive to a running >> system is not needed to convert nops to ftrace calls or back, >> because that modifed code is a single 32bit instructions which >>

Re: [PATCH] arm64: ftrace: stop using kstop_machine to enable/disable tracing

2015-12-03 Thread libin
on 2015/12/2 21:16, Will Deacon wrote: > On Wed, Dec 02, 2015 at 12:36:54PM +, Will Deacon wrote: >> On Sat, Nov 28, 2015 at 03:50:09PM +0800, Li Bin wrote: >>> On arm64, kstop_machine which is hugely disruptive to a running >>> system is not needed to convert nops to ftrace calls or back,

Re: [PATCH] arm64: ftrace: stop using kstop_machine to enable/disable tracing

2015-12-03 Thread libin
Thanks very much to Will and Steve for the wonderful comments, I will modify the commit message, and remove the misleading comments about module text disappearing case. Thanks again, Li Bin on 2015/12/3 23:31, Steven Rostedt wrote: > On Thu, 3 Dec 2015 15:09:26 + > Will Deacon

Re: [PATCH] ftrace: fix a typo in comment

2015-11-30 Thread libin
Sorry for my mistake. And please ignore this patch. Thanks, Li Bin on 2015/11/30 17:53, Daniel K. wrote: > On 11/30/2015 09:24 AM, Li Bin wrote: >> s/ARCH_SUPPORT_FTARCE_OPS/ARCH_SUPPORTS_FTARCE_OPS > How about s/FTARCE/FTRACE/ as well? > > > Daniel K. > > > -- To unsubscribe from this list:

Re: [PATCH] arm64: ftrace: stop using kstop_machine to enable/disable tracing

2015-11-29 Thread libin
on 2015/11/28 23:58, Steven Rostedt wrote: > On Sat, 28 Nov 2015 15:50:09 +0800 > Li Bin wrote: > >> On arm64, kstop_machine which is hugely disruptive to a running >> system is not needed to convert nops to ftrace calls or back, >> because that modifed code is a single

Re: [PATCH] livepatch: fix race between enabled_store() and klp_unregister_patch()

2015-11-30 Thread libin
Hi Josh, on 2015/12/1 9:11, Josh Poimboeuf wrote: > On Mon, Nov 30, 2015 at 11:54:37AM +0800, Li Bin wrote: >> There is a potential race as following: >> >> CPU0 | CPU1 >> -|--- >> enabled_store() |

[PATCH] sched: Fix sd->*_idx limit range avoiding overflow

2013-04-02 Thread Libin
Commit 201c373e8e ("sched/debug: Limit sd->*_idx range on sysctl") was an incomplete bug fix. This patch fixs sd->*_idx limit range to [0 ~ CPU_LOAD_IDX_MAX - 1] avioding array overflow caused by setting sd->*_idx to CPU_LOAD_IDX_MAX on sysctl. Signed-off-by: Libin ---

[PATCH resend] sched: Fix sd->*_idx limit range avoiding overflow

2013-04-08 Thread libin
Commit 201c373e8e ("sched/debug: Limit sd->*_idx range on sysctl") was an incomplete bug fix. This patch fixs sd->*_idx limit range to [0 ~ CPU_LOAD_IDX_MAX - 1] avioding array overflow caused by setting sd->*_idx to CPU_LOAD_IDX_MAX on sysctl. Signed-off-by: Libin ---

[PATCH] workqueue: Comment correction in file header

2013-08-15 Thread Libin
No functional change. There are two worker pools for each cpu in current implementation(one for normal work items and the other for high priority ones). Signed-off-by: Libin --- kernel/workqueue.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/workqueue.c b

[PATCH] workqueue: Fix manage_workers() RETURNS description

2013-08-15 Thread Libin
No functional change. The comment of function manage_workers() RETURNS description is obvious wrong, same as the CONTEXT. Fix it. Signed-off-by: Libin --- kernel/workqueue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index

[PATCH] workqueue: Correct/Drop references to gcwq in Documentation

2013-08-15 Thread Libin
No functional changes. This patch fixes the post gcwq comments in Documentation/workqueue.txt. Signed-off-by: Libin --- Documentation/workqueue.txt | 60 ++--- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/Documentation/workqueue.txt b

Re: [PATCH] workqueue: Correct/Drop references to gcwq in Documentation

2013-08-19 Thread Libin
On 2013/8/16 22:47, Tejun Heo wrote: > On Fri, Aug 16, 2013 at 01:33:17PM +0800, Libin wrote: >> No functional changes. This patch fixes the post gcwq comments in >> Documentation/workqueue.txt. >> >> Signed-off-by: Libin > > Thanks a lot for doing this. Can y

[PATCH v2 1/3] workqueue: Comment correction in file header

2013-08-20 Thread Libin
No functional change. There are two worker pools for each cpu in current implementation(one for normal work items and the other for high priority ones). Signed-off-by: Libin --- kernel/workqueue.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/workqueue.c b

[PATCH v2 2/3] workqueue: Fix manage_workers() RETURNS description

2013-08-20 Thread Libin
No functional change. The comment of function manage_workers() RETURNS description is obvious wrong, same as the CONTEXT. Fix it. Signed-off-by: Libin --- kernel/workqueue.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index

[PATCH v2 3/3] workqueue: Correct/Drop references to gcwq in Documentation

2013-08-20 Thread Libin
No functional changes. This patch fixes the post gcwq comments in Documentation/workqueue.txt. Signed-off-by: Libin --- Documentation/workqueue.txt | 72 ++--- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/Documentation/workqueue.txt b

[PATCH v2 0/3] workqueue: Comment/Doc correction with no functional change

2013-08-20 Thread Libin
This patch set doesn't make any functional differences. Libin (3): workqueue: Comment correction in file header workqueue: Fix manage_workers() RETURNS description workqueue: Correct/Drop references to gcwq in Documentation Documentation/workqueue.txt | 72

[PATCH 08/14] namespace: Fix invalid wakeup in zap_pid_ns_processes

2013-08-29 Thread Libin
eak; schedule(); } __set_current_state(TASK_RUNNING); ... To solve this problem, using preempt_disable() to bound the operaion that setting the task state and the conditions(set by the wake thread) validation. Signed-off-by: Libin --- kernel/pid_namespace.c | 4 1 file changed, 4 inserti

[PATCH 09/14] rcutree: Fix invalid wakeup in rcu_wait

2013-08-29 Thread Libin
that and before __set_current_state(TASK_RUNNING), it triggers the invalid wakeup problem. To solve this problem, using preempt_disable() to bound the operaion that setting the task state and the conditions(set by the wake thread) validation. Signed-off-by: Libin --- kernel/rcutree.h | 4 1 file

[PATCH 02/14] audit: Fix invalid wakeup in kauditd_thread

2013-08-29 Thread Libin
(); ... } Signed-off-by: Libin --- kernel/audit.c | 4 1 file changed, 4 insertions(+) diff --git a/kernel/audit.c b/kernel/audit.c index 91e53d0..a7d1346 100644 --- a/kernel/audit.c +++ b/kernel/audit.c @@ -455,15 +455,19 @@ static int kauditd_thread(void *dummy

[PATCH 12/14] trace: Fix invalid wakeup in ring_buffer_consumer_thread

2013-08-29 Thread Libin
that and before __set_current_state(TASK_RUNNING), it triggers the invalid wakeup problem. To solve this problem, using preempt_disable() to bound the operaion that setting the task state and the conditions(set by the wake thread) validation. Signed-off-by: Libin --- kernel/trace

[PATCH 07/14] module: Fix invalid wakeup in wait_for_zero_refcount

2013-08-29 Thread Libin
preempt_disable(); } __set_current_state(TASK_RUNNING); preempt_enable(); ... Signed-off-by: Libin --- kernel/module.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/module.c b/kernel/module.c index 2069158..22064e9 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -816,14 +8

[PATCH 05/14] hrtimer: Fix invalid wakeup in do_nanosleep

2013-08-29 Thread Libin
that and before __set_current_state(TASK_RUNNING), it triggers the invalid wakeup problem. To solve this problem, using preempt_disable() to bound the operaion that setting the task state and the conditions(set by the wake thread) validation. Signed-off-by: Libin --- kernel/hrtimer.c | 7 ++- 1

[PATCH 04/14] exit: Fix invalid wakeup in do_wait

2013-08-29 Thread Libin
that and before __set_current_state(TASK_RUNNING), it triggers the invalid wakeup problem. To solve this problem, using preempt_disable() to bound the operaion that setting the task state and the conditions(set by the wake thread) validation. Signed-off-by: Libin --- kernel/exit.c | 7 +-- 1 file

[PATCH 01/14] kthread: Fix invalid wakeup in kthreadd

2013-08-29 Thread Libin
() ... for (;;) { preempt_disable(); set_current_state(TASK_INTERRUPTIBLE); if (list_empty(_create_list)) { preempt_enable(); schedule(); preempt_disable(); } ... Signed-off-by: Libin --- kernel/kthread.c | 7 ++- 1

[PATCH 11/14] trace: Fix invalid wakeup in wait_to_die

2013-08-29 Thread Libin
(); schedule(); preempt_disable(); set_current_state(TASK_INTERRUPTIBLE); } __set_current_state(TASK_RUNNING); preempt_enable(); Signed-off-by: Libin --- kernel/trace/ring_buffer_benchmark.c | 4 1 file changed, 4 insertions(+) diff --git a/kernel/trace

[PATCH 10/14] time: Fix invalid wakeup in alarmtimer_do_nsleep

2013-08-29 Thread Libin
that and before __set_current_state(TASK_RUNNING), it triggers the invalid wakeup problem. To solve this problem, using preempt_disable() to bound the operaion that setting the task state and the conditions(set by the wake thread) validation. Signed-off-by: Libin --- kernel/time/alarmtimer.c | 7

[PATCH 03/14] audit: Fix invalid wakeup in wait_for_auditd

2013-08-29 Thread Libin
preempt_disable(); } __set_current_state(TASK_RUNNING); preempt_enable(); ... Signed-off-by: Libin --- kernel/audit.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/audit.c b/kernel/audit.c index a7d1346..48d2f76 100644 --- a/kernel/audit.c +++ b/kernel/audit.c @@ -1060,14 +10

[PATCH 06/14] irq: Fix invalid wakeup in irq_wait_for_interrupt

2013-08-29 Thread Libin
set by the wake thread) validation. Signed-off-by: Libin --- kernel/irq/manage.c | 5 + 1 file changed, 5 insertions(+) diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 514bcfd..09cb02f 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -655,6 +655,7 @@ static irqretur

[PATCH 13/14] workqueue: Fix invalid wakeup in rescuer_thread

2013-08-29 Thread Libin
that and before __set_current_state(TASK_RUNNING), it triggers the invalid wakeup problem. To solve this problem, using preempt_disable() to bound the operaion that setting the task state and the conditions(set by the wake thread) validation. Signed-off-by: Libin --- kernel/workqueue.c | 92

[PATCH 00/14] Fix bug about invalid wake up problem

2013-08-29 Thread Libin
tate(TASK_INTERRUPTIBLE); preempt_enable(); schedule(); preempt_disable(); } preempt_enable(); ... -- Libin (14): kthread: Fix invalid wakeup in kthreadd audit: Fix invalid wakeup in kauditd_thread audit: Fix invalid wa

[PATCH 14/14] klist: Fix invalid wakeup in klist_remove

2013-08-29 Thread Libin
); if (waiter.woken) break; preempt_enable(); schedule(); preempt_disable(); } __set_current_state(TASK_RUNNING); preempt_enable(); ... Signed-off-by: Libin --- lib/klist.c | 4 1 file changed, 4 insertions(+) diff --git a/lib/klist.c b/lib/klist.c index

Re: [PATCH 00/14] Fix bug about invalid wake up problem

2013-08-29 Thread Libin
On 2013/8/29 21:57, Libin wrote: > 2)Test: > I have written a test module to trigger the problem by adding some > synchronization condition. I will post it in the form of an attachment soon. > > Test result as follows: > [103135.332683] wakeup_test: create two kernel

Re: [PATCH 00/14] Fix bug about invalid wake up problem

2013-08-29 Thread Libin
Hi all, I'm so sorry, please ignore this patch set! I have realized that there is no this problem in our kernel. Preempt_schedule() has set PREEMPT_ACTIVE before calling __schedule() and __schedule will check it if current state is not TASK_RUNNING, avoiding this preemption. Libin On 2013/8/29

[PATCH] char: Use vma_pages() to replace (vm_end - vm_start) >> PAGE_SHIFT

2013-05-12 Thread Libin
(*->vm_end - *->vm_start) >> PAGE_SHIFT operation is implemented as a inline funcion vma_pages() in linux/mm.h, so using it. Signed-off-by: Libin --- drivers/char/mspec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/mspec.c b/drivers/char/m

[PATCH 1/6] mm: use vma_pages() to replace (vm_end - vm_start) >> PAGE_SHIFT

2013-04-15 Thread Libin
(*->vm_end - *->vm_start) >> PAGE_SHIFT operation is implemented as a inline funcion vma_pages() in linux/mm.h, so using it. Signed-off-by: Libin --- mm/memory.c | 2 +- mm/mmap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/memory.c b/mm/memory.c i

[PATCH 4/6] char: use vma_pages() to replace (vm_end - vm_start) >> PAGE_SHIFT

2013-04-15 Thread Libin
(*->vm_end - *->vm_start) >> PAGE_SHIFT operation is implemented as a inline funcion vma_pages() in linux/mm.h, so using it. Signed-off-by: Libin --- drivers/char/mspec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/mspec.c b/drivers/char/m

[PATCH 5/6] drm: use vma_pages() to replace (vm_end - vm_start) >> PAGE_SHIFT

2013-04-15 Thread Libin
(*->vm_end - *->vm_start) >> PAGE_SHIFT operation is implemented as a inline funcion vma_pages() in linux/mm.h, so using it. Signed-off-by: Libin --- drivers/gpu/drm/ttm/ttm_bo_vm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm

  1   2   >