[IB] ib_umad: various cleanups
authorSean Hefty <sean.hefty@intel.com>
Fri, 28 Oct 2005 03:48:11 +0000 (20:48 -0700)
committerRoland Dreier <rolandd@cisco.com>
Fri, 28 Oct 2005 03:48:11 +0000 (20:48 -0700)
commitcb0f0910f4b41772a6771bdb4fb2d419b27bcd77
treefe34505915c31b3b77296e3828cd7675f4616ba9
parent089a1bedd84be16a4f49a319e7ccb4a128da5ce9
[IB] ib_umad: various cleanups

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: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/core/user_mad.c