]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mthca: No userspace SRQs if HCA doesn't have SRQ support
authorRoland Dreier <rolandd@cisco.com>
Fri, 18 Aug 2006 17:41:46 +0000 (10:41 -0700)
committerRoland Dreier <rolandd@cisco.com>
Fri, 18 Aug 2006 17:41:46 +0000 (10:41 -0700)
commit9e0624fe878c75bcf3de1f9c7af6c75ee75b67bd
tree0f70ebff5d478d36d8440aebac5e311b0cfe5e74
parente4821c05350c38309dacc7871d971b83698a167e
IB/mthca: No userspace SRQs if HCA doesn't have SRQ support

Leave all SRQ methods out of the device's uverbs_cmd_mask if the
device doesn't have SRQ support (because of ancient firmware) so that
we don't allow userspace to call the driver's create_srq method.  This
fixes a userspace-triggerable oops caused by ib_uverbs_create_srq()
following the device's ->create_srq function pointer, which will be
NULL if the device doesn't support SRQs.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/mthca/mthca_provider.c