Arm FF-A fix for v6.15

A fix that addresses incorrect release of Rx buffer ownership in the
 driver. The fix specificially avoids releasing Rx buffer ownership with
 FFA_RX_RELEASE if it wasn’t acquired during a FFA_PARTITION_INFO_GET call
 that only requested the partition count. This prevents unnecessary errors
 like FFA_RET_DENIED from firmware when buffers are not actually owned by
 the driver.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEunHlEgbzHrJD3ZPhAEG6vDF+4pgFAmf3xDIACgkQAEG6vDF+
 4ph+YRAAu+EXYDSopYHSjmFQ+pY7KUncSE4sG2MPJL06jPO6ldaQ71amQkxm7bW3
 KyqXaMBX1mlyHH6RSIY1/cIM3D0a3ubfbS6pjVpz9z5ZteNyYob5MGtE7eho6Swa
 pVa/OuNEfF6lXKb8O1eY1xHWGTs/573bVnvqfqKtZnIjNiYAo+pHJzEv+m53U9oF
 l0HoaSC6BNgPnVtFdd0z6fCOcCjw9DCluo5j9cvdMGsG6pG+F3mn4iT+7P6uvcFl
 XFhuO15+uItbRbZ1QZynZklCa1u99wMCo/+N0FpZiStqC22X6IpAs8FiaqaGpiBY
 27znwncqyW3U2lwl0ZYWdMKjlvzUoaZroM7pwu9Kcjtlvb4gF0MzJWSfWTRAMSbK
 tAeqQb5zvkiogoDLp3HfQTf+xpqvU6Qn90jpzkawhmyFgcAzR3xHuHX1t2VHY6ye
 SfydmOvcz48sS+BxHl3/T2p6zGximT3oZ8gO9uSe0IvRgw2ZJE1RZzoSCJrZTDF0
 +ktjDJtMembjSzuNpmOXdGjk2PCWQT/7bmjKe1tg2v2qvD+MEXMiryahQoeovgME
 FJR9VvOlL4JVN3ouE5wppqey6ViZmt+bu6Pg3Y6/oNQNt9gJvB7yqODGPHwfEo8r
 Z4y9EoDr6qy7r03ihLEa84KMh/LBBCj3dF4SJRWxT/GVJm5K2q4=
 =e5sa
 -----END PGP SIGNATURE-----

Merge tag 'ffa-fix-6.15' of https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes

Arm FF-A fix for v6.15

A fix that addresses incorrect release of Rx buffer ownership in the
driver. The fix specificially avoids releasing Rx buffer ownership with
FFA_RX_RELEASE if it wasn’t acquired during a FFA_PARTITION_INFO_GET call
that only requested the partition count. This prevents unnecessary errors
like FFA_RET_DENIED from firmware when buffers are not actually owned by
the driver.

* tag 'ffa-fix-6.15' of https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  firmware: arm_ffa: Skip Rx buffer ownership release if not acquired
This commit is contained in:
Arnd Bergmann 2025-04-29 18:14:19 +02:00
commit fbefe1c45d

View File

@ -299,7 +299,8 @@ __ffa_partition_info_get(u32 uuid0, u32 uuid1, u32 uuid2, u32 uuid3,
import_uuid(&buf->uuid, (u8 *)&rx_buf->uuid);
}
ffa_rx_release();
if (!(flags & PARTITION_INFO_GET_RETURN_COUNT_ONLY))
ffa_rx_release();
mutex_unlock(&drv_info->rx_lock);