RE: [PATCH 2/6] idr: remove MAX_IDR_MASK and move left MAX_IDR_*into idr.c

From: Hefty, Sean
Date: Fri Feb 08 2013 - 17:09:34 EST


> * drivers/infiniband/core/cm.c:cm_alloc_id()
> drivers/infiniband/hw/mlx4/cm.c:id_map_alloc()
>
> Used to wrap cyclic @start. Can be replaced with max(next, 0).
> Note that this type of cyclic allocation using idr is buggy. These
> are prone to spurious -ENOSPC failure after the first wraparound.

The replacement code looks fine, but can you explain why the use is buggy?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/