Re: [PATCH-next 5/5] mm/vmalloc: remove an empty line

2021-04-02 Thread Souptick Joarder
On Sat, Apr 3, 2021 at 1:53 AM Uladzislau Rezki (Sony) wrote: > > Signed-off-by: Uladzislau Rezki (Sony) How about merging it with patch [4/5] ? > --- > mm/vmalloc.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/mm/vmalloc.c b/mm/vmalloc.c > index 093c7e034ca2..1e643280cbcf 100644 >

Re: [PATCH] perf/core: Mark perf_pmu_snapshot_aux() as static

2021-04-02 Thread Souptick Joarder
On Sat, Jan 9, 2021 at 7:47 AM Souptick Joarder wrote: > > Kernel test robot throws below warning -> > > kernel/events/core.c:6535:6: warning: no previous prototype for > 'perf_pmu_snapshot_aux' [-Wmissing-prototypes] > 6535 | long perf_pmu_snapshot_aux(s

[PATCH] drm/amdgpu: Mark mmhub_v1_7_setup_vm_pt_regs() as static

2021-03-12 Thread Souptick Joarder
Kernel test robot throws below warning -> drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c:56:6: warning: no previous prototype for 'mmhub_v1_7_setup_vm_pt_regs' [-Wmissing-prototypes] Mark mmhub_v1_7_setup_vm_pt_regs() as static. Reported-by: kernel test robot Signed-off-by: Souptick Joar

[PATCH] drm/amdgpu/display: initialize the variable 'i'

2021-02-22 Thread Souptick Joarder
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9714:7: note: initialize the variable 'i' to silence this warning int i; ^ = 0 1 warning generated. Initialize the variable 'i'. Reported-by: kernel test robot Signed-off-by: Souptick Joarder

Re: [PATCH] mm/hugetlb: Fix some comment typos

2021-01-28 Thread Souptick Joarder
On Thu, Jan 28, 2021 at 4:50 PM Miaohe Lin wrote: > > Fix typos sasitfy to satisfy, reservtion to reservation, hugegpage to > hugepage and uniprocesor to uniprocessor in comments. > > Signed-off-by: Miaohe Lin Reviewed-by: Souptick Joarder > --- > include/linux/h

Re: [PATCH] hugetlbfs: remove meaningless variable avoid_reserve

2021-01-16 Thread Souptick Joarder
t; hugepage yet. > > Signed-off-by: Miaohe Lin Acked-by: Souptick Joarder > --- > fs/hugetlbfs/inode.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c > index 88751e35e69d..23ad6ed8b75f 100644 > --- a

Re: [PATCH] hugetlbfs: correct obsolete function name hugetlbfs_read_iter()

2021-01-16 Thread Souptick Joarder
On Sat, Jan 16, 2021 at 3:03 PM Miaohe Lin wrote: > > The func do_generic_mapping_read() is killed by commit 36e789144267 ("kill > do_generic_mapping_read"). So replace it with do_generic_mapping_read to > keep comment uptodate. s/func/function replace it with generic_file_buffered_read() ? >

[PATCH] mips: cacheinfo: Remove unnecessary increment of level

2021-01-16 Thread Souptick Joarder
kernel test robot throws below warning -> arch/mips/kernel/cacheinfo.c:112:3: warning: Variable 'level' is modified but its new value is never used. [unreadVariable] Remove unnecessary increment of level at the end. Reported-by: kernel test robot Signed-off-by: Souptick Joarder --- arch/m

[PATCH] drm: amdgpu: pm: Mark vangogh_clk_dpm_is_enabled() as static

2021-01-12 Thread Souptick Joarder
ype for function 'vangogh_clk_dpm_is_enabled' [-Wmissing-prototypes] Mark vangogh_clk_dpm_is_enabled() as static. Reported-by: kernel test robot Signed-off-by: Souptick Joarder --- drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[PATCH] pinctrl: ti :iodelay: Fixed inconsistent indenting

2021-01-11 Thread Souptick Joarder
Kernel test robot throws below warning -> smatch warnings: drivers/pinctrl/ti/pinctrl-ti-iodelay.c:708 ti_iodelay_pinconf_group_dbg_show() warn: inconsistent indenting Fixed the inconsistent indenting. Reported-by: kernel test robot Signed-off-by: Souptick Joarder --- drivers/pinctrl

[PATCH] ASoC: soc-pcm: return correct -ERRNO in failure path

2021-01-08 Thread Souptick Joarder
Kernel test robot throws below error -> sound/soc/soc-pcm.c:2523 dpcm_run_update_startup() error: uninitialized symbol 'ret'. Initializing ret = 0 and returning correct -ERRNO in failure path. Reported-by: kernel test robot Signed-off-by: Souptick Joarder --- sound/soc/soc-pcm.c | 3 ++-

[PATCH] kvm: x86: Mark __kvm_vcpu_halt() as static

2021-01-08 Thread Souptick Joarder
alt() as static as it is used inside this file. Reported-by: kernel test robot Signed-off-by: Souptick Joarder --- arch/x86/kvm/x86.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 61499e1..c2fdf14 100644 --- a/arch/x86/kvm/x86.c

[PATCH] perf/core: Mark perf_pmu_snapshot_aux() as static

2021-01-08 Thread Souptick Joarder
tic as it is not used outside this file. Reported-by: kernel test robot Signed-off-by: Souptick Joarder --- kernel/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index 55d1879..a4ba6fd 100644 --- a/kernel/events/cor

Re: [PATCH v2] media: atomisp: Fixed error handling path

2020-12-28 Thread Souptick Joarder
On Wed, Dec 9, 2020 at 1:18 AM Souptick Joarder wrote: > > On Thu, Nov 19, 2020 at 1:06 AM Souptick Joarder wrote: > > > > On Wed, Nov 4, 2020 at 7:32 AM Souptick Joarder > > wrote: > > > > > > Inside alloc_user_pages() based on flag value either pin

Re: [PATCH] input: ariel-pwrbutton.c: Remove unused variable ariel_pwrbutton_id_table[]

2020-12-28 Thread Souptick Joarder
On Tue, Dec 22, 2020 at 1:34 AM Souptick Joarder wrote: > > Kernel test robot throws below warning -> > > >> drivers/input/misc/ariel-pwrbutton.c:152:35: warning: unused variable > >> 'ariel_pwrbutton_id_table' [-Wunused-const-variable] >

[PATCH v2] mm: add prototype for __add_to_page_cache_locked()

2020-12-22 Thread Souptick Joarder
() is referred to by BPF code. Adding a prototype will silence the warning. Signed-off-by: Souptick Joarder Cc: Alex Shi Cc: Andrew Morton Cc: Matthew Wilcox --- v2: Updated change logs and code comments as per review. s/offset/index. include/linux/mm.h | 7 +++ 1 file

Re: [PATCH] mm: add prototype for __add_to_page_cache_locked()

2020-12-22 Thread Souptick Joarder
On Wed, Dec 23, 2020 at 8:46 AM Souptick Joarder wrote: > > Otherwise it causes a gcc warning: > > ../mm/filemap.c:830:14: warning: no previous prototype for > `__add_to_page_cache_locked' [-Wmissing-prototypes] > > A previous attempt to make this function static led to comp

[PATCH] mm: add prototype for __add_to_page_cache_locked()

2020-12-22 Thread Souptick Joarder
() is referred to by BPF code. Adding a prototype will silence the warning. Signed-off-by: Souptick Joarder Cc: Alex Shi Cc: Andrew Morton Cc: Matthew Wilcox --- include/linux/mm.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/linux/mm.h b/include/linux/mm.h index 5299b90a

Re: [PATCH 1/1] mm: mmap: Remove unnecessary local variable

2020-12-22 Thread Souptick Joarder
and local variable > declaration. > > Signed-off-by: Adrian Huang Acked-by: Souptick Joarder > --- > mm/mmap.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/mm/mmap.c b/mm/mmap.c > index dc7206032387..482c0c0bbe06 100644 > --- a/mm/mmap.c &g

Re: [PATCH 1/1] mm:improve the performance during fork

2020-12-22 Thread Souptick Joarder
On Tue, Dec 22, 2020 at 5:49 PM wrote: > > From: jun qian > > In our project, Many business delays come from fork, so > we started looking for the reason why fork is time-consuming. > I used the ftrace with function_graph to trace the fork, found > that the vm_normal_page will be called tens of

[PATCH] mm: add prototype for __add_to_page_cache_locked()

2020-12-22 Thread Souptick Joarder
this function static leads to compile error for few architectures. Adding a prototype will silence the warning. Signed-off-by: Souptick Joarder Cc: Alex Shi Cc: Andrew Morton --- include/linux/mm.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/mm.h b/include/linux

[PATCH] input: ariel-pwrbutton.c: Remove unused variable ariel_pwrbutton_id_table[]

2020-12-21 Thread Souptick Joarder
^ 1 warning generated. Remove unused variable ariel_pwrbutton_id_table[] if no plan to use it further. Reported-by: kernel test robot Signed-off-by: Souptick Joarder --- drivers/input/misc/ariel-pwrbutton.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/input/misc/ariel-pwrbutt

Re: [PATCH] mm/filemap: Fix warning: no previous prototype

2020-12-21 Thread Souptick Joarder
On Fri, Dec 18, 2020 at 11:27 PM Andrew Morton wrote: > > On Fri, 18 Dec 2020 09:39:30 +0530 Souptick Joarder > wrote: > > > On Thu, Dec 17, 2020 at 7:53 AM Matthew Wilcox wrote: > > > > > > On Thu, Dec 17, 2020 at 10:03:11AM +0800, Xiangyang Yu wrote: >

Re: [PATCH] mm/filemap: Fix warning: no previous prototype

2020-12-17 Thread Souptick Joarder
On Thu, Dec 17, 2020 at 7:53 AM Matthew Wilcox wrote: > > On Thu, Dec 17, 2020 at 10:03:11AM +0800, Xiangyang Yu wrote: > > Fixed the warning when building with warnings enabled (W=1), > > This function is only used in filemap.c, so mark this function > > with 'static'. > > Good grief, no. Look

Re: [PATCH] mm/memory_hotplug: quieting offline operation

2020-12-12 Thread Souptick Joarder
On Fri, Dec 11, 2020 at 8:32 PM Laurent Dufour wrote: > > On PowerPC, when dymically removing memory from a system we can see in the > console a > lot of messages like this: > [ 186.575389] Offlined Pages 4096 Is it specific to PowerPC ? > > This message is displayed on each LMB (256MB)

[PATCH linux-next] drm/amd/display: Adding prototype for dccg21_update_dpp_dto()

2020-12-12 Thread Souptick Joarder
Kernel test robot throws below warning -> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_dccg.c:46:6: warning: no previous prototype for 'dccg21_update_dpp_dto' [-Wmissing-prototypes] Adding prototype for dccg21_update_dpp_dto(). Reported-by: kernel test robot Signed-off-by: Soupt

[PATCH] drm/amd/display: Fixed kernel test robot warning

2020-12-11 Thread Souptick Joarder
_dm/amdgpu_dm.c:5373:5: warning: no previous prototype for function 'amdgpu_dm_crtc_atomic_get_property' [-Wmissing-prototypes] As these functions are only used inside amdgpu_dm.c, these can be made static. Reported-by: kernel test robot Signed-off-by: Souptick Joarder --- drivers/gpu/drm/amd/disp

Re: [PATCH] mt76: Fixed kernel test robot warning

2020-12-10 Thread Souptick Joarder
On Thu, Dec 10, 2020 at 12:46 PM Kalle Valo wrote: > > Souptick Joarder writes: > > > Kernel test robot throws below warning -> > > > >drivers/net/wireless/mediatek/mt76/tx.c: In function > > 'mt76_txq_schedule': > >>> drivers/net/wireless

[PATCH] usb: cdns3: Fixed kernel test robot warning

2020-12-09 Thread Souptick Joarder
7 | static inline int xhci_cdns3_suspend_quirk(struct usb_hcd *hcd) | ^~~ This patch will silence it. Reported-by: kernel test robot Signed-off-by: Souptick Joarder --- drivers/usb/cdns3/host-export.h | 2 +- 1 file changed, 1 insertion(+)

[PATCH] mt76: Fixed kernel test robot warning

2020-12-09 Thread Souptick Joarder
t mt76_queue *q; | ^ This patch will silence this warning. Reported-by: kernel test robot Signed-off-by: Souptick Joarder --- drivers/net/wireless/mediatek/mt76/tx.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/tx.c b/drivers/net/wireless/med

[PATCH] riscv: Fixed kernel test robot warning

2020-12-08 Thread Souptick Joarder
-by: Souptick Joarder --- arch/riscv/kernel/asm-offsets.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/riscv/kernel/asm-offsets.c b/arch/riscv/kernel/asm-offsets.c index db20344..b79ffa3 100644 --- a/arch/riscv/kernel/asm-offsets.c +++ b/arch/riscv/kernel/asm-offsets.c @@ -11,6 +11,8

Re: [PATCH] riscv: Fixed kernel test robot warning

2020-12-08 Thread Souptick Joarder
On Wed, Dec 9, 2020 at 1:21 AM Andreas Schwab wrote: > > On Dez 09 2020, Souptick Joarder wrote: > > > Kernel test robot throws below warning - > > > >arch/riscv/kernel/asm-offsets.c:14:6: warning: no previous prototype > > for 'asm_offsets' [-Wmissin

Re: [PATCH v2] media: atomisp: Fixed error handling path

2020-12-08 Thread Souptick Joarder
On Thu, Nov 19, 2020 at 1:06 AM Souptick Joarder wrote: > > On Wed, Nov 4, 2020 at 7:32 AM Souptick Joarder wrote: > > > > Inside alloc_user_pages() based on flag value either pin_user_pages() > > or get_user_pages_fast() will be called. However, these API might fail. >

[PATCH linux-next] include/getcpu.h: Fixed kernel test robot warning

2020-11-28 Thread Souptick Joarder
0/kernel/vdso64/getcpu.c 7 > 8 int __s390_vdso_getcpu(unsigned *cpu, unsigned *node, struct > getcpu_cache *unused) It is fixed by adding a prototype. Reported-by: kernel test robot Signed-off-by: Souptick Joarder --- include/linux/getcpu.h | 1 + 1 file changed, 1 insertion(+)

[PATCH] nfsd: Fix kernel test robot warning

2020-11-28 Thread Souptick Joarder
ported-by: kernel test robot Signed-off-by: Souptick Joarder --- fs/nfsd/nfs3xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c index abb1608..47aeaee 100644 --- a/fs/nfsd/nfs3xdr.c +++ b/fs/nfsd/nfs3xdr.c @@ -290,7 +290,7 @@ v

Re: [PATCH] mm: fix some spelling mistakes in comments

2020-11-27 Thread Souptick Joarder
; uknown ==> unknown > > Signed-off-by: Haitao Shi Reviewed-by: Souptick Joarder > --- > mm/filemap.c | 2 +- > mm/huge_memory.c | 2 +- > mm/khugepaged.c | 2 +- > mm/memblock.c| 2 +- > mm/migrate.c | 2 +- > mm/page_ext.c| 2 +- &g

[PATCH] remoteproc/mediatek: Fix kernel test robot warning

2020-11-27 Thread Souptick Joarder
_of_match in the definition of mtk_scp_driver and we avoid this whole problem. Reported-by: kernel test robot Suggested-by: Bjorn Andersson Signed-off-by: Souptick Joarder --- drivers/remoteproc/mtk_scp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/remoteproc/mtk_scp.c b/d

Re: [PATCH] mm/page_owner: Record timestamp and pid

2020-11-27 Thread Souptick Joarder
On Sat, Nov 28, 2020 at 12:36 AM Vlastimil Babka wrote: > > On 11/27/20 7:57 PM, Georgi Djakov wrote: > > Hi Vlastimil, > > > > Thanks for the comment! > > > > On 11/27/20 19:52, Vlastimil Babka wrote: > >> On 11/12/20 8:14 PM, Andrew Morton wrote: > >>> On Thu, 12 Nov 2020 20:41:06 +0200 Georgi

Re: arch/powerpc/platforms/pseries/reconfig.c:394:30: error: 'ofdt_proc_ops' defined but not used

2020-11-25 Thread Souptick Joarder
On Tue, Nov 24, 2020 at 12:40 PM kernel test robot wrote: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > master > head: d5beb3140f91b1c8a3d41b14d729aefa4dcc58bc > commit: 97a32539b9568bb653683349e5a76d02ff3c3e2c proc: convert everything to > "struct proc_ops"

Re: [PATCH] mm: cma: improve pr_debug log in cma_release()

2020-11-25 Thread Souptick Joarder
the current pr_debug logs is not giving the info about these types > of allocation patterns because of count value not being printed in > cma_release(). > > We are printing the count value in the trace logs, just extend the same > to pr_debug logs too. > > Signed-off-by: Charan Te

Re: [PATCH v2] media: atomisp: Fixed error handling path

2020-11-18 Thread Souptick Joarder
On Wed, Nov 4, 2020 at 7:32 AM Souptick Joarder wrote: > > Inside alloc_user_pages() based on flag value either pin_user_pages() > or get_user_pages_fast() will be called. However, these API might fail. > > But free_user_pages() called in error handling path doesn't bother >

Re: [PATCH] mm/filemap: add static for function __add_to_page_cache_locked

2020-11-09 Thread Souptick Joarder
On Fri, Nov 6, 2020 at 4:55 PM Alex Shi wrote: > > Otherwise it cause gcc warning: > ^~~ > ../mm/filemap.c:830:14: warning: no previous prototype for > ‘__add_to_page_cache_locked’ [-Wmissing-prototypes] > noinline int __add_to_page_cache_locked(struct page *page, >

Re: [PATCH 2/2] tomoyo: Fixed typo in documentation

2020-11-08 Thread Souptick Joarder
On Sat, Nov 7, 2020 at 2:27 PM John Hubbard wrote: > > On 11/7/20 12:24 AM, Souptick Joarder wrote: > > Fixed typo s/Poiner/Pointer > > > > Fixes: 5b636857fee6 ("TOMOYO: Allow using argv[]/envp[] of execve() as > > conditions.") > > Signed-

Re: [PATCH 1/2] tomoyo: Convert get_user_pages*() to pin_user_pages*()

2020-11-08 Thread Souptick Joarder
On Sun, Nov 8, 2020 at 10:30 AM John Hubbard wrote: > > On 11/7/20 8:12 PM, Tetsuo Handa wrote: > > On 2020/11/08 11:17, John Hubbard wrote: > >>> Excuse me, but Documentation/core-api/pin_user_pages.rst says > >>> "CASE 5: Pinning in order to _write_ to the data within the page" > >>> while

Re: [PATCH 1/2] tomoyo: Convert get_user_pages*() to pin_user_pages*()

2020-11-08 Thread Souptick Joarder
On Sun, Nov 8, 2020 at 7:47 AM John Hubbard wrote: > > On 11/7/20 5:13 PM, Tetsuo Handa wrote: > > On 2020/11/08 4:17, John Hubbard wrote: > >> On 11/7/20 1:04 AM, John Hubbard wrote: > >>> On 11/7/20 12:24 AM, Souptick Joarder wrote: > >>>> In

[PATCH 2/2] tomoyo: Fixed typo in documentation

2020-11-07 Thread Souptick Joarder
Fixed typo s/Poiner/Pointer Fixes: 5b636857fee6 ("TOMOYO: Allow using argv[]/envp[] of execve() as conditions.") Signed-off-by: Souptick Joarder Cc: John Hubbard --- security/tomoyo/domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/tomoyo/

[PATCH 1/2] tomoyo: Convert get_user_pages*() to pin_user_pages*()

2020-11-07 Thread Souptick Joarder
ace pages": https://lwn.net/Articles/807108/ Signed-off-by: Souptick Joarder Cc: John Hubbard --- security/tomoyo/domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/security/tomoyo/domain.c b/security/tomoyo/domain.c index dc4ecc0..bd748be 100644 --- a/s

[PATCH v2] media: atomisp: Fixed error handling path

2020-11-03 Thread Souptick Joarder
Fix this by passing the page_nr to free_user_pages(). If page_nr > 0 pages will be unpinned based on bo->mem_type. This will also take care of non error handling path. Fixes: 14a638ab96c5 ("media: atomisp: use pin_user_pages() for memory allocation") Signed-off-by: Souptick Joarde

Re: kernel BUG at mm/mmap.c:LINE!

2020-09-30 Thread Souptick Joarder
On Fri, Sep 4, 2020 at 12:39 AM syzbot wrote: > > Hello, > > syzbot found the following issue on: > > HEAD commit:1127b219 Merge tag 'fallthrough-fixes-5.9-rc3' of git://gi.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=136d098e90 > kernel config:

Re: [PATCH 2/2] xen/gntdev.c: Convert get_user_pages*() to pin_user_pages*()

2020-09-29 Thread Souptick Joarder
On Tue, Sep 29, 2020 at 6:00 PM wrote: > > > On 9/29/20 8:09 AM, Souptick Joarder wrote: > > On Fri, Sep 11, 2020 at 8:12 PM wrote: > >> > >> On 9/6/20 2:51 AM, Souptick Joarder wrote: > >>> In 2019, we introduced pin_user_pages*() and now we are conv

Re: [PATCH 2/2] xen/gntdev.c: Convert get_user_pages*() to pin_user_pages*()

2020-09-29 Thread Souptick Joarder
On Fri, Sep 11, 2020 at 8:12 PM wrote: > > > On 9/6/20 2:51 AM, Souptick Joarder wrote: > > In 2019, we introduced pin_user_pages*() and now we are converting > > get_user_pages*() to the new API as appropriate. [1] & [2] could > > be referred for more information.

Re: [PATCH] media: atomisp: Fixed error handling path

2020-09-28 Thread Souptick Joarder
Hi Dan, On Mon, Sep 28, 2020 at 2:08 PM Dan Carpenter wrote: > > On Sun, Sep 27, 2020 at 08:38:04PM +0530, Souptick Joarder wrote: > > Inside alloc_user_pages() based on flag value either pin_user_pages() > > or get_user_pages_fast() will be called. However, th

[PATCH] media: atomisp: Fixed error handling path

2020-09-27 Thread Souptick Joarder
Fix this by passing the page_nr to free_user_pages(). If page_nr > 0 pages will be unpinned based on bo->mem_type. This will also take care of non error handling path. Fixes: 14a638ab96c5 ("media: atomisp: use pin_user_pages() for memory allocation") Signed-off-by: Souptick Joarder Cc: Jo

Re: [PATCH] mm/gup: protect unpin_user_pages() against npages==-ERRNO

2020-09-19 Thread Souptick Joarder
eously passed it > > here. > > > > Cc: Ira Weiny > > Cc: Souptick Joarder > > Signed-off-by: Dan Carpenter > > Signed-off-by: John Hubbard > > --- > > > > Hi Dan, > > > > Is is OK to use your signed-off-by here? Since you cam

[PATCH] misc: mic: scif: Fix error handling path

2020-09-19 Thread Souptick Joarder
cts pinned_pages->nr_pages >=0, else disaster. Fix this by assigning pinned_pages->nr_pages to 0 if pin_user_pages_fast() returns -ERRNO. Fixes: ba612aa8b487 ("misc: mic: SCIF memory registration and unregistration") Signed-off-by: Souptick Joarder Cc: John Hubbard Cc: Ira We

Re: [linux-next PATCH] rapidio: Fix error handling path

2020-09-17 Thread Souptick Joarder
Hi Dan, On Thu, Sep 17, 2020 at 6:10 PM Dan Carpenter wrote: > > On Wed, Sep 16, 2020 at 01:02:32PM +0300, Dan Carpenter wrote: > > On Wed, Sep 16, 2020 at 09:12:17AM +0530, Souptick Joarder wrote: > > > There is an error when pin_user_pages_fast() returns -ERRNO and > &

Re: [linux-next PATCH] rapidio: Fix error handling path

2020-09-17 Thread Souptick Joarder
On Thu, Sep 17, 2020 at 11:17 PM John Hubbard wrote: > > On 9/17/20 10:34 AM, Ira Weiny wrote: > > On Thu, Sep 17, 2020 at 03:39:51PM +0300, Dan Carpenter wrote: > >> On Wed, Sep 16, 2020 at 01:02:32PM +0300, Dan Carpenter wrote: > >>> On Wed, Sep 16, 2020 at 0

[linux-next PATCH] rapidio: Fix error handling path

2020-09-15 Thread Souptick Joarder
There is an error when pin_user_pages_fast() returns -ERRNO and inside error handling path driver end up calling unpin_user_pages() with -ERRNO which is not correct. This patch will fix the problem. Fixes: e8de370188d09 ("rapidio: add mport char device driver") Signed-off-by: Soupti

Re: [PATCH] mm/gup.c: Handling ERR within unpin_user_pages()

2020-09-14 Thread Souptick Joarder
On Mon, Sep 14, 2020 at 7:38 PM Jason Gunthorpe wrote: > > On Mon, Sep 14, 2020 at 07:20:34AM +0530, Souptick Joarder wrote: > > On Sun, Sep 13, 2020 at 8:25 PM Matthew Wilcox wrote: > > > > > > On Sun, Sep 13, 2020 at 08:02:35PM +0530, Souptick Joarder wrote: >

Re: [PATCH] mm/gup.c: Handling ERR within unpin_user_pages()

2020-09-13 Thread Souptick Joarder
On Sun, Sep 13, 2020 at 8:25 PM Matthew Wilcox wrote: > > On Sun, Sep 13, 2020 at 08:02:35PM +0530, Souptick Joarder wrote: > > It is possible that a buggy caller of unpin_user_pages() > > (specially in error handling path) may end up calling it with > > npages

Re: [PATCH] tee/tee_shm.c: Fix error handling path

2020-09-13 Thread Souptick Joarder
On Mon, Sep 14, 2020 at 1:59 AM Jens Wiklander wrote: > > On Sun, Sep 13, 2020 at 10:12:11AM +0530, Souptick Joarder wrote: > > When shm->num_pages <= 0, we should avoid calling > > release_registered_pages() in error handling path. > What are we fixing? C

[PATCH] mm/gup.c: Handling ERR within unpin_user_pages()

2020-09-13 Thread Souptick Joarder
It is possible that a buggy caller of unpin_user_pages() (specially in error handling path) may end up calling it with npages < 0 which is unnecessary. This can be fixed by adding extra check inside unpin_user_pages(). Signed-off-by: Souptick Joarder Cc: John Hubbard --- mm/gup.c | 3 +++

Re: [PATCH] tee/tee_shm.c: Fix error handling path

2020-09-13 Thread Souptick Joarder
On Sun, Sep 13, 2020 at 2:00 PM Markus Elfring wrote: > > > When shm->num_pages <= 0, we should avoid calling > > release_registered_pages() in error handling path. > > * Would an imperative wording become helpful for the change description? > > * I suggest to add the tag “Fixes” to the commit

[PATCH] tee/tee_shm.c: Fix error handling path

2020-09-12 Thread Souptick Joarder
When shm->num_pages <= 0, we should avoid calling release_registered_pages() in error handling path. Signed-off-by: Souptick Joarder Cc: John Hubbard --- drivers/tee/tee_shm.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/tee/tee_shm.c b/drive

Re: general protection fault in unlink_file_vma

2020-09-09 Thread Souptick Joarder
Hi Hiff, On Wed, Sep 9, 2020 at 9:45 AM Hillf Danton wrote: > > > Tue, 08 Sep 2020 17:19:17 -0700 > > syzbot found the following issue on: > > > > HEAD commit:59126901 Merge tag 'perf-tools-fixes-for-v5.9-2020-09-03' .. > > git tree: upstream > > console output:

[PATCH 1/2] xen/gntdev.c: Mark pages as dirty

2020-09-06 Thread Souptick Joarder
to gntdev_get_page()) and then, based on batch->writeable, use set_page_dirty_lock(). Fixes: a4cdb556cae0 (xen/gntdev: add ioctl for grant copy) Suggested-by: Boris Ostrovsky Signed-off-by: Souptick Joarder Cc: John Hubbard Cc: Boris Ostrovsky Cc: Juergen Gross Cc: David Vrabel --- drivers/xen/gntde

[PATCH 2/2] xen/gntdev.c: Convert get_user_pages*() to pin_user_pages*()

2020-09-06 Thread Souptick Joarder
ace pages": https://lwn.net/Articles/807108/ Signed-off-by: Souptick Joarder Cc: John Hubbard Cc: Boris Ostrovsky Cc: Juergen Gross Cc: David Vrabel --- drivers/xen/gntdev.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/xen/gntdev.c b/driver

Re: [linux-next PATCH v4] drivers/virt/fsl_hypervisor: Fix error handling path

2020-09-05 Thread Souptick Joarder
On Sat, Sep 5, 2020 at 6:51 AM John Hubbard wrote: > > On 9/4/20 6:16 PM, Souptick Joarder wrote: > > Hi Andrew, > > > > On Wed, Sep 2, 2020 at 3:00 AM John Hubbard wrote: > >> > >> On 9/1/20 2:21 PM, Souptick Joarder wrote: > >>> Firs

Re: [linux-next PATCH v4] drivers/virt/fsl_hypervisor: Fix error handling path

2020-09-04 Thread Souptick Joarder
Hi Andrew, On Wed, Sep 2, 2020 at 3:00 AM John Hubbard wrote: > > On 9/1/20 2:21 PM, Souptick Joarder wrote: > > First, when memory allocation for sg_list_unaligned failed, there > > is a bug of calling put_pages() as we haven't pinned any pages. > > > > Second, i

Re: [PATCH] mm/gup: don't permit users to call get_user_pages with FOLL_LONGTERM

2020-09-04 Thread Souptick Joarder
On Fri, Sep 4, 2020 at 12:09 AM Matthew Wilcox wrote: > > On Thu, Sep 03, 2020 at 12:42:44PM +0530, Souptick Joarder wrote: > > We can use is_valid_gup_flags() inside -> > > get_user_pages_locked(), > > get_user_pages_unlocked(), > > pin_user_pages_locked()

Re: [PATCH] mm/gup: don't permit users to call get_user_pages with FOLL_LONGTERM

2020-09-03 Thread Souptick Joarder
On Wed, Aug 19, 2020 at 11:45 PM John Hubbard wrote: > > On 8/19/20 4:01 AM, Barry Song wrote: > > gug prohibits users from calling get_user_pages() with FOLL_PIN. But it > > Maybe Andrew can fix the typo above: gug --> gup. > > > > allows users to call get_user_pages() with FOLL_LONGTERM only.

[linux-next PATCH v4] drivers/virt/fsl_hypervisor: Fix error handling path

2020-09-01 Thread Souptick Joarder
: 6db7199407ca ("drivers/virt: introduce Freescale hypervisor management driver") Signed-off-by: Souptick Joarder Reviewed-by: Dan Carpenter Reviewed-by: John Hubbard --- v2: Added review tag. v3: Address review comment on v2 from John. Added review tag. v4: Address another set

Re: [linux-next PATCH v3] drivers/virt/fsl_hypervisor: Fix error handling path

2020-09-01 Thread Souptick Joarder
Hi John, On Tue, Sep 1, 2020 at 4:28 AM John Hubbard wrote: > > On 8/31/20 3:07 PM, Souptick Joarder wrote: > > First, when memory allocation for sg_list_unaligned failed, there > > is a bug of calling put_pages() as we haven't pinned any pages. > > "we should unp

Re: [linux-next PATCH v3] drivers/virt/fsl_hypervisor: Fix error handling path

2020-08-31 Thread Souptick Joarder
Hi John, On Tue, Sep 1, 2020 at 3:38 AM Souptick Joarder wrote: > > First, when memory allocation for sg_list_unaligned failed, there > is a bug of calling put_pages() as we haven't pinned any pages. > > Second, if get_user_pages_fast() failed we should unpinned num_pinned

[linux-next PATCH v3] drivers/virt/fsl_hypervisor: Fix error handling path

2020-08-31 Thread Souptick Joarder
, minor update in documentation. Fixes: 6db7199407ca ("drivers/virt: introduce Freescale hypervisor management driver") Signed-off-by: Souptick Joarder Reviewed-by: Dan Carpenter Reviewed-by: John Hubbard --- v2: Added review tag. v3: Address review comment on v2 from John. Added

Re: [PATCH v2] drivers/virt/fsl_hypervisor: Correcting error handling path

2020-08-25 Thread Souptick Joarder
On Thu, Jul 30, 2020 at 6:30 AM John Hubbard wrote: > > On 7/29/20 12:01 PM, Souptick Joarder wrote: > > First, when memory allocation for sg_list_unaligned failed, there > > is no point of calling put_pages() as we haven't pinned any pages. > > > > Second, if g

[RFC PATCH] xen/gntdev.c: Convert get_user_pages*() to pin_user_pages*()

2020-08-17 Thread Souptick Joarder
ace pages": https://lwn.net/Articles/807108/ Signed-off-by: Souptick Joarder Cc: John Hubbard --- drivers/xen/gntdev.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c index 64a9025a..e480509 100644 --- a/drivers/xen/

[PATCH v2] drivers/virt/fsl_hypervisor: Correcting error handling path

2020-07-29 Thread Souptick Joarder
First, when memory allocation for sg_list_unaligned failed, there is no point of calling put_pages() as we haven't pinned any pages. Second, if get_user_pages_fast() failed we should unpinned num_pinned pages, no point of checking till num_pages. This will address both. Signed-off-by: Souptick

Re: [PATCH v3 0/3] Few bug fixes and Convert to pin_user_pages*()

2020-07-28 Thread Souptick Joarder
Hi Boris, On Sun, Jul 12, 2020 at 9:01 AM Souptick Joarder wrote: > > This series contains few clean up, minor bug fixes and > Convert get_user_pages() to pin_user_pages(). > > I'm compile tested this, but unable to run-time test, > so any testing help is much a

[PATCH v3 3/3] xen/privcmd: Convert get_user_pages*() to pin_user_pages*()

2020-07-11 Thread Souptick Joarder
ace pages": https://lwn.net/Articles/807108/ Signed-off-by: Souptick Joarder Reviewed-by: Juergen Gross Cc: John Hubbard Cc: Boris Ostrovsky Cc: Paul Durrant --- drivers/xen/privcmd.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/xen/privcmd.c

[PATCH v3 2/3] xen/privcmd: Mark pages as dirty

2020-07-11 Thread Souptick Joarder
pages need to be marked as dirty before unpinned it in unlock_pages() which was oversight. This is fixed now. Signed-off-by: Souptick Joarder Suggested-by: John Hubbard Reviewed-by: Juergen Gross Cc: John Hubbard Cc: Boris Ostrovsky Cc: Paul Durrant --- drivers/xen/privcmd.c | 5 - 1

[PATCH v3 0/3] Few bug fixes and Convert to pin_user_pages*()

2020-07-11 Thread Souptick Joarder
in v2. v3: Address review comment. Add review tag. Cc: John Hubbard Cc: Boris Ostrovsky Cc: Paul Durrant Souptick Joarder (3): xen/privcmd: Corrected error handling path xen/privcmd: Mark pages as dirty xen/privcmd: Convert get_user_pages*() to pin_user_pages*() drivers/xen

[PATCH v3 1/3] xen/privcmd: Corrected error handling path

2020-07-11 Thread Souptick Joarder
from lock_pages() due to error. With this fix unlock_pages() doesn't need to validate pages[i] till *nr_pages* for error scenario and few condition checks can be ignored. Signed-off-by: Souptick Joarder Reviewed-by: Juergen Gross Cc: John Hubbard Cc: Boris Ostrovsky Cc: Paul Durrant --- drivers

Re: [PATCH v2 1/3] xen/privcmd: Corrected error handling path

2020-07-07 Thread Souptick Joarder
On Tue, Jul 7, 2020 at 5:15 PM Jürgen Groß wrote: > > On 07.07.20 13:40, Souptick Joarder wrote: > > On Tue, Jul 7, 2020 at 3:05 PM Jürgen Groß wrote: > >> > >> On 06.07.20 20:16, Souptick Joarder wrote: > >>> Previously, if lock_pages() end up partia

Re: [PATCH v2 1/3] xen/privcmd: Corrected error handling path

2020-07-07 Thread Souptick Joarder
On Tue, Jul 7, 2020 at 3:05 PM Jürgen Groß wrote: > > On 06.07.20 20:16, Souptick Joarder wrote: > > Previously, if lock_pages() end up partially mapping pages, it used > > to return -ERRNO due to which unlock_pages() have to go through > > each pages[i] till *nr_pages* to

Re: [PATCH v2 2/3] xen/privcmd: Mark pages as dirty

2020-07-07 Thread Souptick Joarder
On Tue, Jul 7, 2020 at 3:08 PM Jürgen Groß wrote: > > On 06.07.20 20:16, Souptick Joarder wrote: > > pages need to be marked as dirty before unpinned it in > > unlock_pages() which was oversight. This is fixed now. > > > > Signed-off-by: Souptick Joarder > >

[PATCH v2 2/3] xen/privcmd: Mark pages as dirty

2020-07-06 Thread Souptick Joarder
pages need to be marked as dirty before unpinned it in unlock_pages() which was oversight. This is fixed now. Signed-off-by: Souptick Joarder Suggested-by: John Hubbard Cc: John Hubbard Cc: Boris Ostrovsky Cc: Paul Durrant --- drivers/xen/privcmd.c | 5 - 1 file changed, 4 insertions

[PATCH v2 3/3] xen/privcmd: Convert get_user_pages*() to pin_user_pages*()

2020-07-06 Thread Souptick Joarder
ace pages": https://lwn.net/Articles/807108/ Signed-off-by: Souptick Joarder Cc: John Hubbard Cc: Boris Ostrovsky Cc: Paul Durrant --- drivers/xen/privcmd.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c

[PATCH v2 1/3] xen/privcmd: Corrected error handling path

2020-07-06 Thread Souptick Joarder
from lock_pages() due to error. With this fix unlock_pages() doesn't need to validate pages[i] till *nr_pages* for error scenario and few condition checks can be ignored. Signed-off-by: Souptick Joarder Cc: John Hubbard Cc: Boris Ostrovsky Cc: Paul Durrant --- drivers/xen/privcmd.c

[PATCH v2 0/3] Few bug fixes and Convert to pin_user_pages*()

2020-07-06 Thread Souptick Joarder
in v2. Cc: John Hubbard Cc: Boris Ostrovsky Cc: Paul Durrant Souptick Joarder (3): xen/privcmd: Corrected error handling path xen/privcmd: Mark pages as dirty xen/privcmd: Convert get_user_pages*() to pin_user_pages*() drivers/xen/privcmd.c | 32 ++-- 1

[PATCH v3 4/4] staging: kpc2000: kpc_dma: Remove additional goto statements

2020-07-01 Thread Souptick Joarder
. This is corrected now. Signed-off-by: Souptick Joarder Cc: John Hubbard Cc: Bharath Vedartham Cc: Dan Carpenter --- drivers/staging/kpc2000/kpc_dma/fileops.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/staging/kpc2000/kpc_dma/fileops.c b

[PATCH v3 0/4] staging: kpc2000: kpc_dma: Few clean up and Convert to pin_user_pages()

2020-07-01 Thread Souptick Joarder
and changed the other patches in series accordingly. Minor update in change logs. v3: Address review comment to invoke the right goto level when allocation failed in patch[4/4]. Cc: John Hubbard Cc: Bharath Vedartham Cc: Dan Carpenter Souptick Joarder (4): staging: kpc2000

[PATCH v3 2/4] staging: kpc2000: kpc_dma: Convert set_page_dirty() --> set_page_dirty_lock()

2020-07-01 Thread Souptick Joarder
First, convert set_page_dirty() to set_page_dirty_lock() Second, there is an interval in there after set_page_dirty() and before put_page(), in which the device could be running and setting pages dirty. Moving set_page_dirty_lock() after dma_unmap_sg(). Signed-off-by: Souptick Joarder Suggested

[PATCH v3 3/4] staging: kpc2000: kpc_dma: Convert get_user_pages() --> pin_user_pages()

2020-07-01 Thread Souptick Joarder
ace pages": https://lwn.net/Articles/807108/ Signed-off-by: Souptick Joarder Cc: John Hubbard Cc: Bharath Vedartham Cc: Dan Carpenter --- drivers/staging/kpc2000/kpc_dma/fileops.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/staging/k

[PATCH v3 1/4] staging: kpc2000: kpc_dma: Unpin partial pinned pages

2020-07-01 Thread Souptick Joarder
There is a bug, when get_user_pages() failed but partially pinned pages are not unpinned and positive numbers are returned instead of -ERRNO. Fixed it. Also, int is more appropriate type for rv. Changed it. Signed-off-by: Souptick Joarder Cc: John Hubbard Cc: Dan Carpenter Cc: Bharath

[PATCH v2 3/4] staging: kpc2000: kpc_dma: Convert get_user_pages() --> pin_user_pages()

2020-06-30 Thread Souptick Joarder
ace pages": https://lwn.net/Articles/807108/ Signed-off-by: Souptick Joarder Cc: John Hubbard Cc: Bharath Vedartham Cc: Dan Carpenter --- drivers/staging/kpc2000/kpc_dma/fileops.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/staging/k

[PATCH v2 2/4] staging: kpc2000: kpc_dma: Convert set_page_dirty() --> set_page_dirty_lock()

2020-06-30 Thread Souptick Joarder
First, convert set_page_dirty() to set_page_dirty_lock() Second, there is an interval in there after set_page_dirty() and before put_page(), in which the device could be running and setting pages dirty. Moving set_page_dirty_lock() after dma_unmap_sg(). Signed-off-by: Souptick Joarder Suggested

[PATCH v2 4/4] staging: kpc2000: kpc_dma: Remove additional goto statements

2020-06-30 Thread Souptick Joarder
As 3 goto level referring to same common code, those can be accomodated with a single goto level and renameing it to unpin_pages. Set the -ERRNO when returning partial mapped pages in more appropriate place. Signed-off-by: Souptick Joarder Cc: John Hubbard Cc: Bharath Vedartham Cc: Dan

[PATCH v2 0/4] staging: kpc2000: kpc_dma: Few clean up and Convert to pin_user_pages()

2020-06-30 Thread Souptick Joarder
and changed the other patches in series accordingly. Minor update in change logs. Cc: John Hubbard Cc: Bharath Vedartham Cc: Dan Carpenter Souptick Joarder (4): staging: kpc2000: kpc_dma: Unpin partial pinned pages staging: kpc2000: kpc_dma: Convert set_page_dirty

[PATCH v2 1/4] staging: kpc2000: kpc_dma: Unpin partial pinned pages

2020-06-30 Thread Souptick Joarder
There is a bug, when get_user_pages() failed but partially pinned pages are not unpinned and positive numbers are returned instead of -ERRNO. Fixed it. Also, int is more appropriate type for rv. Changed it. Signed-off-by: Souptick Joarder Cc: John Hubbard Cc: Dan Carpenter Cc: Bharath

  1   2   3   4   5   6   7   8   9   >