]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
IB/mad: Fix error path if response alloc fails in ib_mad_recv_done_handler()
authorHal Rosenstock <hal.rosenstock@gmail.com>
Fri, 3 Aug 2007 17:45:17 +0000 (10:45 -0700)
committerRoland Dreier <rolandd@cisco.com>
Fri, 3 Aug 2007 17:45:17 +0000 (10:45 -0700)
commit445d68070c9c02acdda38e6d69bd43096f521035
treeef828dbec51e77ba56906f167c7671c50b0fa54a
parent5399891052badf97948098d01772113801f6ef58
IB/mad: Fix error path if response alloc fails in ib_mad_recv_done_handler()

If ib_mad_recv_done_handler() fails to allocate response, then it just
printed a warning and continued, which leads to an oops if the MAD is
being handled for a switch device, because the switch code uses
response without checking for NULL.  Fix this by bailing out of the
function if the allocation fails.

Signed-off-by: Suresh Shelvapille <suri@baymicrosystems.com>
Signed-off-by: Hal Rosenstock <hal.rosenstock@gmail.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/core/mad.c