Hi,

> > +   /* Preallocate a shared id for use under memory pressure. */
> > +   err = xa_alloc_cyclic_irq(&guc->tlb_lookup, &guc->serial_slot, wait,
> > +                             xa_limit_32b, &guc->next_seqno, GFP_KERNEL);
> > +   if (err == -ENOMEM) {
> > +           kfree(wait);
> > +           return err;
> > +   }
> What about any other error? Even if xa_alloc... is currently defined as not
> returning anything other than zero or ENOMEM, it is bad practice to assume
> that it can never produce any other error.

it can return -EBUSY when we run out of free spots. In such case
we neeed to wait a bit the queue to clear up.

Andi

Reply via email to