[PATCH -next] soc/tegra: fuse: don't return -ENOMEM when allocate lookups failed

2021-04-12 Thread Yang Yingliang
Signed-off-by: Yang Yingliang --- drivers/soc/tegra/fuse/fuse-tegra.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/soc/tegra/fuse/fuse-tegra.c b/drivers/soc/tegra/fuse/fuse-tegra.c index 94b60a692b51..a0def1219501 100644 --- a/drivers/soc/tegra/fus

[PATCH -next v2] clocksource/drivers/qcom: add missing iounmap() on error in msm_dt_timer_init()

2021-04-08 Thread Yang Yingliang
base and cpu0_base are not unmapped on error path, add the missing iounmap() before return msm_dt_timer_init() in the error handling cases. Fixes: 6e3321631ac2 ("ARM: msm: Add DT support to msm_timer") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: Manivannan

[PATCH -next] media: camss: ispif: Remove redundant dev_err call in msm_ispif_subdev_init()

2021-04-08 Thread Yang Yingliang
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/media/platform/qcom/camss/camss-ispif.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions

[PATCH -next] clocksource/drivers/qcom: add missing iounmap() on error in msm_dt_timer_init()

2021-04-08 Thread Yang Yingliang
base and cpu0_base are not unmapped on error path, add the missing iounmap() before return msm_dt_timer_init() in the error handling cases. Fixes: 6e3321631ac2 ("ARM: msm: Add DT support to msm_timer") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/clocksource/ti

[PATCH -next] soc/tegra: fuse: add missing iounmap() on error in tegra_init_fuse()

2021-04-08 Thread Yang Yingliang
Add the missing iounmap() before return from tegra_init_fuse() in the error handling case. Fixes: 9f94fadd75d3 ("soc/tegra: fuse: Register cell lookups for compatibility") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/soc/tegra/fuse/fuse-tegra.c | 4 +++- 1 file

[PATCH -next] usb: gadget: tegra-xudc: Fix possible use-after-free in tegra_xudc_remove()

2021-04-07 Thread Yang Yingliang
by calling cancel_delayed_work_sync(), which ensures that the work is properly cancelled, no longer running, and unable to re-schedule itself. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/usb/gadget/udc/tegra-xudc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH -next] phy: phy-twl4030-usb: Fix possible use-after-free in twl4030_usb_remove()

2021-04-07 Thread Yang Yingliang
by calling cancel_delayed_work_sync(), which ensures that the work is properly cancelled, no longer running, and unable to re-schedule itself. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/phy/ti/phy-twl4030-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d

[PATCH -next] power: supply: s3c_adc_battery: fix possible use-after-free in s3c_adc_bat_remove()

2021-04-07 Thread Yang Yingliang
by calling cancel_delayed_work_sync(), which ensures that the work is properly cancelled, no longer running, and unable to re-schedule itself. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/power/supply/s3c_adc_battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH -next] power: supply: generic-adc-battery: fix possible use-after-free in gab_remove()

2021-04-07 Thread Yang Yingliang
by calling cancel_delayed_work_sync(), which ensures that the work is properly cancelled, no longer running, and unable to re-schedule itself. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/power/supply/generic-adc-battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[PATCH -next] media: i2c: adv7842: fix possible use-after-free in adv7842_remove()

2021-04-06 Thread Yang Yingliang
by calling cancel_delayed_work_sync(), which ensures that the work is properly cancelled, no longer running, and unable to re-schedule itself. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/media/i2c/adv7842.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH -next] media: i2c: tda1997: Fix possible use-after-free in tda1997x_remove()

2021-04-06 Thread Yang Yingliang
by calling cancel_delayed_work_sync(), which ensures that the work is properly cancelled, no longer running, and unable to re-schedule itself. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/media/i2c/tda1997x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH -next] media: i2c: adv7511-v4l2: fix possible use-after-free in adv7511_remove()

2021-04-06 Thread Yang Yingliang
by calling cancel_delayed_work_sync(), which ensures that the work is properly cancelled, no longer running, and unable to re-schedule itself. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/media/i2c/adv7511-v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dri

[PATCH -next] media: adv7604: fix possible use-after-free in adv76xx_remove()

2021-04-06 Thread Yang Yingliang
by calling cancel_delayed_work_sync(), which ensures that the work is properly cancelled, no longer running, and unable to re-schedule itself. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/media/i2c/adv7604.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH -next] media: tc358743: fix possible use-after-free in tc358743_remove()

2021-04-06 Thread Yang Yingliang
by calling cancel_delayed_work_sync(), which ensures that the work is properly cancelled, no longer running, and unable to re-schedule itself. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/media/i2c/tc358743.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH -next] leds: tlc591xx: fix return value check in tlc591xx_probe()

2021-04-06 Thread Yang Yingliang
After device_get_match_data(), tlc591xx is not checked, add check for it and also check np after dev_of_node. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/leds/leds-tlc591xx.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/leds/leds

[PATCH -next v2] speakup: i18n: Switch to kmemdup_nul() in spk_msg_set()

2021-04-05 Thread Yang Yingliang
Use kmemdup_nul() helper instead of open-coding to simplify the code in spk_msg_set(). Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- V2: change the tile and commit log. --- drivers/accessibility/speakup/i18n.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git

Re: [PATCH -next] staging/speakup: Switch to kmemdup_nul()

2021-04-05 Thread Yang Yingliang
Hi, On 2021/4/2 21:13, Greg KH wrote: On Fri, Apr 02, 2021 at 05:21:11PM +0800, Yang Yingliang wrote: Use kmemdup_nul() helper instead of open-coding to simplify the code. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/accessibility/speakup/i18n.c | 4 +--- 1 file

[PATCH -next] media: camss: csid: Remove redundant dev_err call in msm_csid_subdev_init()

2021-04-02 Thread Yang Yingliang
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/media/platform/qcom/camss/camss-csid.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff

[PATCH -next] scsi: target: iscsi: Switch to kmemdup_nul()

2021-04-02 Thread Yang Yingliang
Use kmemdup_nul() helper instead of open-coding to simplify the code. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/target/iscsi/iscsi_target_nego.c | 4 +--- drivers/target/iscsi/iscsi_target_parameters.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions

[PATCH -next] KEYS: trusted: Switch to kmemdup_nul()

2021-04-02 Thread Yang Yingliang
Use kmemdup_nul() helper instead of open-coding to simplify the code. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- security/keys/trusted-keys/trusted_tpm1.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/security/keys/trusted-keys/trusted_tpm1.c b/security

[PATCH -next] staging/speakup: Switch to kmemdup_nul()

2021-04-02 Thread Yang Yingliang
Use kmemdup_nul() helper instead of open-coding to simplify the code. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/accessibility/speakup/i18n.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/accessibility/speakup/i18n.c b/drivers

[PATCH -next v2] libbpf: remove redundant semi-colon

2021-04-01 Thread Yang Yingliang
Remove redundant semi-colon in infinalize_btf_ext(). Signed-off-by: Yang Yingliang --- v2: add commit log --- tools/lib/bpf/linker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/linker.c b/tools/lib/bpf/linker.c index 46b16cbdcda3..4e08bc07e635 100644

[PATCH -next] iocost: remove redundant semi-colon

2021-04-01 Thread Yang Yingliang
Signed-off-by: Yang Yingliang --- include/trace/events/iocost.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/trace/events/iocost.h b/include/trace/events/iocost.h index e282ce02fa2d..6d1626e7a4ce 100644 --- a/include/trace/events/iocost.h +++ b/include/trace/events

[PATCH -next] KVM: selftests: remove redundant semi-colon

2021-04-01 Thread Yang Yingliang
Signed-off-by: Yang Yingliang --- tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c b/tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c index 804ff5ff022d..1f4a0599683c

[PATCH -next] libbpf: remove redundant semi-colon

2021-04-01 Thread Yang Yingliang
Signed-off-by: Yang Yingliang --- tools/lib/bpf/linker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lib/bpf/linker.c b/tools/lib/bpf/linker.c index 46b16cbdcda3..4e08bc07e635 100644 --- a/tools/lib/bpf/linker.c +++ b/tools/lib/bpf/linker.c @@ -1895,7 +1895,7

[PATCH -next] lan743x: remove redundant semi-colon

2021-04-01 Thread Yang Yingliang
Signed-off-by: Yang Yingliang --- drivers/net/ethernet/microchip/lan743x_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c index 1c3e204d727c..e7ab5f3f73fd 100644 --- a/drivers

[PATCH -next] drm/nouveau/gem: remove redundant semi-colon

2021-04-01 Thread Yang Yingliang
Signed-off-by: Yang Yingliang --- drivers/gpu/drm/nouveau/nouveau_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index c88cbb85f101..492e6794c5e6 100644 --- a/drivers/gpu/drm/nouveau

[PATCH -next] spi: fsl: add missing iounmap() on error in of_fsl_spi_probe()

2021-04-01 Thread Yang Yingliang
Add the missing iounmap() before return from of_fsl_spi_probe() in the error handling case. Fixes: 0f0581b24bd0 ("spi: fsl: Convert to use CS GPIO descriptors") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/spi/spi-fsl-spi.c | 23 ++- 1 file c

[PATCH -next] media: imx-pxp: remove redundant dev_err call in pxp_probe()

2021-04-01 Thread Yang Yingliang
There is an error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/media/platform/imx-pxp.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a

[PATCH -next] media: ti-vpe: csc: remove redundant dev_err call in csc_create()

2021-04-01 Thread Yang Yingliang
There is an error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/media/platform/ti-vpe/csc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a

[PATCH -next v3] staging: greybus: camera: Switch to memdup_user_nul()

2021-04-01 Thread Yang Yingliang
Use memdup_user_nul() helper instead of open-coding to simplify the code. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- v3: remove duplicate ';' v2: delete unnecessary blank line use return PTR_ERR(kbuf) instead --- drivers/staging/greybus/camera.c | 13 +++

[PATCH -next] media: camss: csiphy: Remove redundant dev_err call in msm_csiphy_subdev_init()

2021-04-01 Thread Yang Yingliang
There is an error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/media/platform/qcom/camss/camss-csiphy.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions

[PATCH -next] media: ti-vpe: sc: remove redundant dev_err call in sc_create()

2021-04-01 Thread Yang Yingliang
There is an error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/media/platform/ti-vpe/sc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a

[PATCH -next] locking/ww_mutex: fix missing destroy_workqueue() on error in test_ww_mutex_init()

2021-04-01 Thread Yang Yingliang
t;) Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- kernel/locking/test-ww_mutex.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/kernel/locking/test-ww_mutex.c b/kernel/locking/test-ww_mutex.c index 3e82f449b4ff..6e4faa853e56 100644 --- a/kern

Re: [PATCH -next v2] staging: greybus: camera: Switch to memdup_user_nul()

2021-04-01 Thread Yang Yingliang
On 2021/4/1 15:47, Dan Carpenter wrote: On Thu, Apr 01, 2021 at 10:43:32AM +0300, Dan Carpenter wrote: On Thu, Apr 01, 2021 at 11:17:52AM +0800, Yang Yingliang wrote: Use memdup_user_nul() helper instead of open-coding to simplify the code. Reported-by: Hulk Robot Signed-off-by: Yang

Re: [PATCH -next v2] staging: greybus: camera: Switch to memdup_user_nul()

2021-04-01 Thread Yang Yingliang
On 2021/4/1 15:43, Dan Carpenter wrote: On Thu, Apr 01, 2021 at 11:17:52AM +0800, Yang Yingliang wrote: Use memdup_user_nul() helper instead of open-coding to simplify the code. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/staging/greybus/camera.c | 13

Re: [PATCH -next v2] staging: greybus: camera: Switch to memdup_user_nul()

2021-04-01 Thread Yang Yingliang
On 2021/4/1 13:59, Greg KH wrote: On Thu, Apr 01, 2021 at 11:17:52AM +0800, Yang Yingliang wrote: Use memdup_user_nul() helper instead of open-coding to simplify the code. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/staging/greybus/camera.c | 13 +++-- 1

[PATCH -next v2] staging: greybus: camera: Switch to memdup_user_nul()

2021-03-31 Thread Yang Yingliang
Use memdup_user_nul() helper instead of open-coding to simplify the code. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/staging/greybus/camera.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/staging/greybus/camera.c b/drivers

Re: [PATCH -next] staging: greybus: camera: Switch to memdup_user_nul()

2021-03-31 Thread Yang Yingliang
Hi, On 2021/3/31 18:24, Dan Carpenter wrote: On Wed, Mar 31, 2021 at 05:52:01PM +0800, Yang Yingliang wrote: Use memdup_user_nul() helper instead of open-coding to simplify the code. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/staging/greybus/camera.c | 10

Re: [PATCH -next] staging: rtl8723bs: os_dep: remove unused variable 'ret'

2021-03-31 Thread Yang Yingliang
Hi, On 2021/3/31 18:27, Greg KH wrote: On Wed, Mar 31, 2021 at 05:42:47PM +0800, Yang Yingliang wrote: GCC reports the following warning with W=1: drivers/staging/rtl8723bs/os_dep/recv_linux.c:101:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] 101 | int ret

[PATCH -next] soc: ixp4xx: qmgr: Use DEFINE_SPINLOCK() for spinlock

2021-03-31 Thread Yang Yingliang
spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/soc/ixp4xx/ixp4xx-qmgr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/soc/ixp4xx

[PATCH -next] staging: greybus: camera: Switch to memdup_user_nul()

2021-03-31 Thread Yang Yingliang
Use memdup_user_nul() helper instead of open-coding to simplify the code. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/staging/greybus/camera.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/staging/greybus/camera.c b/drivers/staging

[PATCH -next] staging: rtl8723bs: os_dep: remove unused variable 'ret'

2021-03-31 Thread Yang Yingliang
: de69e2b3f105 ("staging: rtl8723bs: remove DBG_COUNTER calls from os_dep/recv_linux.c") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/staging/rtl8723bs/os_dep/recv_linux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl872

[PATCH -next] PCI: endpoint: fix missing destroy_workqueue()

2021-03-31 Thread Yang Yingliang
Add the missing destroy_workqueue() before return from pci_epf_test_init() in the error handling case and add destroy_workqueue() in pci_epf_test_exit(). Fixes: 349e7a85b25fa ("PCI: endpoint: functions: Add an EP function to test PCI") Reported-by: Hulk Robot Signed-off-by: Yang

[PATCH -next] fs: 9p: fix wrong pointer passed to IS_ERR() and PTR_ERR()

2021-03-30 Thread Yang Yingliang
IS_ERR() and PTR_ERR() use wrong pointer, it should be writeback_fid, fix it. Fixes: 5bfe97d7382b ("9p: Fix writeback fid incorrectly being attached to dentry") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- fs/9p/vfs_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH -next] media: i2c: ov5648: fix wrong pointer passed to IS_ERR() and PTR_ERR()

2021-03-30 Thread Yang Yingliang
IS_ERR() and PTR_ERR() use wrong pointer, it should be sensor->dovdd, fix it. Fixes: e43ccb0a045f ("media: i2c: Add support for the OV5648 image sensor") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/media/i2c/ov5648.c | 4 ++-- 1 file changed, 2 insertions(+)

[PATCH -next] USB: gadget: udc: fix wrong pointer passed to IS_ERR() and PTR_ERR()

2021-03-30 Thread Yang Yingliang
IS_ERR() and PTR_ERR() use wrong pointer, it should be udc->virt_addr, fix it. Fixes: 1b9f35adb0ff ("usb: gadget: udc: Add Synopsys UDC Platform driver") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/usb/gadget/udc/snps_udc_plat.c | 4 ++-- 1 file changed,

[PATCH -next] scsi: fnic: remove unnecessary spin_lock_init() and INIT_LIST_HEAD()

2021-03-30 Thread Yang Yingliang
The spinlock and list head of fnic_list is initialized statically. It is unnecessary to initialize by spin_lock_init() and INIT_LIST_HEAD(). Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/scsi/fnic/fnic_main.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers

[PATCH -next] fs: dlm: fix missing unlock on error in accept_from_sock()

2021-03-27 Thread Yang Yingliang
Add the missing unlock before return from accept_from_sock() in the error handling case. Fixes: 6cde210a9758 ("fs: dlm: add helper for init connection") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- fs/dlm/lowcomms.c | 1 + 1 file changed, 1 insertion(+) diff --gi

[PATCH 0/3] arm64: lib: improve copy performance

2021-03-23 Thread Yang Yingliang
This patchset reduce instructions in copy_template.S to improve the performance of copy memory, when size is ge 64 bytes. Yang Yingliang (3): arm64: lib: introduce ldp2/stp2 macro arm64: lib: improve copy performance when size is ge 128 bytes arm64: lib: improve copy performance when size

[PATCH 1/3] arm64: lib: introduce ldp2/stp2 macro

2021-03-23 Thread Yang Yingliang
Introduce ldp2/stp2 to load/store without add src/dst. Signed-off-by: Yang Yingliang --- arch/arm64/include/asm/asm-uaccess.h | 16 arch/arm64/lib/copy_from_user.S | 8 arch/arm64/lib/copy_in_user.S| 8 arch/arm64/lib/copy_to_user.S| 8

[PATCH 2/3] arm64: lib: improve copy performance when size is ge 128 bytes

2021-03-23 Thread Yang Yingliang
patch: memcpy: 107.12 copy_from_user: 157.50 copy_to_user: 198.85 It's about 25% improvement in memcpy(). Signed-off-by: Yang Yingliang --- arch/arm64/lib/copy_template.S | 36 +++--- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/arch/arm6

[PATCH 3/3] arm64: lib: improve copy performance when size is less than 128 and ge 64 bytes

2021-03-23 Thread Yang Yingliang
: 13.84 It's about 5.27% improvement in memcpy(). Signed-off-by: Yang Yingliang --- arch/arm64/lib/copy_template.S | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/arch/arm64/lib/copy_template.S b/arch/arm64/lib/copy_template.S index c3cd6f84c9c0..a9cbd47

[PATCH -next] crypto: hisilicon/hpre: fix link error

2021-03-23 Thread Yang Yingliang
ot;crypto_ecdh_decode_key" [drivers/crypto/hisilicon/hpre/hisi_hpre.ko] undefined! Fixes: 90274769cf79 ("crypto: hisilicon/hpre - add 'CURVE25519' algorithm") Fixes: 05e7b906aa7c ("crypto: hisilicon/hpre - add 'ECDH' algorithm") Signed-off-by: Yang Ying

Re: [PATCH 4.19 21/57] proc: dont allow async path resolution of /proc/self components

2021-03-02 Thread Yang Yingliang
Hi, On 2020/12/1 16:53, Greg Kroah-Hartman wrote: From: Jens Axboe [ Upstream commit 8d4c3e76e3be11a64df95ddee52e99092d42fc19 ] If this is attempted by a kthread, then return -EOPNOTSUPP as we don't currently support that. Once we can get task_pid_ptr() doing the right thing, then this can go

[tip: timers/core] clocksource/drivers/orion: Add missing clk_disable_unprepare() on error path

2020-12-03 Thread tip-bot2 for Yang Yingliang
The following commit has been merged into the timers/core branch of tip: Commit-ID: c1e6cad00aa2f17845e7270e38ff3cc82c7b022a Gitweb: https://git.kernel.org/tip/c1e6cad00aa2f17845e7270e38ff3cc82c7b022a Author:Yang Yingliang AuthorDate:Wed, 11 Nov 2020 14:47:06 +08:00

[PATCH v2] iommu: return error code when it can't get group

2020-11-26 Thread Yang Yingliang
It's better to return error code if it can't get group in iommu_probe_device(). It's no function change. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/iommu/iommu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/iommu.c

Re: [PATCH] iommu: fix return error code in iommu_probe_device()

2020-11-25 Thread Yang Yingliang
On 2020/11/25 19:35, Will Deacon wrote: On Wed, Nov 25, 2020 at 09:54:34AM +0800, Yang Yingliang wrote: On 2020/11/18 6:41, Will Deacon wrote: On Tue, Nov 17, 2020 at 07:11:28PM +0800, Yang Yingliang wrote: On 2020/11/17 17:40, Lu Baolu wrote: On 2020/11/17 10:52, Yang Yingliang wrote: If

Re: [PATCH] iommu: fix return error code in iommu_probe_device()

2020-11-24 Thread Yang Yingliang
On 2020/11/18 6:41, Will Deacon wrote: On Tue, Nov 17, 2020 at 07:11:28PM +0800, Yang Yingliang wrote: On 2020/11/17 17:40, Lu Baolu wrote: On 2020/11/17 10:52, Yang Yingliang wrote: If iommu_group_get() failed, it need return error code in iommu_probe_device(). Fixes: cf193888bfbd ("

[PATCH] Input: sunkbd - fix UAF in sunkbd_reinit()

2020-11-17 Thread Yang Yingliang
-25669. Signed-off-by: Yang Yingliang --- drivers/input/keyboard/sunkbd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/input/keyboard/sunkbd.c b/drivers/input/keyboard/sunkbd.c index 27126e621eb6..b6222896acdf 100644 --- a/drivers/input/keyboard/sunkbd.c +++ b/drivers/input/ke

Re: [PATCH] iommu: fix return error code in iommu_probe_device()

2020-11-17 Thread Yang Yingliang
On 2020/11/17 17:40, Lu Baolu wrote: Hi Yingliang, On 2020/11/17 10:52, Yang Yingliang wrote: If iommu_group_get() failed, it need return error code in iommu_probe_device(). Fixes: cf193888bfbd ("iommu: Move new probe_device path...") Reported-by: Hulk Robot Signed-off-by: Yang

[PATCH] USB: gadget: legacy: fix return error code in acm_ms_bind()

2020-11-17 Thread Yang Yingliang
If usb_otg_descriptor_alloc() failed, it need return ENOMEM. Fixes: 578aa8a2b12c ("usb: gadget: acm_ms: allocate and init otg descriptor by otg capabilities") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/usb/gadget/legacy/acm_ms.c | 4 +++- 1 file changed, 3

[PATCH] usb/max3421: fix return error code in max3421_probe()

2020-11-16 Thread Yang Yingliang
Signed-off-by: Yang Yingliang --- drivers/usb/host/max3421-hcd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/max3421-hcd.c b/drivers/usb/host/max3421-hcd.c index 0894f6caccb2..ebb8180b52ab 100644 --- a/drivers/usb/host/max3421-hcd.c +++ b/drivers/usb/hos

[PATCH] video: fbdev: atmel_lcdfb: fixe return error code in atmel_lcdfb_of_init()

2020-11-16 Thread Yang Yingliang
If devm_kzalloc() failed after first time, atmel_lcdfb_of_init() cann't return -ENOMEM, fix this by putting the error code in loop. Fixes: b985172b328a ("video: atmel_lcdfb: add device tree suport") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/video/fbdev/at

[PATCH] drm/omap: dmm_tiler: fix return error code in omap_dmm_probe()

2020-11-16 Thread Yang Yingliang
Return -ENOMEM when allocating refill memory failed. Fixes: 71e8831f6407 ("drm/omap: DMM/TILER support for OMAP4+ platform") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drive

[PATCH] iommu: fix return error code in iommu_probe_device()

2020-11-16 Thread Yang Yingliang
If iommu_group_get() failed, it need return error code in iommu_probe_device(). Fixes: cf193888bfbd ("iommu: Move new probe_device path...") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/iommu/iommu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) di

[PATCH] [media] omap4iss: return error code when omap4iss_get() failed

2020-11-16 Thread Yang Yingliang
If omap4iss_get() failed, it need return error code in iss_probe(). Fixes: 59f0ad807681 ("[media] v4l: omap4iss: Add support for OMAP4...") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/staging/media/omap4iss/iss.c | 4 +++- 1 file changed, 3 insertions(+),

[PATCH] speakup: fix uninitialized flush_lock

2020-11-16 Thread Yang Yingliang
The flush_lock is uninitialized, use DEFINE_SPINLOCK to define and initialize flush_lock. Fixes: c6e3fd22cd53 ("Staging: add speakup to the staging directory") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/accessibility/speakup/speakup_dectlk.c | 2 +- 1 file

[PATCH] clocksource/drivers/orion: add missing clk_disable_unprepare() on error path

2020-11-10 Thread Yang Yingliang
After calling clk_prepare_enable(), clk_disable_unprepare() need be called on error path. Fixes: fbe4b3566ddc ("clocksource/drivers/orion: Convert init function...") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/clocksource/timer-orion.c | 11 --- 1 file

[PATCH] drm/panel: add missing platform_driver_unregister() on error path

2020-11-10 Thread Yang Yingliang
If mipi_dsi_driver_register() failed, platform_driver_unregister() need be called. Fixes: 210fcd9d9cf1 ("drm/panel: Add support for Panasonic VVX10F004B0") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/gpu/drm/panel/panel-simple.c | 4 +++- 1 file changed, 3

Re: [PATCH resend] vgacon: fix a UAF in do_update_region()

2020-10-20 Thread Yang Yingliang
= 0; *(uint64_t*)0x20002078 = 0; *(uint64_t*)0x20002080 = 0; *(uint64_t*)0x20002088 = 0; *(uint64_t*)0x20002090 = 0; *(uint64_t*)0x20002098 = 0; *(uint64_t*)0x200020a0 = 0; *(uint64_t*)0x200020a8 = 0; *(uint64_t*)0x200020b0 = 0;     syscall(__NR_write, r[3], 0x2840ul, 0x1878ul);     return 0; } On 20

[PATCH resend] vgacon: fix a UAF in do_update_region()

2020-10-20 Thread Yang Yingliang
vga_vram_end. But we still use vc_screenbuf_size, if the vga_vram_size is smaller than vc_screenbuf_size, vc_pos may be out of bound, using it will cause a use-after-free(or out-of-bounds). Fix this by calling vc_resize() if vga_vram_size is smaller than vc_screenbuf_size. Signed-off-by: Yang Yingliang

[PATCH -next v2] tty: hvc: fix link error with CONFIG_SERIAL_CORE_CONSOLE=n

2020-09-18 Thread Yang Yingliang
error. Fix this by selecting SERIAL_CORE_CONSOLE. Fixes: d1a1af2cdf19 ("hvc: dcc: Add earlycon support") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/tty/hvc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/hvc/Kconfig b/drivers/tty/hvc/Kconfi

[PATCH -next v2] tty: serial: imx: fix link error with CONFIG_SERIAL_CORE_CONSOLE=n

2020-09-18 Thread Yang Yingliang
ot defined, then we get the error. Fix this by selecting SERIAL_CORE_CONSOLE. Fixes: 699cc4dfd140 ("tty: serial: imx: add imx earlycon driver") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/tty/serial/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/

Re: [PATCH -next] tty: hvc: fix link error with CONFIG_SERIAL_CORE_CONSOLE=n

2020-09-18 Thread Yang Yingliang
On 2020/9/18 19:17, Greg KH wrote: On Fri, Sep 18, 2020 at 05:20:30PM +0800, Yang Yingliang wrote: Fix the link error by selecting SERIAL_CORE_CONSOLE. aarch64-linux-gnu-ld: drivers/tty/hvc/hvc_dcc.o: in function `dcc_early_write': hvc_dcc.c:(.text+0x164): undefined referen

Re: [PATCH -next] tty: serial: imx: fix link error with CONFIG_SERIAL_CORE_CONSOLE=n

2020-09-18 Thread Yang Yingliang
Hi, On 2020/9/18 19:16, Greg KH wrote: On Fri, Sep 18, 2020 at 05:13:05PM +0800, Yang Yingliang wrote: Fix the link error by selecting SERIAL_CORE_CONSOLE. aarch64-linux-gnu-ld: drivers/tty/serial/imx_earlycon.o: in function `imx_uart_console_early_write': imx_earlycon.c:(.text

[PATCH -next] tty: hvc: fix link error with CONFIG_SERIAL_CORE_CONSOLE=n

2020-09-18 Thread Yang Yingliang
Fix the link error by selecting SERIAL_CORE_CONSOLE. aarch64-linux-gnu-ld: drivers/tty/hvc/hvc_dcc.o: in function `dcc_early_write': hvc_dcc.c:(.text+0x164): undefined reference to `uart_console_write' Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/tty/hvc/Kconfi

[PATCH -next] tty: serial: imx: fix link error with CONFIG_SERIAL_CORE_CONSOLE=n

2020-09-18 Thread Yang Yingliang
Fix the link error by selecting SERIAL_CORE_CONSOLE. aarch64-linux-gnu-ld: drivers/tty/serial/imx_earlycon.o: in function `imx_uart_console_early_write': imx_earlycon.c:(.text+0x84): undefined reference to `uart_console_write' Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --

[PATCH -next] drm/amd/display: remove unused variable in amdgpu_dm.c

2020-09-17 Thread Yang Yingliang
Fix the compile warning: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:892:26: warning: variable ‘stream’ set but not used [-Wunused-but-set-variable] struct dc_stream_state *stream; ^~ Reported-by: Hulk Robot Signed-off-by: Yang Yingliang

[PATCH -next] drm/amd/display: remove unused variable in dcn30_hwseq.c

2020-09-17 Thread Yang Yingliang
: warning: variable ‘is_dp’ set but not used [-Wunused-but-set-variable] bool is_dp; ^ Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc

[PATCH -next v2] powerpc/book3s64: fix link error with CONFIG_PPC_RADIX_MMU=n

2020-09-16 Thread Yang Yingliang
Fix link error when CONFIG_PPC_RADIX_MMU is disabled: powerpc64-linux-gnu-ld: arch/powerpc/platforms/pseries/lpar.o:(.toc+0x0): undefined reference to `mmu_pid_bits' Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- v2: - enclose radix_init_pseries with CONFIG_PPC_RADI

Re: [PATCH -next] powerpc/book3s64: fix link error with CONFIG_PPC_RADIX_MMU=n

2020-09-06 Thread Yang Yingliang
On 2020/9/6 14:50, Christophe Leroy wrote: Le 05/09/2020 à 13:25, Yang Yingliang a écrit : Fix link error when CONFIG_PPC_RADIX_MMU is disabled: powerpc64-linux-gnu-ld: arch/powerpc/platforms/pseries/lpar.o:(.toc+0x0): undefined reference to `mmu_pid_bits' Reported-by: Hulk

[PATCH -next] powerpc/eeh: fix compile warning with CONFIG_PROC_FS=n

2020-09-05 Thread Yang Yingliang
Fix the compile warning: arch/powerpc/kernel/eeh.c:1639:12: error: 'proc_eeh_show' defined but not used [-Werror=unused-function] static int proc_eeh_show(struct seq_file *m, void *v) Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- arch/powerpc/kernel/eeh.c | 2 ++ 1 fi

[PATCH -next] powerpc/book3s64: fix link error with CONFIG_PPC_RADIX_MMU=n

2020-09-05 Thread Yang Yingliang
Fix link error when CONFIG_PPC_RADIX_MMU is disabled: powerpc64-linux-gnu-ld: arch/powerpc/platforms/pseries/lpar.o:(.toc+0x0): undefined reference to `mmu_pid_bits' Reported-by: Hulk Robot Signed-off-by: Yang Yingliang --- arch/powerpc/mm/book3s64/mmu_context.c | 4 arch/po

[PATCH] arm64: PCI: fix memleak when calling pci_iomap/unmap()

2020-09-04 Thread Yang Yingliang
config GENERIC_IOMAP is disabled on arm64, so pci_iounmap() does nothing, when we using pci_iomap/pci_iounmap(), it will lead to memory leak. Implements pci_iounmap() for arm64 to fix this leak. Fixes: 09a5723983e3 ("arm64: Use include/asm-generic/io.h") Signed-off-by: Yang Yingliang

Re: [PATCH v3] PCI: Add pci_iounmap

2020-09-02 Thread Yang Yingliang
Hi, On 2020/9/2 2:05, George Cherian wrote: Hi Yang, -Original Message- From: Yang Yingliang Sent: Tuesday, September 1, 2020 6:59 PM To: George Cherian ; linux-kernel@vger.kernel.org; linux-a...@vger.kernel.org; linux-...@vger.kernel.org Cc: kbuild-...@lists.01.org; bhelg

Re: [PATCH v3] PCI: Add pci_iounmap

2020-09-01 Thread Yang Yingliang
On 2020/8/25 9:25, kernel test robot wrote: Hi George, I love your patch! Yet something to improve: [auto build test ERROR on pci/next] [also build test ERROR on linux/master linus/master asm-generic/master v5.9-rc2 next-20200824] [If your patch is applied to the wrong git tree, kindly drop

[PATCH 2/2] pci: fix memleak when calling pci_iomap/unmap()

2020-08-27 Thread Yang Yingliang
config GENERIC_IOMAP is disabled on some archs(e.g. arm64), so pci_iounmap() does nothing, when we using pci_iomap/pci_iounmap(), it will lead to memory leak. Move pci_iounmap() to lib/pci_map.c to fix this. Signed-off-by: Yang Yingliang --- include/asm-generic/pci_iomap.h | 2 ++ lib/iomap.c

[PATCH 0/2] fix memleak when using pci_iounmap()

2020-08-27 Thread Yang Yingliang
config GENERIC_IOMAP is not selected on some arch, pci_iounmap() don't implement, when we using pci_iomap/pci_iounmap, it will lead to memory leak. This patch set moves the implemention of pci_iounmap() to lib/pci_iomap.c to fix this. Yang Yingliang (2): iomap: move some definitions to in

[PATCH 1/2] iomap: move some definitions to include/linux/io.h

2020-08-27 Thread Yang Yingliang
Move some IO macros and bad_io_access() to include/linux/io.h This prepares for moving pci_iounmap() to lib/pci_iomap.c. Signed-off-by: Yang Yingliang --- include/linux/io.h | 36 lib/iomap.c| 36 2 files changed

[PATCH stable-4.19] cgroup: add missing skcd->no_refcnt check in cgroup_sk_clone()

2020-08-13 Thread Yang Yingliang
Add skcd->no_refcnt check which is missed when backporting ad0f75e5f57c ("cgroup: fix cgroup_sk_alloc() for sk_clone_lock()"). This patch is needed in stable-4.9, stable-4.14 and stable-4.19. Signed-off-by: Yang Yingliang --- kernel/cgroup/cgroup.c | 2 ++ 1 file changed, 2 insert

[PATCH stable-4.14] cgroup: add missing skcd->no_refcnt check in cgroup_sk_clone()

2020-08-13 Thread Yang Yingliang
Add skcd->no_refcnt check which is missed when backporting ad0f75e5f57c ("cgroup: fix cgroup_sk_alloc() for sk_clone_lock()"). This patch is needed in stable-4.9, stable-4.14 and stable-4.19. Signed-off-by: Yang Yingliang --- kernel/cgroup/cgroup.c | 2 ++ 1 file changed, 2 insert

[PATCH stable-4.9 v2] cgroup: add missing skcd->no_refcnt check in cgroup_sk_clone()

2020-08-13 Thread Yang Yingliang
Add skcd->no_refcnt check which is missed when backporting ad0f75e5f57c ("cgroup: fix cgroup_sk_alloc() for sk_clone_lock()"). This patch is needed in stable-4.9, stable-4.14 and stable-4.19. Signed-off-by: Yang Yingliang --- kernel/cgroup.c | 2 ++ 1 file changed, 2 insertions(+

[PATCH stable-4.9] cgroup: add missing skcd->no_refcnt check in cgroup_sk_alloc()

2020-08-13 Thread Yang Yingliang
Add skcd->no_refcnt check which is missed when backporting ad0f75e5f57c ("cgroup: fix cgroup_sk_alloc() for sk_clone_lock()"). This patch is needed in stable-4.9, stable-4.14 and stable-4.19. Signed-off-by: Yang Yingliang --- kernel/cgroup.c | 2 ++ 1 file changed, 2 insertions(+

Re: [PATCH 4.19 016/133] cgroup: fix cgroup_sk_alloc() for sk_clone_lock()

2020-08-13 Thread Yang Yingliang
On 2020/8/13 19:41, Greg Kroah-Hartman wrote: On Thu, Aug 13, 2020 at 07:30:55PM +0800, Yang Yingliang wrote: Hi, On 2020/7/20 23:36, Greg Kroah-Hartman wrote: From: Cong Wang [ Upstream commit ad0f75e5f57ccbceec13274e1e242f2b5a6397ed ] When we clone a socket in sk_clone_lock(), its

Re: [PATCH 4.19 016/133] cgroup: fix cgroup_sk_alloc() for sk_clone_lock()

2020-08-13 Thread Yang Yingliang
Hi, On 2020/7/20 23:36, Greg Kroah-Hartman wrote: From: Cong Wang [ Upstream commit ad0f75e5f57ccbceec13274e1e242f2b5a6397ed ] When we clone a socket in sk_clone_lock(), its sk_cgrp_data is copied, so the cgroup refcnt must be taken too. And, unlike the sk_alloc() path, sock_update_netprioidx

[PATCH -next] sysctl: fix memleak in proc_sys_call_handler()

2020-08-04 Thread Yang Yingliang
02>] do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 [<b7d61f44>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Go to free buff when copy_from_iter_full() is failed. Fixes: 1dea05cbc0d7 ("sysctl: Convert to iter interfaces") Reported-by: Hulk Robot Signed-off-by: Yang Yingl

Re: [PATCH] vgacon: Fix an out-of-bounds in vgacon_scrollback_update()

2020-07-30 Thread Yang Yingliang
On 2020/7/30 19:04, Jiri Slaby wrote: On 13. 07. 20, 12:57, Yang Yingliang wrote: I got a slab-out-of-bounds report when I doing fuzz test. [ 334.989515] == [ 334.989577] BUG: KASAN: slab-out-of-bounds in vgacon_scroll+0x57a

Re: [PATCH] serial: 8250: fix null-ptr-deref in serial8250_start_tx()

2020-07-21 Thread Yang Yingliang
On 2020/7/21 19:54, Yang Yingliang wrote: On 2020/7/21 18:48, Greg KH wrote: On Tue, Jul 21, 2020 at 02:38:52PM +, Yang Yingliang wrote: I got null-ptr-deref in serial8250_start_tx(): [   78.114630] Unable to handle kernel NULL pointer dereference at virtual address

Re: [PATCH] serial: 8250: fix null-ptr-deref in serial8250_start_tx()

2020-07-21 Thread Yang Yingliang
On 2020/7/21 18:48, Greg KH wrote: On Tue, Jul 21, 2020 at 02:38:52PM +, Yang Yingliang wrote: I got null-ptr-deref in serial8250_start_tx(): [ 78.114630] Unable to handle kernel NULL pointer dereference at virtual address [ 78.123778] Mem abort info: [ 78.126560

  1   2   3   >