[PATCH] cpuset: Move node_isset() outside of the rcu_read region

2020-09-16 Thread yanfei.xu
From: Yanfei Xu It's no need to keep node_isset still in rcu_read region, just move it outside of the rcu_read region. Signed-off-by: Yanfei Xu --- kernel/cgroup/cpuset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index

[PATCH v2] mm/page_alloc.c: __perform_reclaim should return 'unsigned long'

2020-09-15 Thread yanfei.xu
From: Yanfei Xu __perform_reclaim()'s single caller expects it to return 'unsigned long', hence change its return value and a local variable to 'unsigned long'. Signed-off-by: Yanfei Xu Suggested-by: Andrew Morton --- mm/page_alloc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)

[PATCH] mm/page_alloc.c: variable type of 'progress' should be 'unsigned long'

2020-09-15 Thread yanfei.xu
From: Yanfei Xu try_to_free_pages returns the number of pages reclaimed, and the type of returns is 'unsigned long'. So we should use a matched type for storing it. Signed-off-by: Yanfei Xu --- mm/page_alloc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH] mm/page_alloc.c: avoid inheritting current's flags when invoked in interrupt

2020-09-15 Thread yanfei.xu
From: Yanfei Xu alloc_mask shouldn't inherit the current task's flags when __alloc_pages_nodemask is invoked in interrupt. Signed-off-by: Yanfei Xu --- mm/page_alloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index

[PATCH] arm64/numa: Fix a typo in comment of arm64_numa_init

2020-09-01 Thread yanfei.xu
From: Yanfei Xu Fix a typo in comment of arm64_numa_init. 'encomapssing' should be 'encompassing'. Signed-off-by: Yanfei Xu --- arch/arm64/mm/numa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c index 73f8b49d485c..d402da26cdca

[PATCH] USB: core: limit access to rawdescriptors which were not allocated

2020-08-25 Thread yanfei.xu
From: Yanfei Xu When using systemcall to read the rawdescriptors, make sure we won't access to the rawdescriptors never allocated, which are number exceed the USB_MAXCONFIG. Reported-by: syzbot+256e56ddde8b8957e...@syzkaller.appspotmail.com Signed-off-by: Yanfei Xu ---

[PATCH] USB: integrate macro definitions into include/linux/usb.h

2020-08-25 Thread yanfei.xu
From: Yanfei Xu include/linux/usb.h also contains 'Hard limit' and 'Arbitrary limit' macro definitions in it, hence we can integrate these from config.c into include/linux/usb.h Signed-off-by: Yanfei Xu --- drivers/usb/core/config.c | 3 --- include/linux/usb.h | 3 +++ 2 files changed,

[PATCH v2] mm/memory: Fix typo in __do_fault() comment

2020-08-18 Thread yanfei.xu
From: Yanfei Xu It's "pte_alloc_one", not "pte_alloc_pne". Let's fix that. Signed-off-by: Yanfei Xu Reviewed-by: David Hildenbrand --- v2: modify the commit message mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory.c b/mm/memory.c index

[PATCH] mm/memory.c: Replace vmf->vma with variable vma

2020-08-18 Thread yanfei.xu
From: Yanfei Xu The code has declared a vma_struct named vma which is assigned a value of vmf->vma. Thus, use variable vma directly here. Signed-off-by: Yanfei Xu --- mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory.c b/mm/memory.c index

[PATCH] mm/memory.c: Correct the function name in comment

2020-08-18 Thread yanfei.xu
From: Yanfei Xu Correct the function name which is "pte_alloc_pne" to "pte_alloc_one" Signed-off-by: Yanfei Xu --- mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory.c b/mm/memory.c index c3a83f4ca851..9cc3d0dc816c 100644 --- a/mm/memory.c +++

[PATCH] mm/mempolicy: Remove the useless newline in policy_node()

2020-08-17 Thread yanfei.xu
From: Yanfei Xu Remove the useless newline among policy_node parameters, that makes code neater. Signed-off-by: Yanfei Xu --- mm/mempolicy.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/mempolicy.c b/mm/mempolicy.c index afaa09ff9f6c..a345ad50b86f 100644 ---

[PATCH] mempolicy.h: fix typo

2020-08-10 Thread yanfei.xu
From: Yanfei Xu Change "interlave" to "interleave". Signed-off-by: Yanfei Xu --- include/linux/mempolicy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index ea9c15b60a96..4dc41428b095 100644 ---

[PATCH] userfaultfd: avoid the duplicated release for userfaultfd_ctx

2020-07-14 Thread yanfei.xu
From: Yanfei Xu when get_unused_fd_flags gets failure, userfaultfd_ctx_cachep will be freed by userfaultfd_fops's release function which is the userfaultfd_release. So we could return directly after fput(). userfaultfd_release()->userfaultfd_ctx_put(ctx) Fixes: d08ac70b1e0d (Wire UFFD up to