On Wed, Jan 21, 2026 at 10:32:46AM +0200, Leon Romanovsky wrote:
+static int uverbs_dmabuf_attach(struct dma_buf *dmabuf,
struct dma_buf_attachment *attachment)+{
- struct ib_uverbs_dmabuf_file *priv = dmabuf->priv;
- if (!attachment->peer2peer)
return -EOPNOTSUPP;- if (priv->revoked)
return -ENODEV;This should only be checked in map
I disagree with word "only", the more accurate word is "too". There is no need to allow new importer attach if this exporter is marked as revoked.
It must check during map, during attach as well is redundant and a bit confusing.
This should also eventually call the new revoke testing function Leon is adding
We will add it once my series will be accepted.
It should also refuse pinned importers with an always fail pin op until we get that done. This is a case like VFIO where the lifecycle is more general and I don't want to accidently allow things that shouldn't work.
Jason