]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[IB] uverbs: Fix up resource creation error paths
authorRoland Dreier <rolandd@cisco.com>
Tue, 27 Sep 2005 22:07:25 +0000 (15:07 -0700)
committerRoland Dreier <rolandd@cisco.com>
Mon, 17 Oct 2005 22:20:25 +0000 (15:20 -0700)
commiteb9d3cd5ce2828fbb99ed7270089ea152c8f64b3
tree2d0de42bc6c7777c66ee76d5817312bcfd161718
parent6b73597e7062118c0549c2702bfb7d273518c906
[IB] uverbs: Fix up resource creation error paths

By waiting to add resources to our lists until after the last
operation that can fail, we don't have to remove them from their lists
in the error path.  Also, we should hold the idr mutex until we know
whether resource creation has succeed or failed, to avoid someone
finding a resource in our table before we're ready.

Loosely based on work by Robert Walsh <rjwalsh@pathscale.com>.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/core/uverbs_cmd.c