A WARN_ON() was inserted when user data was introduced to the
ibv_cmd_alloc_shpd() by another infiniband provider to make
sure that no user data is sent to older providers such as this
one which do not expect it.
It assumed when no user data is sent the udata->inlen is zero.
The user-kernel API however always sends at least 8 octets
(which may not be initialized in case of provider libraries that
do not user user data).
We remove the WARN_ON and rely on providers not to touch that
field if their companion library is not expected to initialize it.
Orabug:
24972331
Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
Reviewed-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
{
struct mlx4_ib_shpd *shpd;
- /*
- * Warn if we get udata which is not expected from the
- * mellanox provider.
- */
- WARN_ON(udata && udata->inlen > 0);
-
shpd = kzalloc(sizeof(*shpd), GFP_KERNEL);
if (!shpd)
return ERR_PTR(-ENOMEM);