[PATCH] mm/hugetlb: suppress wrong warning info when alloc gigantic page

2021-02-19 Thread Chen Wandun
If hugetlb_cma is enabled, it will skip boot time allocation when allocating gigantic page, that doesn't means allocation failure, so suppress this warning info. Fixes: cf11e85fc08c ("mm: hugetlb: optionally allocate gigantic hugepages using cma") Signed-off-by: Chen Wandun --- mm

[PATCH] objtool: fix potential memory leak special_get_alts()

2020-07-02 Thread Chen Wandun
If get_alt_entry() return error, struct special_alt will leak. Fixes: 442f04c34a1a ("objtool: Add tool to perform compile-time stack metadata validation") Signed-off-by: Chen Wandun --- tools/objtool/special.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/too

[PATCH next v3 0/2] fix potential memleak in perf events parser

2020-06-14 Thread Chen Wandun
fix some memleaks in parse_events_term__sym_hw and parse_events_term__clone. ls/perf v1 ==> v2 1. split into two patches 2. add jump targets common exception handling 3. add Fixes tag v2 ==> v3 add more commit log. Chen Wandun (1): perf tools: fix potential memleak in perf events

[PATCH next v3 2/2] perf tools: fix potential memleak in perf events parser

2020-06-14 Thread Chen Wandun
quot; failed. Fixes: b6645a723595 ("perf parse: Ensure config and str in terms are unique") Signed-off-by: Chen Wandun --- tools/perf/util/parse-events.c | 47 ++ 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/tools/perf/util/parse-events.c b/

[PATCH next v3 1/2] perf tools: fix potential memleak in perf events parser

2020-06-14 Thread Chen Wandun
From: Cheng Jian Fix memory leak of in function parse_events_term__sym_hw() and parse_events_term__clone() when string duplication failed. Fixes: b6645a723595 ("perf parse: Ensure config and str in terms are unique") Signed-off-by: Cheng Jian Signed-off-by: Chen Wandun --- tools

Re: [PATCH v2 1/2] perf tools: Fix potential memory leaks in perf events parser

2020-06-13 Thread Chen Wandun
for your reply, I will update in v3 Best Regards,     Chen Wandun Regards, Markus

Re: [PATCH next] perf tools: fix potential memleak in perf events parser

2020-06-11 Thread Chen Wandun
在 2020/6/11 21:16, Arnaldo Carvalho de Melo 写道: Em Thu, Jun 11, 2020 at 09:42:34AM +0800, Chen Wandun escreveu: Fix potential memory leak in function parse_events_term__sym_hw() and parse_events_term__clone(). 1. Free memory when errors occur. 2. Function new_term may return error, so

[PATCH next v2 0/2] fix potential memleak in perf events parser

2020-06-11 Thread Chen Wandun
fix some memleaks for parse_events_term__sym_hw and parse_events_term__clone. v1 ==> v2 1. split into two patches 2. add jump targets common exception handling 3. add Fixes tag Chen Wandun (1): perf tools: fix potential memleak in perf events parser Cheng Jian (1): perf tools: fix potent

[PATCH next v2 1/2] perf tools: fix potential memleak in perf events parser

2020-06-11 Thread Chen Wandun
From: Cheng Jian Fix memory leak of in function parse_events_term__sym_hw() and parse_events_term__clone() when error occur. Fixes: b6645a723595 ("perf parse: Ensure config and str in terms are unique") Signed-off-by: Cheng Jian Signed-off-by: Chen Wandun --- tools/perf/util/pars

[PATCH next v2 2/2] perf tools: fix potential memleak in perf events parser

2020-06-11 Thread Chen Wandun
Fix potential memory leak. Function new_term may return error, so it is need to free memory when the return value is negative. Fixes: b6645a723595 ("perf parse: Ensure config and str in terms are unique") Signed-off-by: Chen Wandun --- tools/perf/util/parse-eve

[PATCH next] perf tools: fix potential memleak in perf events parser

2020-06-10 Thread Chen Wandun
Fix potential memory leak in function parse_events_term__sym_hw() and parse_events_term__clone(). 1. Free memory when errors occur. 2. Function new_term may return error, so it is need to free memory when the return value is negative. Signed-off-by: Chen Wandun --- tools/perf/util/parse

[PATCH] mm/page_alloc: fix gcc compile warning

2019-10-23 Thread Chen Wandun
From: Chenwandun mm/page_alloc.o: In function `page_alloc_init_late': mm/page_alloc.c:1956: undefined reference to `zone_pcp_update' mm/page_alloc.o:(.debug_addr+0x8350): undefined reference to `zone_pcp_update' make: *** [vmlinux] Error 1 zone_pcp_update is defined in CONFIG_MEMORY_HOTPLUG, so

[PATCH v2] net: aquantia: add an error handling in aq_nic_set_multicast_list

2019-10-18 Thread Chen Wandun
From: Chenwandun add an error handling in aq_nic_set_multicast_list, it may not work when hw_multicast_list_set error; and at the same time it will remove gcc Wunused-but-set-variable warning. Signed-off-by: Chenwandun --- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 2 ++ 1 file

[PATCH] net: aquantia: add an error handling in aq_nic_set_multicast_list

2019-10-16 Thread Chen Wandun
From: Chenwandun Signed-off-by: Chenwandun --- drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c index 2a18439..137c1de 100644 ---

[Question] Is there race between swapoff and swapout

2019-10-14 Thread Chen Wandun
I analysied the code about swapoff and swapout, and I suspected there may be a race. The kernel version is 4.14 stable. CPU0CPU1 swapoff swap out add_to_swap