]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iommufd: Propagate allocation failure in iommufd_veventq_deliver_fetch()
authorNicolin Chen <nicolinc@nvidia.com>
Mon, 1 Jun 2026 20:42:34 +0000 (13:42 -0700)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 5 Jun 2026 14:07:12 +0000 (11:07 -0300)
commit489e63dd120bad52eba63f5506c214750cd5bc75
tree6b04c7e8c4b1244348b05d546bf86bdd244c068e
parent00203ca8323f9714630408c19a209b52397975e6
iommufd: Propagate allocation failure in iommufd_veventq_deliver_fetch()

When the kzalloc_obj() fails in iommufd_veventq_deliver_fetch(), it returns
NULL, falsely advertising to userspace that the queue is empty.

Propagate the -ENOMEM properly to the caller.

Fixes: e36ba5ab808e ("iommufd: Add IOMMUFD_OBJ_VEVENTQ and IOMMUFD_CMD_VEVENTQ_ALLOC")
Link: https://patch.msgid.link/r/25d29feac909e36f78c145fa99ef2d4cb7a415da.1780343944.git.nicolinc@nvidia.com
Cc: stable@vger.kernel.org
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Pranjal Shrivastava <praan@google.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/iommu/iommufd/eventq.c