patches.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	patches@lists.linux.dev, Sudeep Holla <sudeep.holla@arm.com>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.6 105/129] firmware: arm_ffa: Skip Rx buffer ownership release if not acquired
Date: Wed,  7 May 2025 20:40:41 +0200	[thread overview]
Message-ID: <20250507183817.750780450@linuxfoundation.org> (raw)
In-Reply-To: <20250507183813.500572371@linuxfoundation.org>

6.6-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Sudeep Holla <sudeep.holla@arm.com>

[ Upstream commit 4567bdaaaaa1744da3d7da07d9aca2f941f5b4e5 ]

Completion of the FFA_PARTITION_INFO_GET ABI transfers the ownership of
the caller’s Rx buffer from the producer(typically partition mnager) to
the consumer(this driver/OS). FFA_RX_RELEASE transfers the ownership
from the consumer back to the producer.

However, when we set the flag to just return the count of partitions
deployed in the system corresponding to the specified UUID while
invoking FFA_PARTITION_INFO_GET, the Rx buffer ownership shouldn't be
transferred to this driver. We must be able to skip transferring back
the ownership to the partition manager when we request just to get the
count of the partitions as the buffers are not acquired in this case.

Firmware may return FFA_RET_DENIED or other error for the ffa_rx_release()
in such cases.

Fixes: bb1be7498500 ("firmware: arm_ffa: Add v1.1 get_partition_info support")
Message-Id: <20250321115700.3525197-1-sudeep.holla@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/firmware/arm_ffa/driver.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
index 7cd6b1564e801..7c2db3f017651 100644
--- a/drivers/firmware/arm_ffa/driver.c
+++ b/drivers/firmware/arm_ffa/driver.c
@@ -225,7 +225,8 @@ __ffa_partition_info_get(u32 uuid0, u32 uuid1, u32 uuid2, u32 uuid3,
 			memcpy(buffer + idx, drv_info->rx_buffer + idx * sz,
 			       buf_sz);
 
-	ffa_rx_release();
+	if (!(flags & PARTITION_INFO_GET_RETURN_COUNT_ONLY))
+		ffa_rx_release();
 
 	mutex_unlock(&drv_info->rx_lock);
 
-- 
2.39.5




  parent reply	other threads:[~2025-05-07 19:12 UTC|newest]

Thread overview: 135+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-07 18:38 [PATCH 6.6 000/129] 6.6.90-rc1 review Greg Kroah-Hartman
2025-05-07 18:38 ` [PATCH 6.6 001/129] Revert "rndis_host: Flag RNDIS modems as WWAN devices" Greg Kroah-Hartman
2025-05-07 18:38 ` [PATCH 6.6 002/129] ALSA: usb-audio: Add retry on -EPROTO from usb_set_interface() Greg Kroah-Hartman
2025-05-07 18:38 ` [PATCH 6.6 003/129] ALSA: usb-audio: Add second USB ID for Jabra Evolve 65 headset Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 004/129] btrfs: fix COW handling in run_delalloc_nocow() Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 005/129] drm/fdinfo: Protect against driver unbind Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 006/129] drm/nouveau: Fix WARN_ON in nouveau_fence_context_kill() Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 007/129] EDAC/altera: Test the correct error reg offset Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 008/129] EDAC/altera: Set DDR and SDMMC interrupt mask before registration Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 009/129] i2c: imx-lpi2c: Fix clock count when probe defers Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 010/129] arm64: errata: Add missing sentinels to Spectre-BHB MIDR arrays Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 011/129] parisc: Fix double SIGFPE crash Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 012/129] perf/x86/intel: KVM: Mask PEBS_ENABLE loaded for guest with vCPUs value Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 013/129] amd-xgbe: Fix to ensure dependent features are toggled with RX checksum offload Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 014/129] irqchip/qcom-mpm: Prevent crash when trying to handle non-wake GPIOs Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 015/129] mm/memblock: pass size instead of end to memblock_set_node() Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 016/129] mm/memblock: repeat setting reserved region nid if array is doubled Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 017/129] mmc: renesas_sdhi: Fix error handling in renesas_sdhi_probe Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 018/129] spi: tegra114: Dont fail set_cs_timing when delays are zero Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 019/129] tracing: Do not take trace_event_sem in print_event_fields() Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 020/129] wifi: brcm80211: fmac: Add error handling for brcmf_usb_dl_writeimage() Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 021/129] dm-bufio: dont schedule in atomic context Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 022/129] dm-integrity: fix a warning on invalid table line Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 023/129] dm: always update the array size in realloc_argv on success Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 024/129] iommu/amd: Fix potential buffer overflow in parse_ivrs_acpihid Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 025/129] iommu/vt-d: Apply quirk_iommu_igfx for 8086:0044 (QM57/QS57) Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 026/129] platform/x86/amd: pmc: Require at least 2.5 seconds between HW sleep cycles Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 027/129] platform/x86/intel-uncore-freq: Fix missing uncore sysfs during CPU hotplug Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 028/129] ksmbd: fix use-after-free in kerberos authentication Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 029/129] smb: client: fix zero length for mkdir POSIX create context Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 030/129] cpufreq: Avoid using inconsistent policy->min and policy->max Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 031/129] cpufreq: Fix setting policy limits when frequency tables are used Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 032/129] tracing: Fix oob write in trace_seq_to_buffer() Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 033/129] bpf: add find_containing_subprog() utility function Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 034/129] bpf: refactor bpf_helper_changes_pkt_data to use helper number Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 035/129] bpf: track changes_pkt_data property for global functions Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 036/129] selftests/bpf: test for changing packet data from " Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 037/129] bpf: check changes_pkt_data property for extension programs Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 038/129] selftests/bpf: freplace tests for tracking of changes_packet_data Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 039/129] bpf: consider that tail calls invalidate packet pointers Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 040/129] selftests/bpf: validate that tail call invalidates " Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 041/129] bpf: fix null dereference when computing changes_pkt_data of prog w/o subprogs Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 042/129] selftests/bpf: extend changes_pkt_data with cases w/o subprograms Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 043/129] Revert "PCI: imx6: Skip controller_id generation logic for i.MX7D" Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 044/129] PCI: imx6: Skip controller_id generation logic for i.MX7D Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 045/129] KVM: x86: Load DR6 with guest value only before entering .vcpu_run() loop Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 046/129] iommu: Handle race with default domain setup Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 047/129] ASoC: soc-pcm: Fix hw_params() and DAPM widget sequence Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 048/129] book3s64/radix : Align section vmemmap start address to PAGE_SIZE Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 049/129] powerpc/boot: Check for ld-option support Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 050/129] drm/i915/pxp: fix undefined reference to `intel_pxp_gsccs_is_ready_for_sessions Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 051/129] wifi: plfxlc: Remove erroneous assert in plfxlc_mac_release Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 052/129] powerpc/boot: Fix dash warning Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 053/129] vxlan: vnifilter: Fix unlocked deletion of default FDB entry Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 054/129] net/mlx5: E-Switch, Initialize MAC Address for Default GID Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 055/129] net/mlx5: E-switch, Fix error handling for enabling roce Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 056/129] Bluetooth: btusb: avoid NULL pointer dereference in skb_dequeue() Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 057/129] net: Rename mono_delivery_time to tstamp_type for scalabilty Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 058/129] Bluetooth: L2CAP: copy RX timestamp to new fragments Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 059/129] net: mscc: ocelot: treat 802.1ad tagged traffic as 802.1Q-untagged Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 060/129] net: mscc: ocelot: delete PVID VLAN when readding it as non-PVID Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 061/129] net: ethernet: mtk-star-emac: fix spinlock recursion issues on rx/tx poll Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 062/129] net: ethernet: mtk-star-emac: rearm interrupts in rx_poll only when advised Greg Kroah-Hartman
2025-05-07 18:39 ` [PATCH 6.6 063/129] pds_core: check health in devcmd wait Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 064/129] pds_core: delete VF dev on reset Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 065/129] pds_core: make pdsc_auxbus_dev_del() void Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 066/129] pds_core: specify auxiliary_device to be created Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 067/129] pds_core: remove write-after-free of client_id Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 068/129] net_sched: drr: Fix double list add in class with netem as child qdisc Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 069/129] net_sched: hfsc: Fix a UAF vulnerability " Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 070/129] net_sched: ets: Fix double list add " Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 071/129] net_sched: qfq: " Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 072/129] ice: Check VF VSI Pointer Value in ice_vc_add_fdir_fltr() Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 073/129] ALSA: ump: Fix buffer overflow at UMP SysEx message conversion Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 074/129] nvme-pci: fix queue unquiesce check on slot_reset Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 075/129] net: dlink: Correct endianness handling of led_mode Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 076/129] net: mdio: mux-meson-gxl: set reversed bit when using internal phy Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 077/129] igc: fix lock order in igc_ptp_reset Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 078/129] net: ethernet: mtk_eth_soc: fix SER panic with 4GB+ RAM Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 079/129] net: dsa: felix: fix broken taprio gate states after clock jump Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 080/129] net: ipv6: fix UDPv6 GSO segmentation with NAT Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 081/129] bnxt_en: Fix coredump logic to free allocated buffer Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 082/129] bnxt_en: Fix out-of-bound memcpy() during ethtool -w Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 083/129] bnxt_en: Fix ethtool -d byte order for 32-bit values Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 084/129] nvme-tcp: fix premature queue removal and I/O failover Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 085/129] net: lan743x: Fix memleak issue when GSO enabled Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 086/129] net: fec: ERR007885 Workaround for conventional TX Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 087/129] octeon_ep: Fix host hang issue during device reboot Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 088/129] net: hns3: store rx VLAN tag offload state for VF Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 089/129] net: hns3: fix an interrupt residual problem Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 090/129] net: hns3: fixed debugfs tm_qset size Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 091/129] net: hns3: defer calling ptp_clock_register() Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 092/129] net: vertexcom: mse102x: Fix possible stuck of SPI interrupt Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 093/129] net: vertexcom: mse102x: Fix LEN_MASK Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 094/129] net: vertexcom: mse102x: Add range check for CMD_RTS Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 095/129] net: vertexcom: mse102x: Fix RX error handling Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 096/129] ASoC: Use of_property_read_bool() Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 097/129] ASoC: soc-core: Stop using of_property_read_bool() for non-boolean properties Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 098/129] riscv: Pass patch_text() the length in bytes Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 099/129] sch_htb: make htb_qlen_notify() idempotent Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 100/129] sch_drr: make drr_qlen_notify() idempotent Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 101/129] sch_hfsc: make hfsc_qlen_notify() idempotent Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 102/129] sch_qfq: make qfq_qlen_notify() idempotent Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 103/129] sch_ets: make est_qlen_notify() idempotent Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 104/129] firmware: arm_scmi: Balance device refcount when destroying devices Greg Kroah-Hartman
2025-05-07 18:40 ` Greg Kroah-Hartman [this message]
2025-05-07 18:40 ` [PATCH 6.6 106/129] ARM: dts: opos6ul: add ksz8081 phy properties Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 107/129] arm64: dts: st: Adjust interrupt-controller for stm32mp25 SoCs Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 108/129] arm64: dts: st: Use 128kB size for aliased GIC400 register access on " Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 109/129] Revert "drm/meson: vclk: fix calculation of 59.94 fractional rates" Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 110/129] xhci: Set DESI bits in ERDP register correctly Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 111/129] xhci: Use more than one Event Ring segment Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 112/129] xhci: Clean up stale comment on ERST_SIZE macro Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 113/129] xhci: split free interrupter into separate remove and free parts Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 114/129] xhci: add support to allocate several interrupters Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 115/129] xhci: Add helper to set an interrupters interrupt moderation interval Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 116/129] usb: xhci: check if requested segments exceeds ERST capacity Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 117/129] xhci: support setting interrupt moderation IMOD for secondary interrupters Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 118/129] xhci: Limit time spent with xHC interrupts disabled during bus resume Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 119/129] memcg: drain obj stock on cpu hotplug teardown Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 120/129] riscv: uprobes: Add missing fence.i after building the XOL buffer Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 121/129] kernel: param: rename locate_module_kobject Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 122/129] kernel: globalize lookup_or_create_module_kobject() Greg Kroah-Hartman
2025-05-07 18:40 ` [PATCH 6.6 123/129] drivers: base: handle module_kobject creation Greg Kroah-Hartman
2025-05-07 18:41 ` [PATCH 6.6 124/129] iommu/arm-smmu-v3: Use the new rb tree helpers Greg Kroah-Hartman
2025-05-07 18:41 ` [PATCH 6.6 125/129] iommu/arm-smmu-v3: Fix iommu_device_probe bug due to duplicated stream ids Greg Kroah-Hartman
2025-05-07 18:41 ` [PATCH 6.6 126/129] drm/amd/display: Add scoped mutexes for amdgpu_dm_dhcp Greg Kroah-Hartman
2025-05-07 18:41 ` [PATCH 6.6 127/129] drm/amd/display: Fix slab-use-after-free in hdcp Greg Kroah-Hartman
2025-05-07 18:41 ` [PATCH 6.6 128/129] usb: xhci: Check for xhci->interrupters being allocated in xhci_mem_clearup() Greg Kroah-Hartman
2025-05-07 18:41 ` [PATCH 6.6 129/129] xhci: fix possible null pointer dereference at secondary interrupter removal Greg Kroah-Hartman
2025-05-08  7:19 ` [PATCH 6.6 000/129] 6.6.90-rc1 review Nam Cao
2025-05-08  9:45 ` Jon Hunter
2025-05-08 13:14 ` Miguel Ojeda
2025-05-08 14:53 ` Shuah Khan
2025-05-08 20:11 ` Florian Fainelli

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=20250507183817.750780450@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=patches@lists.linux.dev \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=sudeep.holla@arm.com \
    /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).