• Sean Hefty's avatar
    [IB] ib_umad: various cleanups · cb0f0910
    Sean Hefty authored
    Simplify user_mad.c code in a few places, and convert from kmalloc() +
    memset() to kzalloc().  This also fixes a theoretical race window by
    not accessing packet->length after posting the send buffer (the send
    could complete and packet could be freed before we get to the return
    statement at the end of ib_umad_write()).
    Signed-off-by: default avatarSean Hefty <sean.hefty@intel.com>
    Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
    cb0f0910
user_mad.c 21.8 KB