lkml.org 
[lkml]   [2013]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRE: [PATCH 2/6] idr: remove MAX_IDR_MASK and move left MAX_IDR_* into idr.c
    Date
    > * 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?


    \
     
     \ /
      Last update: 2013-02-08 23:42    [W:3.040 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site