]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
IB/mlx4: Test return value of calls to ib_get_cached_pkey
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Sun, 26 Apr 2020 07:59:21 +0000 (10:59 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 12 May 2020 14:47:48 +0000 (11:47 -0300)
commit6693ca95bd4330a0ad7326967e1f9bcedd6b0800
treeacd24d122b8bba0cc9047b77716def88768070fd
parentbb43c8e382e5da0ee253e3105d4099820ff4d922
IB/mlx4: Test return value of calls to ib_get_cached_pkey

In the mlx4_ib_post_send() flow, some functions call ib_get_cached_pkey()
without checking its return value. If ib_get_cached_pkey() returns an
error code, these functions should return failure.

Fixes: 1ffeb2eb8be9 ("IB/mlx4: SR-IOV IB context objects and proxy/tunnel SQP support")
Fixes: 225c7b1feef1 ("IB/mlx4: Add a driver Mellanox ConnectX InfiniBand adapters")
Fixes: e622f2f4ad21 ("IB: split struct ib_send_wr")
Link: https://lore.kernel.org/r/20200426075921.130074-1-leon@kernel.org
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx4/qp.c