[PATCH] timer: use raw_spin_unlock_irqrestore and raw_spin_lock_irqsave instead of raw_spin_{lock|unlock}

2020-08-19 Thread Wang Long
= new_base; raw_spin_lock(>lock); (4) raw_spin_unlock_irqrestore(>lock, flags); (5) The flags save from CPU0, and restore to CPU1. Is this wrong? we encountered a kernel

[PATCH] idr: Fix a typo in idr_alloc_cyclic()'s comment

2020-07-28 Thread Wang Long
This patch fix a typo in comment for function idr_alloc_cyclic(). Signed-off-by: Wang Long --- lib/idr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/idr.c b/lib/idr.c index c2cf2c5..47d203f 100644 --- a/lib/idr.c +++ b/lib/idr.c @@ -100,7 +100,7 @@ int idr_alloc

[PATCH] Documentation: driver-api: update kernel connector

2020-07-20 Thread Wang Long
This patch changes: 1) Fix typo in kernel connector documentation. s/cn_netlink_send_multi/cn_netlink_send_mult/ 2) update definition of struct cn_msg Signed-off-by: Wang Long --- Documentation/driver-api/connector.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[PATCH v1] xarray: update document for error space returned by xarray normal API

2020-07-19 Thread Wang Long
In the current xarray code, the negative value -1 and -4095 represented as an error. xa_is_err(xa_mk_internal(-4095)) and xa_is_err(xa_mk_internal(-1)) are all return true. This patch update the document. Signed-off-by: Wang Long --- include/linux/xarray.h | 2 +- 1 file changed, 1 insertion

[PATCH] xarray: update document for error space returned by xarray normal API

2020-07-19 Thread Wang Long
In the current xarray code, the negative value -1 and -4095 represented as an error. xa_is_error(xa_mk_internal(-4095)) and xa_is_error(xa_mk_internal(-1)) are all return true. This patch update the document. Signed-off-by: Wang Long --- include/linux/xarray.h | 2 +- 1 file changed, 1

[PATCH] xarray: update document for error space returned by xarray normal API

2020-07-19 Thread Wang Long
In the current xarray code, the negative value -1 and -4095 represented as an error. xa_is_error(xa_mk_internal(-4095)) and xa_is_error(xa_mk_internal(-1)) are all return true. This patch update the document. Signed-off-by: Wang Long --- include/linux/xarray.h | 2 +- 1 file changed, 1

[PATCH] radix-tree: optimization for radix_tree_init_maxnodes

2018-09-09 Thread Wang Long
if i == 0, height_to_maxnodes[i] = 0, if i >= 1, height_to_maxnodes[i] = height_to_maxnodes[i-1] + __maxindex(i-1) + 1. so delete height_to_maxindex and optimize the calculation of height_to_maxnodes array. Signed-off-by: Wang Long --- lib/radix-tree.c |

[PATCH] radix-tree: optimization for radix_tree_init_maxnodes

2018-09-09 Thread Wang Long
if i == 0, height_to_maxnodes[i] = 0, if i >= 1, height_to_maxnodes[i] = height_to_maxnodes[i-1] + __maxindex(i-1) + 1. so delete height_to_maxindex and optimize the calculation of height_to_maxnodes array. Signed-off-by: Wang Long --- lib/radix-tree.c |

[PATCH v2] memcg: writeback: use memcg->cgwb_list directly

2018-04-22 Thread Wang Long
mem_cgroup_cgwb_list is a very simple wrapper and it will never be used outside of code under CONFIG_CGROUP_WRITEBACK. so use memcg->cgwb_list directly. Reviewed-by: Jan Kara <j...@suse.cz> Signed-off-by: Wang Long <wanglon...@meituan.com> --- include/linux/memcontrol.h | 1 - m

[PATCH v2] memcg: writeback: use memcg->cgwb_list directly

2018-04-22 Thread Wang Long
mem_cgroup_cgwb_list is a very simple wrapper and it will never be used outside of code under CONFIG_CGROUP_WRITEBACK. so use memcg->cgwb_list directly. Reviewed-by: Jan Kara Signed-off-by: Wang Long --- include/linux/memcontrol.h | 1 - mm/backing-dev.c | 4 ++-- mm/memcontro

Re: [PATCH] memcg: writeback: use memcg->cgwb_list directly

2018-04-22 Thread Wang Long
On 22/4/2018 8:43 PM, Michal Hocko wrote: On Sun 22-04-18 01:50:57, Jan Kara wrote: On Sat 21-04-18 21:29:41, Wang Long wrote: Signed-off-by: Wang Long <wanglon...@meituan.com> Yeah, looks good. I guess it was originally intended to avoid compilation errors if CONFIG_CGROUP_WRI

Re: [PATCH] memcg: writeback: use memcg->cgwb_list directly

2018-04-22 Thread Wang Long
On 22/4/2018 8:43 PM, Michal Hocko wrote: On Sun 22-04-18 01:50:57, Jan Kara wrote: On Sat 21-04-18 21:29:41, Wang Long wrote: Signed-off-by: Wang Long Yeah, looks good. I guess it was originally intended to avoid compilation errors if CONFIG_CGROUP_WRITEBACK was disabled. But it doesn't

[PATCH] memcg: writeback: use memcg->cgwb_list directly

2018-04-21 Thread Wang Long
Signed-off-by: Wang Long <wanglon...@meituan.com> --- include/linux/memcontrol.h | 1 - mm/backing-dev.c | 4 ++-- mm/memcontrol.c| 5 - 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index d

[PATCH] memcg: writeback: use memcg->cgwb_list directly

2018-04-21 Thread Wang Long
Signed-off-by: Wang Long --- include/linux/memcontrol.h | 1 - mm/backing-dev.c | 4 ++-- mm/memcontrol.c| 5 - 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index d99b71b..c0056e0 100644

Re: [PATCH] writeback: safer lock nesting

2018-04-10 Thread Wang Long
Hi, [This is an automated email] This commit has been processed by the -stable helper bot and determined to be a high probability candidate for -stable trees. (score: 44.5575) The bot has tested the following trees: v4.16.1, v4.15.16, v4.14.33, v4.9.93, v4.4.127. v4.16.1: Build OK!

Re: [PATCH] writeback: safer lock nesting

2018-04-10 Thread Wang Long
Hi, [This is an automated email] This commit has been processed by the -stable helper bot and determined to be a high probability candidate for -stable trees. (score: 44.5575) The bot has tested the following trees: v4.16.1, v4.15.16, v4.14.33, v4.9.93, v4.4.127. v4.16.1: Build OK!

Re: [PATCH v3] writeback: safer lock nesting

2018-04-10 Thread Wang Long
k is not currently possible, it's debatable if there's any reason to modify the kernel. I suggest we should to prevent future surprises. This deadlock occurs three times in our environment, this deadlock occurs three times in our environment. It is better to cc stable kernel and backport it. A

Re: [PATCH v3] writeback: safer lock nesting

2018-04-10 Thread Wang Long
k is not currently possible, it's debatable if there's any reason to modify the kernel. I suggest we should to prevent future surprises. This deadlock occurs three times in our environment, this deadlock occurs three times in our environment. It is better to cc stable kernel and backport it. A

Re: [RFC] Is it correctly that the usage for spin_{lock|unlock}_irq in clear_page_dirty_for_io

2018-04-04 Thread Wang Long
On 4/4/2018 7:12 AM, Greg Thelen wrote: On Tue, Apr 3, 2018 at 5:03 AM Michal Hocko <mho...@kernel.org> wrote: On Mon 02-04-18 19:50:50, Wang Long wrote: Hi, Johannes Weiner and Tejun Heo I use linux-4.4.y to test the new cgroup controller io and the current stable kernel linux-4.4

Re: [RFC] Is it correctly that the usage for spin_{lock|unlock}_irq in clear_page_dirty_for_io

2018-04-04 Thread Wang Long
On 4/4/2018 7:12 AM, Greg Thelen wrote: On Tue, Apr 3, 2018 at 5:03 AM Michal Hocko wrote: On Mon 02-04-18 19:50:50, Wang Long wrote: Hi, Johannes Weiner and Tejun Heo I use linux-4.4.y to test the new cgroup controller io and the current stable kernel linux-4.4.y has the follow logic

[RFC] Is it correctly that the usage for spin_{lock|unlock}_irq in clear_page_dirty_for_io

2018-04-02 Thread Wang Long
Hi,  Johannes Weiner and Tejun Heo I use linux-4.4.y to test the new cgroup controller io and the current stable kernel linux-4.4.y has the follow logic int clear_page_dirty_for_io(struct page *page){ ... ...     memcg = mem_cgroup_begin_page_stat(page); --(a)  

[RFC] Is it correctly that the usage for spin_{lock|unlock}_irq in clear_page_dirty_for_io

2018-04-02 Thread Wang Long
Hi,  Johannes Weiner and Tejun Heo I use linux-4.4.y to test the new cgroup controller io and the current stable kernel linux-4.4.y has the follow logic int clear_page_dirty_for_io(struct page *page){ ... ...     memcg = mem_cgroup_begin_page_stat(page); --(a)  

[PATCH] jbd2: remove the conditional test

2018-02-05 Thread Wang Long
kmem_cache_destroy already handles null pointers, so we can remove the conditional test entirely. This patch also set NULL after the kmem_cache_destroy in function jbd2_journal_destroy_handle_cache. Signed-off-by: Wang Long <wanglon...@meituan.com> --- fs/jbd2/journal.c

[PATCH] jbd2: remove the conditional test

2018-02-05 Thread Wang Long
kmem_cache_destroy already handles null pointers, so we can remove the conditional test entirely. This patch also set NULL after the kmem_cache_destroy in function jbd2_journal_destroy_handle_cache. Signed-off-by: Wang Long --- fs/jbd2/journal.c | 18 +++--- fs/jbd2/revoke.c

Re: [PATCH] jbd2: set to NULL after kmem_cache_destroy

2018-02-05 Thread Wang Long
On 6/2/2018 1:00 AM, Darrick J. Wong wrote: On Mon, Feb 05, 2018 at 09:39:17PM +0800, Wang Long wrote: Signed-off-by: Wang Long <wanglon...@meituan.com> --- fs/jbd2/journal.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fs/jbd2/journal.c b/fs/jbd2/jou

Re: [PATCH] jbd2: set to NULL after kmem_cache_destroy

2018-02-05 Thread Wang Long
On 6/2/2018 1:00 AM, Darrick J. Wong wrote: On Mon, Feb 05, 2018 at 09:39:17PM +0800, Wang Long wrote: Signed-off-by: Wang Long --- fs/jbd2/journal.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 93016bb..38dc24c

[PATCH] jbd2: set to NULL after kmem_cache_destroy

2018-02-05 Thread Wang Long
Signed-off-by: Wang Long <wanglon...@meituan.com> --- fs/jbd2/journal.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 93016bb..38dc24c 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -2649,11 +2649,14 @@

[PATCH] jbd2: set to NULL after kmem_cache_destroy

2018-02-05 Thread Wang Long
Signed-off-by: Wang Long --- fs/jbd2/journal.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 93016bb..38dc24c 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -2649,11 +2649,14 @@ static int __init

[PATCH] jbd2: remove duplicate `\n` in jbd_debug

2018-02-05 Thread Wang Long
: (jbd2_journal_commit_transaction, 1092): JBD2: commit phase 7 ``` Every jbd_debug call in kernel will append `\n` in its fmt argument, so remove duplicate `\n` Signed-off-by: Wang Long <wanglon...@meituan.com> --- fs/jbd2/journal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/jbd2/journal.

[PATCH] jbd2: remove duplicate `\n` in jbd_debug

2018-02-05 Thread Wang Long
: (jbd2_journal_commit_transaction, 1092): JBD2: commit phase 7 ``` Every jbd_debug call in kernel will append `\n` in its fmt argument, so remove duplicate `\n` Signed-off-by: Wang Long --- fs/jbd2/journal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index

[PATCH] writeback: update comment in inode_io_list_move_locked

2017-12-05 Thread Wang Long
The @head can be wb->b_dirty_time, so update the comment. Signed-off-by: Wang Long <wanglon...@meituan.com> --- fs/fs-writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 8d477cf..7cb1dd1 100644 --- a/fs/fs-writebac

[PATCH] writeback: update comment in inode_io_list_move_locked

2017-12-05 Thread Wang Long
The @head can be wb->b_dirty_time, so update the comment. Signed-off-by: Wang Long --- fs/fs-writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 8d477cf..7cb1dd1 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writebac

[PATCH] writeback: fix comment in __mark_inode_dirty

2017-12-04 Thread Wang Long
Signed-off-by: Wang Long <wanglon...@meituan.com> --- fs/fs-writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index cea4836..8d477cf 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -2209,7 +2209,7 @

[PATCH] writeback: fix comment in __mark_inode_dirty

2017-12-04 Thread Wang Long
Signed-off-by: Wang Long --- fs/fs-writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index cea4836..8d477cf 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -2209,7 +2209,7 @@ void __mark_inode_dirty(struct inode *inode

[PATCH] debug cgroup: use task_css_set instead of rcu_dereference

2017-11-20 Thread Wang Long
This macro `task_css_set` verifies that the caller is inside proper critical section if the kernel set CONFIG_PROVE_RCU=y. Signed-off-by: Wang Long <wanglon...@meituan.com> --- kernel/cgroup/debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/cgroup/deb

[PATCH] debug cgroup: use task_css_set instead of rcu_dereference

2017-11-20 Thread Wang Long
This macro `task_css_set` verifies that the caller is inside proper critical section if the kernel set CONFIG_PROVE_RCU=y. Signed-off-by: Wang Long --- kernel/cgroup/debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/cgroup/debug.c b/kernel/cgroup/debug.c

[PATCH v2] writeback: remove the unused function parameter

2017-11-04 Thread Wang Long
The parameter `struct bdi_writeback *wb` is not been used in the function body. so we just remove it. Signed-off-by: Wang Long <wanglon...@meituan.com> --- include/linux/backing-dev.h | 2 +- mm/page-writeback.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff

[PATCH v2] writeback: remove the unused function parameter

2017-11-04 Thread Wang Long
The parameter `struct bdi_writeback *wb` is not been used in the function body. so we just remove it. Signed-off-by: Wang Long --- include/linux/backing-dev.h | 2 +- mm/page-writeback.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/backing-dev.h

[PATCH] writeback: remove the unused function parameter

2017-11-04 Thread Wang Long
Signed-off-by: Wang Long <wanglon...@meituan.com> --- include/linux/backing-dev.h | 2 +- mm/page-writeback.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index 1662157..186a2e7 100644 --- a/i

[PATCH] writeback: remove the unused function parameter

2017-11-04 Thread Wang Long
Signed-off-by: Wang Long --- include/linux/backing-dev.h | 2 +- mm/page-writeback.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index 1662157..186a2e7 100644 --- a/include/linux/backing-dev.h +++ b

[PATCH] workqueue: Fix comment for unbound workqueue's attrbutes

2017-11-04 Thread Wang Long
Signed-off-by: Wang Long <wanglon...@meituan.com> --- kernel/workqueue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index a2dccfe..ea3c29f 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -5006,9 +5006,10

[PATCH] workqueue: Fix comment for unbound workqueue's attrbutes

2017-11-04 Thread Wang Long
Signed-off-by: Wang Long --- kernel/workqueue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index a2dccfe..ea3c29f 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -5006,9 +5006,10 @@ int workqueue_set_unbound_cpumask

[PATCH v2] kselftest: add kselftest-clean rule

2015-10-07 Thread Wang Long
d files. Signed-off-by: Wang Long --- Makefile | 4 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 1d341eb..3edd7b3 100644 --- a/Makefile +++ b/Makefile @@ -1075,6 +1075,9 @@ PHONY += kselftest kselftest: $(Q)$(MAKE) -C tools/testing/selftests run_test

[PATCH v2] kselftest: add kselftest-clean rule

2015-10-07 Thread Wang Long
d files. Signed-off-by: Wang Long <long.wangl...@huawei.com> --- Makefile | 4 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 1d341eb..3edd7b3 100644 --- a/Makefile +++ b/Makefile @@ -1075,6 +1075,9 @@ PHONY += kselftest kselftest: $(Q)$(MAKE) -C tools/t

[PATCH] kselftest: replace rm -f command with $(RM)

2015-09-29 Thread Wang Long
node/Implicit-Variables.html Signed-off-by: Wang Long --- tools/testing/selftests/breakpoints/Makefile | 2 +- tools/testing/selftests/efivarfs/Makefile | 2 +- tools/testing/selftests/futex/functional/Makefile | 2 +- tools/testing/selftests/ipc/Makefile

[PATCH] kselftest: replace rm -f command with $(RM)

2015-09-29 Thread Wang Long
node/Implicit-Variables.html Signed-off-by: Wang Long <long.wangl...@huawei.com> --- tools/testing/selftests/breakpoints/Makefile | 2 +- tools/testing/selftests/efivarfs/Makefile | 2 +- tools/testing/selftests/futex/functional/Makefile | 2 +- tools/testing/selftest

[PATCH] kselftest: replace $(RM) with rm -f command

2015-09-27 Thread Wang Long
Some test's Makefile using "$(RM)" while the other's using "rm -f". It is better to use one of them in all tests. "rm -f" is better, because it is less magic, and everyone konws what is does. Signed-off-by: Wang Long --- tools/testing/selftests/capabilities/

[PATCH] kselftest: replace $(RM) with rm -f command

2015-09-27 Thread Wang Long
Some test's Makefile using "$(RM)" while the other's using "rm -f". It is better to use one of them in all tests. "rm -f" is better, because it is less magic, and everyone konws what is does. Signed-off-by: Wang Long <long.wangl...@huawei.com> --- tools/tes

[PATCH] kselftest: using built-in rule when delete file

2015-09-23 Thread Wang Long
Use make's built-in rules to when delete a file or delete files. Signed-off-by: Wang Long --- tools/testing/selftests/breakpoints/Makefile | 2 +- tools/testing/selftests/efivarfs/Makefile | 2 +- tools/testing/selftests/futex/functional/Makefile | 2 +- tools

[PATCH] Documentation: Update kselftest.txt

2015-09-23 Thread Wang Long
Add document for how to install selftests. Signed-off-by: Wang Long --- Documentation/kselftest.txt | 16 1 file changed, 16 insertions(+) diff --git a/Documentation/kselftest.txt b/Documentation/kselftest.txt index a87d840..9bbbcdc 100644 --- a/Documentation/kselftest.txt

[PATCH] kselftest: add cleankselftest rule

2015-09-23 Thread Wang Long
d files. Signed-off-by: Wang Long --- Makefile | 4 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 84f4b31..c25d139 100644 --- a/Makefile +++ b/Makefile @@ -1075,6 +1075,9 @@ PHONY += kselftest kselftest: $(Q)$(MAKE) -C tools/testing/selftests run_tests +cleanks

[PATCH] kselftest: add cleankselftest rule

2015-09-23 Thread Wang Long
d files. Signed-off-by: Wang Long <long.wangl...@huawei.com> --- Makefile | 4 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 84f4b31..c25d139 100644 --- a/Makefile +++ b/Makefile @@ -1075,6 +1075,9 @@ PHONY += kselftest kselftest: $(Q)$(MAKE) -C tools/t

[PATCH] Documentation: Update kselftest.txt

2015-09-23 Thread Wang Long
Add document for how to install selftests. Signed-off-by: Wang Long <long.wangl...@huawei.com> --- Documentation/kselftest.txt | 16 1 file changed, 16 insertions(+) diff --git a/Documentation/kselftest.txt b/Documentation/kselftest.txt index a87d840..9bbbcdc

[PATCH] kselftest: using built-in rule when delete file

2015-09-23 Thread Wang Long
Use make's built-in rules to when delete a file or delete files. Signed-off-by: Wang Long <long.wangl...@huawei.com> --- tools/testing/selftests/breakpoints/Makefile | 2 +- tools/testing/selftests/efivarfs/Makefile | 2 +- tools/testing/selftests/futex/functional/Ma

[PATCH v2] kasan: Fix a type conversion error

2015-09-09 Thread Wang Long
The current KASAN code can not find the following out-of-bounds bugs: char *ptr; ptr = kmalloc(8, GFP_KERNEL); memset(ptr+7, 0, 2); the cause of the problem is the type conversion error in *memory_is_poisoned_n* function. So this patch fix that. Signed-off-by: Wang Long

[PATCH v2] kasan: Fix a type conversion error

2015-09-09 Thread Wang Long
The current KASAN code can not find the following out-of-bounds bugs: char *ptr; ptr = kmalloc(8, GFP_KERNEL); memset(ptr+7, 0, 2); the cause of the problem is the type conversion error in *memory_is_poisoned_n* function. So this patch fix that. Signed-off-by: Wang Long

[PATCH 1/2] lib: test_kasan: add some testcases

2015-09-08 Thread Wang Long
This patch add some out of bounds testcases to test_kasan module. Signed-off-by: Wang Long --- lib/test_kasan.c | 69 1 file changed, 69 insertions(+) diff --git a/lib/test_kasan.c b/lib/test_kasan.c index c1efb1b..c32f3b0 100644

[PATCH 2/2] kasan: Fix a type conversion error

2015-09-08 Thread Wang Long
The current KASAN code can find the following out-of-bounds bugs: char *ptr; ptr = kmalloc(8, GFP_KERNEL); memset(ptr+7, 0, 2); the cause of the problem is the type conversion error in *memory_is_poisoned_n* function. So this patch fix that. Signed-off-by: Wang Long

[PATCH 0/2] KASAN: fix a type conversion error and add test

2015-09-08 Thread Wang Long
Hi, This patchset fix a type conversion error for KASAN. patch 1: this patch add some out-of-bounds testcases, the current KASAN code can not find these bugs. patch 2: fix the type conversion error, with this patch, KASAN could find these out-of-bounds bugs. Wang Long (2): lib: test_kasan

[PATCH 2/2] kasan: Fix a type conversion error

2015-09-08 Thread Wang Long
The current KASAN code can find the following out-of-bounds bugs: char *ptr; ptr = kmalloc(8, GFP_KERNEL); memset(ptr+7, 0, 2); the cause of the problem is the type conversion error in *memory_is_poisoned_n* function. So this patch fix that. Signed-off-by: Wang Long

[PATCH 1/2] lib: test_kasan: add some testcases

2015-09-08 Thread Wang Long
This patch add some out of bounds testcases to test_kasan module. Signed-off-by: Wang Long <long.wangl...@huawei.com> --- lib/test_kasan.c | 69 1 file changed, 69 insertions(+) diff --git a/lib/test_kasan.c b/lib/test_kasan.c

[PATCH 0/2] KASAN: fix a type conversion error and add test

2015-09-08 Thread Wang Long
Hi, This patchset fix a type conversion error for KASAN. patch 1: this patch add some out-of-bounds testcases, the current KASAN code can not find these bugs. patch 2: fix the type conversion error, with this patch, KASAN could find these out-of-bounds bugs. Wang Long (2): lib: test_kasan

[RFC PATCH] test_kasan: make kmalloc_oob_krealloc_less more correctly

2015-08-21 Thread Wang Long
is more correctly. Signed-off-by: Wang Long --- lib/test_kasan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/test_kasan.c b/lib/test_kasan.c index 044c54d..c1efb1b 100644 --- a/lib/test_kasan.c +++ b/lib/test_kasan.c @@ -114,7 +114,7 @@ static noinline void __init

[PATCH] test_kasan: just fix a typo

2015-08-21 Thread Wang Long
This patch just fix a typo in test_kasan. Signed-off-by: Wang Long --- lib/test_kasan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/test_kasan.c b/lib/test_kasan.c index 098c08e..044c54d 100644 --- a/lib/test_kasan.c +++ b/lib/test_kasan.c @@ -65,7 +65,7

[PATCH] test_kasan: just fix a typo

2015-08-21 Thread Wang Long
This patch just fix a typo in test_kasan. Signed-off-by: Wang Long long.wangl...@huawei.com --- lib/test_kasan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/test_kasan.c b/lib/test_kasan.c index 098c08e..044c54d 100644 --- a/lib/test_kasan.c +++ b/lib/test_kasan.c

[RFC PATCH] test_kasan: make kmalloc_oob_krealloc_less more correctly

2015-08-21 Thread Wang Long
is more correctly. Signed-off-by: Wang Long long.wangl...@huawei.com --- lib/test_kasan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/test_kasan.c b/lib/test_kasan.c index 044c54d..c1efb1b 100644 --- a/lib/test_kasan.c +++ b/lib/test_kasan.c @@ -114,7 +114,7 @@ static

[PATCH] arm64: mm: add __init section marker to free_initrd_mem

2015-07-26 Thread Wang Long
It is not needed after booting, this patch moves the free_initrd_mem() function to the __init section. This patch also make keep_initrd __initdata, to reduce kernel size. Signed-off-by: Wang Long --- arch/arm64/mm/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH] arm: mm: add __init section marker to free_initrd_mem

2015-07-26 Thread Wang Long
It is not needed after booting, this patch moves the free_initrd_mem() function to the __init section. This patch also make keep_initrd __initdata, to reduce kernel size. Signed-off-by: Wang Long --- arch/arm/mm/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v2] drivers/of/fdt.c: replace pr_warning by pr_warn

2015-07-26 Thread Wang Long
uot;End of tree marker overwritten: %08x\n", So,we should convert pr_warning to pr_warn. Signed-off-by: Wang Long --- drivers/of/fdt.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 0749656..e1f61b8 100644 --- a/dr

[PATCH] arm: mm: add __init section marker to free_initrd_mem

2015-07-26 Thread Wang Long
It is not needed after booting, this patch moves the free_initrd_mem() function to the __init section. This patch also make keep_initrd __initdata, to reduce kernel size. Signed-off-by: Wang Long long.wangl...@huawei.com --- arch/arm/mm/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH v2] drivers/of/fdt.c: replace pr_warning by pr_warn

2015-07-26 Thread Wang Long
marker overwritten: %08x\n, So,we should convert pr_warning to pr_warn. Signed-off-by: Wang Long long.wangl...@huawei.com --- drivers/of/fdt.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 0749656..e1f61b8 100644 --- a/drivers

[PATCH] arm64: mm: add __init section marker to free_initrd_mem

2015-07-26 Thread Wang Long
It is not needed after booting, this patch moves the free_initrd_mem() function to the __init section. This patch also make keep_initrd __initdata, to reduce kernel size. Signed-off-by: Wang Long long.wangl...@huawei.com --- arch/arm64/mm/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[tip:irq/core] drivers/irqchip: Replace pr_warning by pr_warn

2015-07-22 Thread tip-bot for Wang Long
Commit-ID: faca10b9e63e880c81388fbbedf7ede6dcd77c70 Gitweb: http://git.kernel.org/tip/faca10b9e63e880c81388fbbedf7ede6dcd77c70 Author: Wang Long AuthorDate: Tue, 21 Jul 2015 08:11:01 + Committer: Thomas Gleixner CommitDate: Wed, 22 Jul 2015 18:37:42 +0200 drivers/irqchip: Replace

[tip:irq/core] drivers/irqchip: Replace pr_warning by pr_warn

2015-07-22 Thread tip-bot for Wang Long
Commit-ID: faca10b9e63e880c81388fbbedf7ede6dcd77c70 Gitweb: http://git.kernel.org/tip/faca10b9e63e880c81388fbbedf7ede6dcd77c70 Author: Wang Long long.wangl...@huawei.com AuthorDate: Tue, 21 Jul 2015 08:11:01 + Committer: Thomas Gleixner t...@linutronix.de CommitDate: Wed, 22 Jul 2015

[PATCH] drivers/irqchip: replace pr_warning by pr_warn

2015-07-21 Thread Wang Long
Update the last pr_warning callsite in drivers/irqchip. Signed-off-by: Wang Long --- drivers/irqchip/exynos-combiner.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/exynos-combiner.c b/drivers/irqchip/exynos-combiner.c index 5c82e3b..80104f9 100644

[PATCH] drivers/of/fdt.c: replace pr_warning by pr_warn

2015-07-21 Thread Wang Long
Update the last pr_warning callsite in drivers/of. Signed-off-by: Wang Long --- drivers/of/fdt.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 0749656..e1f61b8 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c

[PATCH] drivers/of/fdt.c: replace pr_warning by pr_warn

2015-07-21 Thread Wang Long
Update the last pr_warning callsite in drivers/of. Signed-off-by: Wang Long long.wangl...@huawei.com --- drivers/of/fdt.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 0749656..e1f61b8 100644 --- a/drivers/of/fdt.c +++ b

[PATCH] drivers/irqchip: replace pr_warning by pr_warn

2015-07-21 Thread Wang Long
Update the last pr_warning callsite in drivers/irqchip. Signed-off-by: Wang Long long.wangl...@huawei.com --- drivers/irqchip/exynos-combiner.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/exynos-combiner.c b/drivers/irqchip/exynos-combiner.c index

[PATCH] Documentation: Update filesystems/debugfs.txt

2015-07-16 Thread Wang Long
This patch update the Documentation/filesystems/debugfs.txt file. The main work is to add the description of the following functions: debugfs_create_atomic_t debugfs_create_u32_array debugfs_create_devm_seqfile debugfs_create_file_size Signed-off-by: Wang Long --- Documentation

[PATCH] Documentation: Update filesystems/debugfs.txt

2015-07-16 Thread Wang Long
This patch update the Documentation/filesystems/debugfs.txt file. The main work is to add the description of the following functions: debugfs_create_atomic_t debugfs_create_u32_array debugfs_create_devm_seqfile debugfs_create_file_size Signed-off-by: Wang Long long.wangl

[PATCH] kprobes: Use debugfs_remove_recursive instead debugfs_remove

2015-07-15 Thread Wang Long
-by: Wang Long --- kernel/kprobes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/kprobes.c b/kernel/kprobes.c index c90e417..8cd82a5 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -2459,7 +2459,7 @@ static int __init debugfs_kprobe_init(void) return 0

[PATCH] kprobes: Use debugfs_remove_recursive instead debugfs_remove

2015-07-15 Thread Wang Long
-by: Wang Long long.wangl...@huawei.com --- kernel/kprobes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/kprobes.c b/kernel/kprobes.c index c90e417..8cd82a5 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -2459,7 +2459,7 @@ static int __init debugfs_kprobe_init

[PATCH v2 2/2] apei/erst-dbg: Define pr_fmt macro to avoid the duplication of ERST_DBG_PFX

2015-06-16 Thread Wang Long
Define pr_fmt macro with {ERST DBG: } prefix, then remove all use of ERST_DBG_PFX in the pr_* functions. Signed-off-by: Wang Long --- drivers/acpi/apei/erst-dbg.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/apei/erst-dbg.c b/drivers/acpi/apei

[PATCH v2 1/2] apei/*.c: use pr_warn instead of pr_warning

2015-06-16 Thread Wang Long
This patch can avoid the following WARNING when run checkpatch.pl: WARNING: Prefer pr_warn(... to pr_warning(... #21: FILE: drivers/acpi/apei/erst-dbg.c:134: + pr_warning("Record (ID: 0x%llx) length is too long: %zd\n", Signed-off-by: Wang Long --

[PATCH v2 1/2] apei/*.c: use pr_warn instead of pr_warning

2015-06-16 Thread Wang Long
This patch can avoid the following WARNING when run checkpatch.pl: WARNING: Prefer pr_warn(... to pr_warning(... #21: FILE: drivers/acpi/apei/erst-dbg.c:134: + pr_warning(Record (ID: 0x%llx) length is too long: %zd\n, Signed-off-by: Wang Long long.wangl

[PATCH v2 2/2] apei/erst-dbg: Define pr_fmt macro to avoid the duplication of ERST_DBG_PFX

2015-06-16 Thread Wang Long
Define pr_fmt macro with {ERST DBG: } prefix, then remove all use of ERST_DBG_PFX in the pr_* functions. Signed-off-by: Wang Long long.wangl...@huawei.com --- drivers/acpi/apei/erst-dbg.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/apei/erst-dbg.c

[PATCH 1/2] apei/*.c: use pr_warn instead of pr_warning

2015-06-15 Thread Wang Long
This patch can avoid the following WARNING when run checkpatch.pl: WARNING: Prefer pr_warn(... to pr_warning(... #21: FILE: drivers/acpi/apei/erst-dbg.c:134: + pr_warning("Record (ID: 0x%llx) length is too long: %zd\n", Signed-off-by: Wang Long --

[PATCH 2/2] apei/erst-dbg: Define pr_fmt macro to avoid the duplication of ERST_DBG_PFX

2015-06-15 Thread Wang Long
Define pr_fmt macro with {ERST DBG: } prefix, then remove all use of ERST_DBG_PFXin the pr_* functions. Signed-off-by: Wang Long --- drivers/acpi/apei/erst-dbg.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/acpi/apei/erst-dbg.c b/drivers/acpi/apei/erst

[PATCH 1/2] apei/*.c: use pr_warn instead of pr_warning

2015-06-15 Thread Wang Long
This patch can avoid the following WARNING when run checkpatch.pl: WARNING: Prefer pr_warn(... to pr_warning(... #21: FILE: drivers/acpi/apei/erst-dbg.c:134: + pr_warning(Record (ID: 0x%llx) length is too long: %zd\n, Signed-off-by: Wang Long long.wangl

[PATCH 2/2] apei/erst-dbg: Define pr_fmt macro to avoid the duplication of ERST_DBG_PFX

2015-06-15 Thread Wang Long
Define pr_fmt macro with {ERST DBG: } prefix, then remove all use of ERST_DBG_PFXin the pr_* functions. Signed-off-by: Wang Long long.wangl...@huawei.com --- drivers/acpi/apei/erst-dbg.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/acpi/apei/erst-dbg.c b

[PATCH] ring-buffer-benchmark: Fix the wrong sched_priority of producer

2015-06-10 Thread Wang Long
The producer should be used producer_fifo as its sched_priority, so correct it. Signed-off-by: Wang Long --- kernel/trace/ring_buffer_benchmark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/ring_buffer_benchmark.c b/kernel/trace/ring_buffer_benchmark.c

[PATCH] ring-buffer-benchmark: Fix the wrong type

2015-06-10 Thread Wang Long
The macro 'module_param' shows that the type of the variable disable_reader and write_iteration is unsigned integer. so, we change their type form int to unsigned int. Signed-off-by: Wang Long --- kernel/trace/ring_buffer_benchmark.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH] ring-buffer-benchmark: Fix the wrong param in module_param

2015-06-10 Thread Wang Long
4294967295 With this patch: # cat /sys/module/ring_buffer_benchmark/parameters/consumer_fifo -1 Signed-off-by: Wang Long --- kernel/trace/ring_buffer_benchmark.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/trace

[PATCH] ring-buffer-benchmark: Fix the wrong sched_priority of producer

2015-06-10 Thread Wang Long
The producer should be used producer_fifo as its sched_priority, so correct it. Signed-off-by: Wang Long long.wangl...@huawei.com --- kernel/trace/ring_buffer_benchmark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/ring_buffer_benchmark.c b/kernel/trace

[PATCH] ring-buffer-benchmark: Fix the wrong type

2015-06-10 Thread Wang Long
The macro 'module_param' shows that the type of the variable disable_reader and write_iteration is unsigned integer. so, we change their type form int to unsigned int. Signed-off-by: Wang Long long.wangl...@huawei.com --- kernel/trace/ring_buffer_benchmark.c | 4 ++-- 1 file changed, 2

[PATCH] ring-buffer-benchmark: Fix the wrong param in module_param

2015-06-10 Thread Wang Long
4294967295 With this patch: # cat /sys/module/ring_buffer_benchmark/parameters/consumer_fifo -1 Signed-off-by: Wang Long long.wangl...@huawei.com --- kernel/trace/ring_buffer_benchmark.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel

[PATCH] pstore/ram: delete the redundant persistent_ram_zap call

2015-06-09 Thread Wang Long
In ramoops_init_prz function, we have already call persistent_ram_zap in persistent_ram_new, so just delete it. Signed-off-by: Wang Long --- fs/pstore/ram.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index 44a549b..fc8db9d 100644 --- a/fs/pstore/ram.c

[PATCH] pstore/ram: delete the redundant persistent_ram_zap call

2015-06-09 Thread Wang Long
In ramoops_init_prz function, we have already call persistent_ram_zap in persistent_ram_new, so just delete it. Signed-off-by: Wang Long long.wangl...@huawei.com --- fs/pstore/ram.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c index 44a549b..fc8db9d

[PATCH v2] netevent: remove automatic variable in register_netevent_notifier()

2015-05-28 Thread Wang Long
Remove automatic variable 'err' in register_netevent_notifier() and return the result of atomic_notifier_chain_register() directly. Signed-off-by: Wang Long --- net/core/netevent.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/net/core/netevent.c b/net/core/netevent.c

[PATCH] netevent: remove automatic variable in register_netevent_notifier()

2015-05-28 Thread Wang Long
Remove automatic variable 'err' in register_netevent_notifier() and return the return value of atomic_notifier_chain_register() directly. Signed-off-by: Wang Long --- net/core/netevent.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/net/core/netevent.c b/net/core

  1   2   3   4   >