[PATCH] rtc: mc13xxx: fix a double-unlock issue

2020-05-02 Thread wu000273
From: Qiushi Wu In function mc13xxx_rtc_probe, the mc13xxx_unlock() is called before rtc_register_device(). But in the error path of rtc_register_device(), the mc13xxx_unlock() is called again, which causes a double-unlock problem. To fix this problem, we need to call mc13xxx_lock() again in this

[PATCH] power: supply: fix memory leaks

2020-05-02 Thread wu000273
From: Qiushi Wu In function power_supply_add_hwmon_sysfs(), psyhw->props is allocated by bitmap_zalloc(). But this pointer is not deallocated in several error paths, which lead to memory leak bugs. To fix this, we can call bitmap_free() to free this pointer. Signed-off-by: Qiushi Wu --- driver

[PATCH] nfp: abm: fix a memory leak bug

2020-05-02 Thread wu000273
From: Qiushi Wu In function nfp_abm_vnic_set_mac, pointer nsp is allocated by nfp_nsp_open. But when nfp_nsp_has_hwinfo_lookup fail, the pointer is not released, which can lead to a memory leak bug. Fix this issue by adding nfp_nsp_close(nsp) in the error path. Signed-off-by: Qiushi Wu --- dri

[PATCH] power: supply: fix memory leaks (v2)

2020-05-02 Thread wu000273
From: Qiushi Wu In function power_supply_add_hwmon_sysfs(), psyhw->props is allocated by bitmap_zalloc(). But this pointer is not deallocated when devm_add_action fail, which lead to a memory leak bug. To fix this, we replace devm_add_action with devm_add_action_or_reset. v2: - Prevent introd

[PATCH v2] rtc: mc13xxx: fix a double-unlock issue

2020-05-03 Thread wu000273
From: Qiushi Wu In function mc13xxx_rtc_probe, the mc13xxx_unlock() is called before rtc_register_device(). But in the error path of rtc_register_device(), the mc13xxx_unlock() is called again, which causes a double-unlock problem. Thus add a call of the function “mc13xxx_lock” in an if branch fo

[PATCH v2] nfp: abm: Fix incomplete release of system resources in nfp_abm_vnic_set_mac()

2020-05-03 Thread wu000273
From: Qiushi Wu In function nfp_abm_vnic_set_mac, pointer nsp is allocated by nfp_nsp_open. But when nfp_nsp_has_hwinfo_lookup fail, the pointer is not released, which can lead to a memory leak bug. Thus add a call of the function “nfp_nsp_close” for the completion of the exception handling. Fix

[PATCH v3] nfp: abm: Fix incomplete release of system resources in nfp_abm_vnic_set_mac()

2020-05-03 Thread wu000273
From: Qiushi Wu In function nfp_abm_vnic_set_mac, pointer nsp is allocated by nfp_nsp_open. But when nfp_nsp_has_hwinfo_lookup fail, the pointer is not released, which can lead to a memory leak bug. Thus add a call of the function “nfp_nsp_close” for the completion of the exception handling. Fix

[PATCH V2] PCI: qcom: Improve exception handling in qcom_pcie_probe().

2020-05-26 Thread wu000273
From: Qiushi Wu This function contained improvable implementation details according to exception handling. 1. pm_runtime_put() should be called after pm_runtime_get_sync() failed, because the reference count will be increased despite of the failure. Thus add the missed function call. 2. pm_runtim

[PATCH] nilfs2: Fix reference count leak in nilfs_sysfs_create_snapshot_group.

2020-05-27 Thread wu000273
From: Qiushi Wu kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Previous commit "b8eb718348b8" fixed a similar problem. Fixes: a5a7332a291b ("nilfs2: add /sys/f

[PATCH] nilfs2: Fix reference count leak in nilfs_sysfs_create_device_group

2020-05-27 Thread wu000273
From: Qiushi Wu kobject_init_and_add() takes reference even when it fails. In nilfs_sysfs_create_device_group(), the memory allocated by kobject_init_and_add() is not freed when kobject_init_and_add() fails. Thus replace the jump target "free_dev_subgroups" by "cleanup_dev_kobject". Fixes: da714

[PATCH] iommu: Fix reference count leak in iommu_group_alloc.

2020-05-27 Thread wu000273
From: Qiushi Wu kobject_init_and_add() takes reference even when it fails. Thus, when kobject_init_and_add() returns an error, kobject_put() must be called to properly clean up the kobject. Fixes: d72e31c93746 ("iommu: IOMMU Groups") Signed-off-by: Qiushi Wu --- drivers/iommu/iommu.c | 2 +- 1

[PATCH] lightnvm: pblk: Fix reference count leak in pblk_sysfs_init.

2020-05-27 Thread wu000273
From: Qiushi Wu kobject_init_and_add() takes reference even when it fails. Thus, when kobject_init_and_add() returns an error, kobject_put() must be called to properly clean up the kobject. Fixes: a4bd217b4326 ("lightnvm: physical block device (pblk) target") Signed-off-by: Qiushi Wu --- drive

[PATCH] ACPI: sysfs: Fix reference count leak in acpi_sysfs_add_hotplug_profile.

2020-05-27 Thread wu000273
From: Qiushi Wu kobject_init_and_add() takes reference even when it fails. Thus, when kobject_init_and_add() returns an error, kobject_put() must be called to properly clean up the kobject. Fixes: 3f8055c35836 ("ACPI / hotplug: Introduce user space interface for hotplug profiles") Signed-off-by

[PATCH] ACPI: CPPC: Fix reference count leak in acpi_cppc_processor_probe.

2020-05-27 Thread wu000273
From: Qiushi Wu kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Previous commit "b8eb718348b8" fixed a similar problem. Fixes: 158c998ea44b ("ACPI / CPPC: add sy

[PATCH V2] nilfs2: Fix reference count leak in nilfs_sysfs_create_device_group

2020-05-27 Thread wu000273
From: Qiushi Wu kobject_init_and_add() takes reference even when it fails. In nilfs_sysfs_create_device_group(), the memory allocated by kobject_init_and_add() is not freed when kobject_init_and_add() fails. Fix this issue by calling kobject_put() to clean up the kobject. Fixes: da7141fb78db ("n

[PATCH] vfio/mdev: Fix reference count leak in add_mdev_supported_type.

2020-05-27 Thread wu000273
From: Qiushi Wu kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Thus, replace kfree() by kobject_put() to fix this issue. Previous commit "b8eb718348b8" fixed a s

[PATCH] Fix reference count leak in pci_create_slot

2020-05-27 Thread wu000273
From: Qiushi Wu kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Thus, when call of kobject_init_and_add() fail, we should call kobject_put() instead of kfree(). P

[PATCH] RDMA/qib: Fix several reference count leak qib_create_port_files

2020-05-27 Thread wu000273
From: Qiushi Wu kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. To fix these issues, we correct the jump targets when the calls of kobject_init_and_add() fail, to

[PATCH] RDMA/core: Fix several reference count leaks.

2020-05-27 Thread wu000273
From: Qiushi Wu kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Previous commit "b8eb718348b8" fixed a similar problem. Signed-off-by: Qiushi Wu --- drivers/in

[PATCH] bonding: Fix reference count leak in bond_sysfs_slave_add.

2020-05-27 Thread wu000273
From: Qiushi Wu kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Previous commit "b8eb718348b8" fixed a similar problem. Fixes: 07699f9a7c8d ("bonding: add sysfs

[PATCH] firmware: Fix a reference count leak.

2020-06-13 Thread wu000273
From: Qiushi Wu kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Callback function fw_cfg_sysfs_release_entry() in kobject_put() can handle the pointer "entry" pro

[PATCH] edd: Fix a reference count leak.

2020-06-13 Thread wu000273
From: Qiushi Wu kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Fixes: dd002e807486 ("Kobject: change drivers/firmware/edd.c to use kobject_init_and_add") Signe

[PATCH] firmware: dmi: Fix reference count leaks.

2020-06-13 Thread wu000273
From: Qiushi Wu kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Callback function dmi_sysfs_entry_release() in kobject_put() can handle the pointer "entry" proper

[PATCH] drm/amdkfd: Fix reference count leaks.

2020-06-13 Thread wu000273
From: Qiushi Wu kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Signed-off-by: Qiushi Wu --- drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 20 +++

[PATCH] ASoC: tegra: Fix reference count leaks.

2020-06-13 Thread wu000273
From: Qiushi Wu Calling pm_runtime_get_sync increments the counter even in case of failure, causing incorrect ref count if pm_runtime_put is not called in error handling paths. Call pm_runtime_put if pm_runtime_get_sync fails. Signed-off-by: Qiushi Wu --- sound/soc/tegra/tegra30_ahub.c | 4 +++

[PATCH] ASoC: rockchip: Fix a reference count leak.

2020-06-13 Thread wu000273
From: Qiushi Wu Calling pm_runtime_get_sync increments the counter even in case of failure, causing incorrect ref count if pm_runtime_put is not called in error handling paths. Call pm_runtime_put if pm_runtime_get_sync fails. Fixes: fc05a5b22253 ("ASoC: rockchip: add support for pdm controller"

[PATCH] char: hw_random: Fix a reference count leak.

2020-06-13 Thread wu000273
From: Qiushi Wu Calling pm_runtime_get_sync increments the counter even in case of failure, causing incorrect ref count if pm_runtime_put_sync is not called in error handling paths. Thus replace the jump target "err_pm_get" by "err_clock". Fixes: 6cd225cc5d8a ("hwrng: exynos - add Samsung Exynos

[PATCH] i2c: xiic: Fix reference count leaks.

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. Thus call pm_runtime_put_noidle() if pm_runtime_get_sync() fails. Fixes: 36ecbcab84d0 ("i2c: xiic: Implement power management") Signed-off-by: Qiushi Wu --- drivers/i2c/busses/i2c-

[PATCH] i2c: busses: Fix a reference count leak.

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. Thus call pm_runtime_put_noidle() if pm_runtime_get_sync() fails. Fixes: 13d6eb20fc79 ("i2c: imx-lpi2c: add runtime pm support") Signed-off-by: Qiushi Wu --- drivers/i2c/busses/i2c

[PATCH] i2c: busses: Fix reference count leaks.

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. Thus call pm_runtime_put_noidle() if pm_runtime_get_sync() fails. Signed-off-by: Qiushi Wu --- drivers/i2c/busses/i2c-img-scb.c | 8 ++-- 1 file changed, 6 insertions(+), 2 del

[PATCH] media: rcar-vin: Fix a reference count leak.

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. Thus call pm_runtime_put_noidle() if pm_runtime_get_sync() fails. Fixes: 90dedce9bc54 ("media: rcar-vin: add function to manipulate Gen3 chsel value") Signed-off-by: Qiushi Wu ---

[PATCH] media: rcar-vin: Fix a reference count leak.

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. Thus call pm_runtime_put_noidle() if pm_runtime_get_sync() fails. Fixes: 2a18fbec1dab ("media: rcar-vin: Move pm_runtime_{get,put} out of helpers") Signed-off-by: Qiushi Wu --- dr

[PATCH] media: mtk-jpeg: Fix a reference count leak.

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. Thus call pm_runtime_put_noidle() if pm_runtime_get_sync() fails. Fixes: b2f0d2724ba4 ("[media] vcodec: mediatek: Add Mediatek JPEG Decoder Driver") Signed-off-by: Qiushi Wu --- d

[PATCH] media: rockchip/rga: Fix a reference count leak.

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. Thus call pm_runtime_put_noidle() if pm_runtime_get_sync() fails. Fixes: f7e7b48e6d79 ("[media] rockchip/rga: v4l2 m2m support") Signed-off-by: Qiushi Wu --- drivers/media/platform

[PATCH] media: platform: fcp: Fix a reference count leak.

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. Fixes: 6eaafbdb668b ("

[PATCH] media: vsp1: Fix a reference count leak.

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. Fixes: 1e6af546ee66 ("

[PATCH] media: camss: Fix a reference count leak.

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 is not called in error handling paths. Thus call pm_runtime_put_sync() if pm_runtime_get_sync() fails. Fixes: 02afa816dbbf ("media: cams

[PATCH] media: camss: Fix a reference count leak.

2020-06-13 Thread wu000273
From: Qiushi Wu Calling pm_runtime_get_sync increments the counter even in case of failure, causing incorrect ref count if pm_runtime_put_sync is not called in error handling paths. Thus replace the jump target "error_pm_runtime_get" by "err_clocks". Fixes: 02afa816dbbf ("media: camss: Add basic

[PATCH] media: s5p-mfc: Fix a reference count leak

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. Fixes: c5086f130a77 ("

[PATCH] media: stm32-dcmi: Fix a reference count leak

2020-06-13 Thread wu000273
From: Qiushi Wu Calling pm_runtime_get_sync increments the counter even in case of failure, causing incorrect ref count if pm_runtime_put is not called in error handling paths. Thus replace the jump target "err_release_buffers" by "err_pm_putw". Fixes: 152e0bf60219 ("media: stm32-dcmi: add power

[PATCH] media: ti-vpe: Fix a missing check and reference count leak

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. And also, when the call of function vpe_runtime_get() failed, we won't call vpe_runtime_p

[PATCH] media: exynos4-is: Fix a reference count leak

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] media: exynos4-is: Fix a reference count leak due to pm_runtime_get_sync

2020-06-13 Thread wu000273
From: Qiushi Wu 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: Qiushi Wu --- drivers/media/platform/exynos4-is/media-dev.c | 4 +++- 1 file changed, 3 insertions(+),

[PATCH] media: exynos4-is: Fix several reference count leaks due to pm_runtime_get_sync

2020-06-13 Thread wu000273
From: Qiushi Wu 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: Qiushi Wu --- drivers/media/platform/exynos4-is/fimc-isp.c | 4 +++- drivers/media/platform/exynos4-i

[PATCH] media: sti: Fix reference count leaks

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] ASoC: img-parallel-out: Fix a reference count leak

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] 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] cpuidle: Fix several reference count leaks.

2020-05-28 Thread wu000273
From: Qiushi Wu kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Previous commit "b8eb718348b8" fixed a similar problem. Signed-off-by: Qiushi Wu --- drivers/cp

[PATCH] efi/esrt: Fix reference count leak in esre_create_sysfs_entry.

2020-05-28 Thread wu000273
From: Qiushi Wu kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Previous commit "b8eb718348b8" fixed a similar problem. Fixes: 0bb549052d33 ("efi: Add esrt suppo

[PATCH] efi: Fix reference count leak in efivar_create_sysfs_entry.

2020-05-28 Thread wu000273
From: Qiushi Wu kobject_init_and_add() should be handled when it return an error, because kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Previous commit "b8eb718

[PATCH] omapfb: Fix reference count leak in display_init_sysfs.

2020-05-28 Thread wu000273
From: Qiushi Wu kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Because function omap_dss_put_device() doesn't handle dssdev->kobj, thus we need insert kobject_pu

[PATCH] scsi: Fix reference count leak in iscsi_boot_create_kobj.

2020-05-28 Thread wu000273
From: Qiushi Wu kobject_init_and_add() should be handled when it return an error, because kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Previous commit "b8eb718

[PATCH] edac: Fix reference count leak in edac_pci_main_kobj_setup.

2020-05-28 Thread wu000273
From: Qiushi Wu kobject_init_and_add() should be handled when it return an error, because kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Previous commit "b8eb718

[PATCH] edac: Fix reference count leak in edac_device_register_sysfs_main_kobj.

2020-05-28 Thread wu000273
From: Qiushi Wu kobject_init_and_add() should be handled when it return an error, because kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Previous commit "b8eb718

[PATCH] PCI: qcom: fix several error-hanlding problem.

2020-05-25 Thread wu000273
From: Qiushi Wu In function qcom_pcie_probe(), there are several error-handling problem. 1. pm_runtime_put() should be called after pm_runtime_get_sync() failed, because refcount will be increased even pm_runtime_get_sync() returns an error. 2. pm_runtime_disable() are called twice, after the ca

[PATCH] rxrpc: fix a memory leak bug.

2020-05-21 Thread wu000273
From: Qiushi Wu In function rxkad_verify_response(), pointer "ticket" is not released, when function rxkad_decrypt_ticket() returns an error, causing a memory leak bug. Fixes: 8c2f826dc3631 ("rxrpc: Don't put crypto buffers on the stack") Signed-off-by: Qiushi Wu --- net/rxrpc/rxkad.c | 3 +--

[PATCH] net/mlx4_core: fix a memory leak bug.

2020-05-21 Thread wu000273
From: Qiushi Wu In function mlx4_opreq_action(), pointer "mailbox" is not released, when mlx4_cmd_box() return and error, causing a memory leak bug. Fix this issue by going to "out" label, mlx4_free_cmd_mailbox() can free this pointer. Fixes: fe6f700d6cbb7 ("Respond to operation request by firmw

[PATCH] drm/i915: fix a memory leak bug.

2020-05-21 Thread wu000273
From: Qiushi Wu In intel_gtt_setup_scratch_page(), pointer "page" is not released if pci_dma_mapping_error() return an error, leading to a memory leak bug. Fix this issue by freeing "page" before return. Fixes: 0e87d2b06cb46 ("intel-gtt: initialize our own scratch page") Signed-off-by: Qiushi Wu

[PATCH v2] rxrpc: fix a memory leak bug.

2020-05-22 Thread wu000273
From: Qiushi Wu A ticket was not released after a call of the function “rxkad_decrypt_ticket” failed. Thus replace the jump target “temporary_error_free_resp” by “temporary_error_free_ticket”. Fixes: 8c2f826dc3631 ("rxrpc: Don't put crypto buffers on the stack") Signed-off-by: Qiushi Wu --- ne

[PATCH v3] rxrpc: fix a memory leak in rxkad_verify_response().

2020-05-22 Thread wu000273
From: Qiushi Wu A ticket was not released after a call of the function “rxkad_decrypt_ticket” failed. Thus replace the jump target “temporary_error_free_resp” by “temporary_error_free_ticket”. Fixes: 8c2f826dc3631 ("rxrpc: Don't put crypto buffers on the stack") Signed-off-by: Qiushi Wu --- ne

[PATCH v2] net/mlx4_core: fix a memory leak bug.

2020-05-22 Thread wu000273
From: Qiushi Wu In function mlx4_opreq_action(), pointer "mailbox" is not released, when mlx4_cmd_box() return and error, causing a memory leak bug. Fix this issue by going to "out" label, mlx4_free_cmd_mailbox() can free this pointer. Fixes: fe6f700d6cbb ("net/mlx4_core: Respond to operation re

[PATCH] net: sun: fix missing release regions in cas_init_one().

2020-05-22 Thread wu000273
From: Qiushi Wu In cas_init_one(), "pdev" is requested by "pci_request_regions", but it was not released after a call of the function “pci_write_config_byte” failed. Thus replace the jump target “err_write_cacheline” by "err_out_free_res". Fixes: 1f26dac32057 ("[NET]: Add Sun Cassini driver.")

[PATCH] media: s3c-camif: fix missing disable in tegra_adma_probe().

2020-05-22 Thread wu000273
From: Qiushi Wu "pm_runtime_enable()" was not handled by "pm_runtime_disable()" after a call of the function “pm_runtime_get_sync” failed. Thus move the jump target “err_pm” before calling pm_runtime_disable(). Fixes: babde1c243b2 ("[media] V4L: Add driver for S3C24XX/S3C64XX SoC series camera

[PATCH] RDMA: fix missing pci disable in pvrdma_pci_probe()

2020-05-22 Thread wu000273
From: Qiushi Wu In function pvrdma_pci_probe(), pdev was not disabled in one error path. Thus replace the jump target “err_free_device” by "err_disable_pdev". Fixes: 29c8d9eba550 ("IB: Add vmw_pvrdma driver") Signed-off-by: Qiushi Wu --- drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 2 +- 1

[PATCH] platform/chrome: fix a double-unlock issue

2020-05-22 Thread wu000273
From: Qiushi Wu In function cros_ec_ishtp_probe(), "up_write" is already called before function "cros_ec_dev_init". But "up_write" will be called again after the calling of the function "cros_ec_dev_init" failed. Thus add a call of the function “down_write” in this if branch for the completion of

[PATCH] usb: gadget: fix potential double-free in m66592_probe.

2020-05-22 Thread wu000273
From: Qiushi Wu m66592_free_request() is called under label "err_add_udc" and "clean_up", and m66592->ep0_req is not set to NULL after first free, leading to a double-free. Fix this issue by setting m66592->ep0_req to NULL after the first free. Fixes: 0f91349b89f3 ("usb: gadget: convert all user

[PATCH 2/2] orangefs: fix double-unlock issue in service_operation().

2020-05-22 Thread wu000273
From: Qiushi Wu spin_unlock(&op->lock) is called before calling wake_up_interruptible(). But spin_unlock() was called again after a call of the function "wait_for_matching_downcall" failed. Fix this issue by remove the second spin_unlock(). Signed-off-by: Qiushi Wu --- fs/orangefs/waitqueue.c

[PATCH V2] media: s3c-camif: fix missing disable in tegra_adma_probe().

2020-05-23 Thread wu000273
From: Qiushi Wu "pm_runtime_enable()" was not handled by "pm_runtime_disable()" after a call of the function “pm_runtime_get_sync()” failed. Thus move the jump target “err_pm” before calling function "calling pm_runtime_disable()". Fixes: babde1c243b2 ("[media] V4L: Add driver for S3C24XX/S3C64

[PATCH] treewide: fix incomplete error-handling in img_i2s_in_probe.

2020-05-24 Thread wu000273
From: Qiushi Wu Function "pm_runtime_get_sync()" is not handled by "pm_runtime_put()" if "PTR_ERR(rst) == -EPROBE_DEFER". Fix this issue by adding "pm_runtime_put()" into this error path. Fixes: f65bb92ca12e ("ASoC: img-i2s-in: Add runtime PM") Signed-off-by: Qiushi Wu --- sound/soc/img/img-i2

[PATCH] RDMA/core: fix missing release in add_port.

2020-05-24 Thread wu000273
From: Qiushi Wu In function add_port(), pointer p is not released in error paths. Fix this issue by adding a kfree(p) into the end of error path. Signed-off-by: Qiushi Wu --- drivers/infiniband/core/sysfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/core/sysfs.c b/d

[PATCH] qlcnic: fix missing release in qlcnic_83xx_interrupt_test.

2020-05-25 Thread wu000273
From: Qiushi Wu In function qlcnic_83xx_interrupt_test(), function qlcnic_83xx_diag_alloc_res() is not handled by function qlcnic_83xx_diag_free_res() after a call of the function qlcnic_alloc_mbx_args() failed. Fix this issue by adding a jump target "fail_mbx_args", and jump to this new target w

[PATCH] ipmi: code cleanup and prevent potential issue.

2020-06-08 Thread wu000273
From: Qiushi Wu All the previous get/put operations against intf->refcount are inside the mutex. Thus, put the last kref_put() also inside mutex to make sure get/put functions execute in order and prevent the potential race condition. Signed-off-by: Qiushi Wu --- drivers/char/ipmi/ipmi_msghand