i40iw: Validate correct IRD/ORD connection parameters
authorTatyana Nikolova <tatyana.e.nikolova@intel.com>
Fri, 22 Dec 2017 15:47:01 +0000 (09:47 -0600)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 22 Dec 2017 20:39:48 +0000 (13:39 -0700)
commitce9ce74145aa6814a370a9ff4f5a1d719baaced1
treed846052fd83e15c132705d126c6703d04c682f43
parent756f77d216f8c62659d6b0c4b851314c97f794fd
i40iw: Validate correct IRD/ORD connection parameters

Casting to u16 before validating IRD/ORD connection
parameters could cause recording wrong IRD/ORD values
in the cm_node. Validate the IRD/ORD parameters as
they are passed by the application before recording
them.

Fixes: f27b4746f378 ("i40iw: add connection management code")
Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com>
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/i40iw/i40iw_cm.c