IB/uverbs: reject invalid or unknown opcodes
authorChristoph Hellwig <hch@lst.de>
Wed, 26 Aug 2015 09:00:37 +0000 (11:00 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 13 Oct 2015 02:46:08 +0000 (03:46 +0100)
commit7808f78e56756bd371a8e9b158203daa8df4c423
tree15a0bde2d0c7bb16f3ca7e29f620d50760163d0d
parented2a4a92f525d3b70c251dcd82e3e3a2d562b338
IB/uverbs: reject invalid or unknown opcodes

commit b632ffa7cee439ba5dce3b3bc4a5cbe2b3e20133 upstream.

We have many WR opcodes that are only supported in kernel space
and/or require optional information to be copied into the WR
structure.  Reject all those not explicitly handled so that we
can't pass invalid information to drivers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/infiniband/core/uverbs_cmd.c