stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Dinghao Liu <dinghao.liu@zju.edu.cn>,
	"David S. Miller" <davem@davemloft.net>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 5.4 040/132] NFC: st95hf: Fix memleak in st95hf_in_send_cmd
Date: Tue, 15 Sep 2020 16:12:22 +0200	[thread overview]
Message-ID: <20200915140646.128661704@linuxfoundation.org> (raw)
In-Reply-To: <20200915140644.037604909@linuxfoundation.org>

From: Dinghao Liu <dinghao.liu@zju.edu.cn>

[ Upstream commit f97c04c316d8fea16dca449fdfbe101fbdfee6a2 ]

When down_killable() fails, skb_resp should be freed
just like when st95hf_spi_send() fails.

Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/nfc/st95hf/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nfc/st95hf/core.c b/drivers/nfc/st95hf/core.c
index 9642971e89cea..4578547659839 100644
--- a/drivers/nfc/st95hf/core.c
+++ b/drivers/nfc/st95hf/core.c
@@ -966,7 +966,7 @@ static int st95hf_in_send_cmd(struct nfc_digital_dev *ddev,
 	rc = down_killable(&stcontext->exchange_lock);
 	if (rc) {
 		WARN(1, "Semaphore is not found up in st95hf_in_send_cmd\n");
-		return rc;
+		goto free_skb_resp;
 	}
 
 	rc = st95hf_spi_send(&stcontext->spicontext, skb->data,
-- 
2.25.1




  parent reply	other threads:[~2020-09-15 14:27 UTC|newest]

Thread overview: 139+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-15 14:11 [PATCH 5.4 000/132] 5.4.66-rc1 review Greg Kroah-Hartman
2020-09-15 14:11 ` [PATCH 5.4 001/132] ARM: dts: logicpd-torpedo-baseboard: Fix broken audio Greg Kroah-Hartman
2020-09-15 14:11 ` [PATCH 5.4 002/132] ARM: dts: logicpd-som-lv-baseboard: " Greg Kroah-Hartman
2020-09-15 14:11 ` [PATCH 5.4 003/132] ARM: dts: logicpd-som-lv-baseboard: Fix missing video Greg Kroah-Hartman
2020-09-15 14:11 ` [PATCH 5.4 004/132] regulator: push allocation in regulator_ena_gpio_request() out of lock Greg Kroah-Hartman
2020-09-15 14:11 ` [PATCH 5.4 005/132] regulator: remove superfluous lock in regulator_resolve_coupling() Greg Kroah-Hartman
2020-09-15 14:11 ` [PATCH 5.4 006/132] ARM: dts: socfpga: fix register entry for timer3 on Arria10 Greg Kroah-Hartman
2020-09-15 14:11 ` [PATCH 5.4 007/132] selftests/timers: Turn off timeout setting Greg Kroah-Hartman
2020-09-15 14:11 ` [PATCH 5.4 008/132] ARM: dts: ls1021a: fix QuadSPI-memory reg range Greg Kroah-Hartman
2020-09-15 14:11 ` [PATCH 5.4 009/132] ARM: dts: imx7ulp: Correct gpio ranges Greg Kroah-Hartman
2020-09-15 14:11 ` [PATCH 5.4 010/132] RDMA/rxe: Fix memleak in rxe_mem_init_user Greg Kroah-Hartman
2020-09-15 14:11 ` [PATCH 5.4 011/132] RDMA/rxe: Drop pointless checks in rxe_init_ports Greg Kroah-Hartman
2020-09-15 14:11 ` [PATCH 5.4 012/132] RDMA/rxe: Fix panic when calling kmem_cache_create() Greg Kroah-Hartman
2020-09-15 14:11 ` [PATCH 5.4 013/132] RDMA/bnxt_re: Do not report transparent vlan from QP1 Greg Kroah-Hartman
2020-09-15 14:11 ` [PATCH 5.4 014/132] drm/sun4i: add missing put_device() call in sun8i_r40_tcon_tv_set_mux() Greg Kroah-Hartman
2020-09-15 14:11 ` [PATCH 5.4 015/132] arm64: dts: imx8mq: Fix TMU interrupt property Greg Kroah-Hartman
2020-09-15 14:11 ` [PATCH 5.4 016/132] drm/sun4i: Fix dsi dcs long write function Greg Kroah-Hartman
2020-09-15 14:11 ` [PATCH 5.4 017/132] iio: adc: mcp3422: fix locking on error path Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 018/132] scsi: libsas: Set data_dir as DMA_NONE if libata marks qc as NODATA Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 019/132] RDMA/core: Fix reported speed and width Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 020/132] scsi: megaraid_sas: Dont call disable_irq from process IRQ poll Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 021/132] scsi: mpt3sas: Dont call disable_irq from IRQ poll handler Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 022/132] soundwire: fix double free of dangling pointer Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 023/132] drm/sun4i: backend: Support alpha property on lowest plane Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 024/132] drm/sun4i: backend: Disable alpha on the lowest plane on the A20 Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 025/132] mmc: sdhci-acpi: Clear amd_sdhci_host on reset Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 026/132] mmc: sdhci-msm: Add retries when all tuning phases are found valid Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 027/132] spi: stm32: Rate-limit the Communication suspended message Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 028/132] nvme-fabrics: allow to queue requests for live queues Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 029/132] spi: stm32: fix pm_runtime_get_sync() error checking Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 030/132] block: Set same_page to false in __bio_try_merge_page if ret is false Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 031/132] IB/isert: Fix unaligned immediate-data handling Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 032/132] ARM: dts: bcm: HR2: Fixed QSPI compatible string Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 033/132] ARM: dts: NSP: " Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 034/132] ARM: dts: BCM5301X: " Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 035/132] arm64: dts: ns2: " Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 036/132] ARC: HSDK: wireup perf irq Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 037/132] dmaengine: acpi: Put the CSRT table after using it Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 038/132] netfilter: conntrack: allow sctp hearbeat after connection re-use Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 039/132] drivers/net/wan/lapbether: Added needed_tailroom Greg Kroah-Hartman
2020-09-15 14:12 ` Greg Kroah-Hartman [this message]
2020-09-15 14:12 ` [PATCH 5.4 041/132] firestream: Fix memleak in fs_open Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 042/132] ALSA: hda: Fix 2 channel swapping for Tegra Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 043/132] ALSA: hda/tegra: Program WAKEEN register " Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 044/132] drivers/dma/dma-jz4780: Fix race condition between probe and irq handler Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 045/132] net: hns3: Fix for geneve tx checksum bug Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 046/132] xfs: fix off-by-one in inode alloc block reservation calculation Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 047/132] drivers/net/wan/lapbether: Set network_header before transmitting Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 048/132] cfg80211: Adjust 6 GHz frequency to channel conversion Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 049/132] xfs: initialize the shortform attr header padding entry Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 050/132] irqchip/eznps: Fix build error for !ARC700 builds Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 051/132] nvmet-tcp: Fix NULL dereference when a connect data comes in h2cdata pdu Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 052/132] nvme-fabrics: dont check state NVME_CTRL_NEW for request acceptance Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 053/132] nvme: have nvme_wait_freeze_timeout return if it timed out Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 054/132] nvme-tcp: serialize controller teardown sequences Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 055/132] nvme-tcp: fix timeout handler Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 056/132] nvme-tcp: fix reset hang if controller died in the middle of a reset Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 057/132] nvme-rdma: serialize controller teardown sequences Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 058/132] nvme-rdma: fix timeout handler Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 059/132] nvme-rdma: fix reset hang if controller died in the middle of a reset Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 060/132] nvme-pci: cancel nvme device request before disabling Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 061/132] HID: quirks: Set INCREMENT_USAGE_ON_DUPLICATE for all Saitek X52 devices Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 062/132] HID: microsoft: Add rumble support for the 8bitdo SN30 Pro+ controller Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 063/132] drivers/net/wan/hdlc_cisco: Add hard_header_len Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 064/132] HID: elan: Fix memleak in elan_input_configured Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 065/132] ARC: [plat-hsdk]: Switch ethernet phy-mode to rgmii-id Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 066/132] cpufreq: intel_pstate: Refuse to turn off with HWP enabled Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 067/132] cpufreq: intel_pstate: Fix intel_pstate_get_hwp_max() for turbo disabled Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 068/132] arm64/module: set trampoline section flags regardless of CONFIG_DYNAMIC_FTRACE Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 069/132] ALSA: hda: hdmi - add Rocketlake support Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 070/132] ALSA: hda: fix a runtime pm issue in SOF when integrated GPU is disabled Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 071/132] drm/amdgpu: Fix bug in reporting voltage for CIK Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 072/132] iommu/amd: Do not use IOMMUv2 functionality when SME is active Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 073/132] gcov: Disable gcov build with GCC 10 Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 074/132] iio: adc: mcp3422: fix locking scope Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 075/132] iio: adc: ti-ads1015: fix conversion when CONFIG_PM is not set Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 076/132] iio: cros_ec: Set Gyroscope default frequency to 25Hz Greg Kroah-Hartman
2020-09-15 14:12 ` [PATCH 5.4 077/132] iio:light:ltr501 Fix timestamp alignment issue Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 078/132] iio:proximity:mb1232: Fix timestamp alignment and prevent data leak Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 079/132] iio:accel:bmc150-accel: " Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 080/132] iio:adc:ti-adc084s021 Fix alignment and data leak issues Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 081/132] iio:adc:ina2xx Fix timestamp alignment issue Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 082/132] iio:adc:max1118 Fix alignment of timestamp and data leak issues Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 083/132] iio:adc:ti-adc081c Fix alignment " Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 084/132] iio:magnetometer:ak8975 " Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 085/132] iio:light:max44000 Fix timestamp alignment and prevent data leak Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 086/132] iio:chemical:ccs811: " Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 087/132] iio: accel: kxsd9: Fix alignment of local buffer Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 088/132] iio:accel:mma7455: Fix timestamp alignment and prevent data leak Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 089/132] iio:accel:mma8452: " Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 090/132] staging: wlan-ng: fix out of bounds read in prism2sta_probe_usb() Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 091/132] btrfs: require only sector size alignment for parent eb bytenr Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 092/132] btrfs: fix lockdep splat in add_missing_dev Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 093/132] btrfs: fix wrong address when faulting in pages in the search ioctl Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 094/132] firmware_loader: fix memory leak for paged buffer Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 095/132] kobject: Restore old behaviour of kobject_del(NULL) Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 096/132] regulator: push allocation in regulator_init_coupling() outside of lock Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 097/132] regulator: push allocations in create_regulator() " Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 098/132] regulator: push allocation in set_consumer_device_supply() out " Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 099/132] regulator: plug of_node leak in regulator_register()s error path Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 100/132] regulator: core: Fix slab-out-of-bounds in regulator_unlock_recursive() Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 101/132] scsi: target: iscsi: Fix data digest calculation Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 102/132] scsi: target: iscsi: Fix hang in iscsit_access_np() when getting tpg->np_login_sem Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 103/132] drm/i915/gvt: do not check len & max_len for lri Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 104/132] drm/tve200: Stabilize enable/disable Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 105/132] drm/msm: Split the a5xx preemption record Greg Kroah-Hartman
2020-09-15 15:54   ` Jordan Crouse
2020-09-15 16:39     ` Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 106/132] drm/msm: Disable preemption on all 5xx targets Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 107/132] mmc: sdio: Use mmc_pre_req() / mmc_post_req() Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 108/132] mmc: sdhci-of-esdhc: Dont walk device-tree on every interrupt Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 109/132] rbd: require global CAP_SYS_ADMIN for mapping and unmapping Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 110/132] RDMA/rxe: Fix the parent sysfs read when the interface has 15 chars Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 111/132] RDMA/mlx4: Read pkey table length instead of hardcoded value Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 112/132] fbcon: remove soft scrollback code Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 113/132] fbcon: remove now unusued softback_lines cursor() argument Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 114/132] vgacon: remove software scrollback support Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 115/132] KVM: VMX: Dont freeze guest when event delivery causes an APIC-access exit Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 116/132] KVM: arm64: Do not try to map PUDs when they are folded into PMD Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 117/132] KVM: fix memory leak in kvm_io_bus_unregister_dev() Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 118/132] debugfs: Fix module state check condition Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 119/132] ARM: dts: vfxxx: Add syscon compatible with OCOTP Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 120/132] video: fbdev: fix OOB read in vga_8planes_imageblit() Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 121/132] staging: greybus: audio: fix uninitialized value issue Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 122/132] phy: qcom-qmp: Use correct values for ipq8074 PCIe Gen2 PHY init Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 123/132] usb: core: fix slab-out-of-bounds Read in read_descriptors Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 124/132] USB: serial: ftdi_sio: add IDs for Xsens Mti USB converter Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 125/132] USB: serial: option: support dynamic Quectel USB compositions Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 126/132] USB: serial: option: add support for SIM7070/SIM7080/SIM7090 modules Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 127/132] usb: Fix out of sync data toggle if a configured device is reconfigured Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 128/132] usb: typec: ucsi: acpi: Check the _DEP dependencies Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 129/132] drm/msm/gpu: make ringbuffer readonly Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 130/132] drm/msm/a6xx: update a6xx_hw_init for A640 and A650 Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 131/132] drm/msm: Enable expanded apriv support for a650 Greg Kroah-Hartman
2020-09-15 16:03   ` Jordan Crouse
2020-09-15 16:41     ` Greg Kroah-Hartman
2020-09-15 14:13 ` [PATCH 5.4 132/132] drm/msm: Disable the RPTR shadow Greg Kroah-Hartman
2020-09-15 14:44 ` [PATCH 5.4 000/132] 5.4.66-rc1 review Naresh Kamboju
2020-09-15 16:40   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200915140646.128661704@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=davem@davemloft.net \
    --cc=dinghao.liu@zju.edu.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).