[PATCH] ASoC: img: Fix a reference count leak in img_i2s_in_set_fmt

2020-06-13 Thread wu000273
From: Qiushi Wu pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code, causing incorrect ref count if pm_runtime_put_noidle() is not called in error handling paths. Thus call pm_runtime_put_noidle() if pm_runtime_get_sync() fails. Signed-off-by: Qiushi

[PATCH] hwmon: (ina3221) Fix reference count leak in ina3221_write_enable

2020-06-13 Thread Aditya Pakki
ina3221_write_enable() calls pm_runtime_get_sync() that increments the reference counter. In case of failure, decrement the reference count and return the error. Signed-off-by: Aditya Pakki --- drivers/hwmon/ina3221.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hwmon/ina3221.c b/

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

2020-06-13 Thread Chen Wandun
在 2020/6/12 2:50, Markus Elfring 写道: Fix memory leak of in function parse_events_term__sym_hw() and parse_events_term__clone() when error occur. How do you think about a wording variant like the following? Release a configuration object after a string duplication failed. Thank you for y

[PATCH] mtd: rawnand: gpmi: fix reference count leak due to pm_runtime_get_sync

2020-06-13 Thread Aditya Pakki
On calling pm_runtime_get_sync() the reference count of the device is incremented. In case of failure, decrement the reference count before returning the error. Signed-off-by: Aditya Pakki --- drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-

[PATCH] media: bdisp: fix reference count leaks due to pm_runtime_get_sync

2020-06-13 Thread Aditya Pakki
On calling pm_runtime_get_sync() the reference count of the device is incremented. In case of failure, decrement the reference count before returning the error. Signed-off-by: Aditya Pakki --- drivers/media/platform/sti/bdisp/bdisp-v4l2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[PATCH] media: st-delta: Fix reference count leak in delta_run_work

2020-06-13 Thread Aditya Pakki
delta_run_work() calls delta_get_sync() that increments the reference counter. In case of failure, decrement the reference count by calling delta_put_autosuspend(). Signed-off-by: Aditya Pakki --- drivers/media/platform/sti/delta/delta-v4l2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion

coccinelle issues

2020-06-13 Thread Randy Dunlap
Hi, OK, I've not used Coccinelle and now I am trying to use it. It seems that I am having a few issues. The primary one is when I run spatch (via 'make coccicheck' in the kernel source tree), it tells me: Python error: No module named coccilib.elems I do see "elems.py" in /usr/local/lib64/coccin

[PATCH v2] RDMA/rvt: Fix potential memory leak caused by rvt_alloc_rq

2020-06-13 Thread Aditya Pakki
In case of failure of alloc_ud_wq_attr(), the memory allocated by rvt_alloc_rq() is not freed. Fix it by calling rvt_free_rq() using the existing clean-up code. Fixes: d310c4bf8aea ("IB/{rdmavt, hfi1, qib}: Remove AH refcount for UD QPs") Signed-off-by: Aditya Pakki --- v1: Fix incorrect order of

Re: [PATCH] staging: android: ashmem.c: Cleanup

2020-06-13 Thread Dio Putra
Okay, my fault here. Changing the function a little bit didn't help unfortunately. $ cd ~/git/linux/ $ make CC=clang W=1 M=drivers/staging/android CC drivers/staging/android/ashmem.o drivers/staging/android/ashmem.c:418:16: error: cannot assign to variable 'vmfile_fops' with const-qualifi

[PATCH] ext4: fix coding style in file.c

2020-06-13 Thread Dio Putra
Fixed a few coding style issues in file.c Signed-off-by: Dio Putra --- fs/ext4/file.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/ext4/file.c b/fs/ext4/file.c index 0d624250a62b..10e4a8389885 100644 --- a/fs/ext4/file.c +++ b/fs/ext4/file.c @@ -145,8 +145,7 @@ sta

Re: [PATCH v4 2/9] mips: bmips: add BCM6328 power domain definitions

2020-06-13 Thread Florian Fainelli
On 6/13/2020 1:21 AM, Álvaro Fernández Rojas wrote: > BCM6328 SoCs have a power domain controller to enable/disable certain > components in order to save power. > > Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH v4 3/9] mips: bmips: add BCM6362 power domain definitions

2020-06-13 Thread Florian Fainelli
On 6/13/2020 1:21 AM, Álvaro Fernández Rojas wrote: > BCM6362 SoCs have a power domain controller to enable/disable certain > components in order to save power. > > Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH v4 4/9] mips: bmips: add BCM63268 power domain definitions

2020-06-13 Thread Florian Fainelli
On 6/13/2020 1:21 AM, Álvaro Fernández Rojas wrote: > BCM63268 SoCs have a power domain controller to enable/disable certain > components in order to save power. > > Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH v4 5/9] mips: bmips: add BCM6318 power domain definitions

2020-06-13 Thread Florian Fainelli
On 6/13/2020 1:21 AM, Álvaro Fernández Rojas wrote: > BCM6318 SoCs have a power domain controller to enable/disable certain > components in order to save power. > > Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH v4 6/9] soc: bcm: add BCM63xx power domain driver

2020-06-13 Thread Florian Fainelli
On 6/13/2020 1:21 AM, Álvaro Fernández Rojas wrote: > BCM6318, BCM6328, BCM6362 and BCM63268 SoCs have a power domain controller > to enable/disable certain components in order to save power. > > Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli -- Florian

Re: [PATCH v4 9/9] mips: bmips: dts: add BCM63268 power domain support

2020-06-13 Thread Florian Fainelli
On 6/13/2020 1:21 AM, Álvaro Fernández Rojas wrote: > BCM63268 SoCs have a power domain controller to enable/disable certain > components in order to save power. > > Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli -- Florian

Re: [PATCH v4 8/9] mips: bmips: dts: add BCM63268 reset controller support

2020-06-13 Thread Florian Fainelli
On 6/13/2020 1:38 AM, Álvaro Fernández Rojas wrote: > BCM63268 SoCs have a reset controller for certain components. > > Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli -- Florian

Re: [PATCH v4 9/9] mips: bmips: add BCM6318 reset controller definitions

2020-06-13 Thread Florian Fainelli
On 6/13/2020 1:38 AM, Álvaro Fernández Rojas wrote: > BCM6318 SoCs have a reset controller for certain components. > > Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli -- Florian

Re: [PATCH v4 3/9] reset: add BCM6345 reset controller driver

2020-06-13 Thread Florian Fainelli
On 6/13/2020 1:38 AM, Álvaro Fernández Rojas wrote: > Add support for resetting blocks through the Linux reset controller > subsystem for BCM63xx SoCs. > > Signed-off-by: Álvaro Fernández Rojas With the kbuild robot error fixed: Reviewed-by: Florian Fainelli Thanks! -- Florian

[PATCH] net: fec: fix ref count leaking when pm_runtime_get_sync fails

2020-06-13 Thread Navid Emamdoost
in fec_enet_mdio_read, fec_enet_mdio_write, fec_enet_get_regs, fec_enet_open and fec_drv_remove, pm_runtime_get_sync is called which increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Signed-off-by: Navid Em

[PATCH] net: macb: fix ref count leaking via pm_runtime_get_sync

2020-06-13 Thread Navid Emamdoost
in macb_mdio_write, macb_mdio_read, and at91ether_open, pm_runtime_get_sync is called which increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Signed-off-by: Navid Emamdoost --- drivers/net/ethernet/cadenc

[PATCH] Input: omap4-keypad: fix ref count leak if pm_runtime_get_sync fails

2020-06-13 Thread Navid Emamdoost
calling pm_runtime_get_sync increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Signed-off-by: Navid Emamdoost --- drivers/input/keyboard/omap4-keypad.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(

[PATCH] powerpc/powernv/pci: add ifdef to avoid dead code

2020-06-13 Thread Greg Thelen
Commit dc3d8f85bb57 ("powerpc/powernv/pci: Re-work bus PE configuration") removed a couple pnv_ioda_setup_bus_dma() calls. The only remaining calls are behind CONFIG_IOMMU_API. Thus builds without CONFIG_IOMMU_API see: arch/powerpc/platforms/powernv/pci-ioda.c:1888:13: error: 'pnv_ioda_setup_b

Re:

2020-06-13 Thread depti mohan
6/14/2020 Been sunday, does your firm function today sar

[PATCH] Input: bma150: fix ref count leak in bma150_open

2020-06-13 Thread Navid Emamdoost
in bma150_open, pm_runtime_get_sync is called which increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Signed-off-by: Navid Emamdoost --- drivers/input/misc/bma150.c | 7 +-- 1 file changed, 5 insertio

Re: [PATCH v2 01/24] dyndbg-docs: eschew file /full/path query in docs

2020-06-13 Thread Greg KH
On Sat, Jun 13, 2020 at 09:57:15AM -0600, Jim Cromie wrote: > Regarding: > commit 2b6783191da7 ("dynamic_debug: add trim_prefix() to provide source-root > relative paths") > commit a73619a845d5 ("kbuild: use -fmacro-prefix-map to make __FILE__ a > relative path") > > 2nd commit broke dynamic-deb

Re: [PATCH v2 23/24] kset-example: add pr_debug()s for easy visibility of its operation

2020-06-13 Thread Greg KH
On Sat, Jun 13, 2020 at 09:57:37AM -0600, Jim Cromie wrote: > put pr_debug()s into most functions, to easily see code operate when > module is loaded and used. > > #> dmesg -w & > #> modprobe kset-example dyndbg=+pfml > #> cat /sys/kernel/kset-example/*/* > --- > samples/kobject/kset-exampl

[PATCH] e1000e: add ifdef to avoid dead code

2020-06-13 Thread Greg Thelen
Commit e086ba2fccda ("e1000e: disable s0ix entry and exit flows for ME systems") added e1000e_check_me() but it's only called from CONFIG_PM_SLEEP protected code. Thus builds without CONFIG_PM_SLEEP see: drivers/net/ethernet/intel/e1000e/netdev.c:137:13: warning: 'e1000e_check_me' defined but n

linux-next: Tree for Jun 14

2020-06-13 Thread Stephen Rothwell
Hi all, News: The merge window has opened, so please do *not* add v5.9 material to your linux-next included branches until after v5.8-rc1 has been released. Changes since 20200613: My fixes tree contains: 4cb4bfffe2c1 ("device_cgroup: Fix RCU list debugging warning") Non-mer

[PATCH] Input: stmfts: fix ref count leak in stmfts_input_open

2020-06-13 Thread Navid Emamdoost
in stmfts_input_open, pm_runtime_get_sync is called which increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Signed-off-by: Navid Emamdoost --- drivers/input/touchscreen/stmfts.c | 7 +-- 1 file change

[PATCH] drm/exynos: fix ref count leak in mic_pre_enable

2020-06-13 Thread Navid Emamdoost
in mic_pre_enable, pm_runtime_get_sync is called which increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Signed-off-by: Navid Emamdoost --- drivers/gpu/drm/exynos/exynos_drm_mic.c | 2 +- 1 file changed,

Re: [PATCH] staging: android: ashmem.c: Cleanup

2020-06-13 Thread Greg KH
On Sun, Jun 14, 2020 at 11:40:42AM +0700, Dio Putra wrote: > Okay, my fault here. Changing the function a little bit didn't help > unfortunately. > > $ cd ~/git/linux/ > $ make CC=clang W=1 M=drivers/staging/android > CC drivers/staging/android/ashmem.o > drivers/staging/android/ashmem.c:4

[PATCH] drm/panfrost: fix ref count leak in panfrost_job_hw_submit

2020-06-13 Thread Navid Emamdoost
in panfrost_job_hw_submit, pm_runtime_get_sync is called which increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Signed-off-by: Navid Emamdoost --- drivers/gpu/drm/panfrost/panfrost_job.c | 8 +--- 1

Re: [PATCH v4 1/3] venus: Add debugfs interface to set firmware log level

2020-06-13 Thread Greg KH
On Sun, Jun 14, 2020 at 01:39:17AM +0300, Stanimir Varbanov wrote: > This will be useful when debugging specific issues related to > firmware HFI interface. > > Signed-off-by: Stanimir Varbanov You didn't cc: any of us on the patchs, like you did on 0/3 :( > --- > drivers/media/platform/qcom/

[PATCH] drm/panfrost: perfcnt: fix ref count leak in panfrost_perfcnt_enable_locked

2020-06-13 Thread Navid Emamdoost
in panfrost_perfcnt_enable_locked, pm_runtime_get_sync is called which increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Signed-off-by: Navid Emamdoost --- drivers/gpu/drm/panfrost/panfrost_perfcnt.c | 10

Re: [PATCH v4 2/3] venus: Make debug infrastructure more flexible

2020-06-13 Thread Greg KH
On Sun, Jun 14, 2020 at 01:39:18AM +0300, Stanimir Varbanov wrote: > if (slot == -1) { > - dev_dbg(inst->core->dev, "%s: no free slot\n", __func__); > + VDBGH("no free slot for timestamp\n"); Again, no, you just lost a lot of valuable information by changing to a diff

[PATCH] mm/slab: Add a __GFP_ACCOUNT GFP flag check for slab allocation

2020-06-13 Thread Muchun Song
When a kmem_cache is initialized with SLAB_ACCOUNT slab flag, we must not call kmem_cache_alloc with __GFP_ACCOUNT GFP flag. In this case, we can be accounted to kmemcg twice. This is not correct. So we add a __GFP_ACCOUNT GFP flag check for slab allocation. We also introduce a new helper named fi

Re: [PATCH v3] IB/sa: Resolving use-after-free in ib_nl_send_msg

2020-06-13 Thread Leon Romanovsky
On Tue, Jun 09, 2020 at 07:45:21AM -0700, Divya Indi wrote: > Hi Leon, > > Thanks for taking the time to review. > > Please find my comments inline - > > On 6/9/20 12:00 AM, Leon Romanovsky wrote: > > On Mon, Jun 08, 2020 at 07:46:16AM -0700, Divya Indi wrote: > >> Commit 3ebd2fd0d011 ("IB/sa: Put

[PATCH] drm/etnaviv: fix ref count leak via pm_runtime_get_sync

2020-06-13 Thread Navid Emamdoost
in etnaviv_gpu_submit, etnaviv_gpu_recover_hang, etnaviv_gpu_debugfs, and etnaviv_gpu_init the call to pm_runtime_get_sync increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Signed-off-by: Navid Emamdoost -

[PATCH] drm/vc4: fix ref count leak in vc4_dsi_encoder_enable

2020-06-13 Thread Navid Emamdoost
in vc4_dsi_encoder_enable, the call to pm_runtime_get_sync increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Signed-off-by: Navid Emamdoost --- drivers/gpu/drm/vc4/vc4_dsi.c | 10 ++ 1 file change

[PATCH] drm/vc4: fix ref count leak in vc4_v3d_pm_get

2020-06-13 Thread Navid Emamdoost
in vc4_v3d_pm_get, the call to pm_runtime_get_sync increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Signed-off-by: Navid Emamdoost --- drivers/gpu/drm/vc4/vc4_v3d.c | 1 + 1 file changed, 1 insertion(+)

<    1   2   3   4