]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/mlx4: Don't continue event handler after memory allocation failure
authorLeon Romanovsky <leonro@nvidia.com>
Mon, 31 Jan 2022 09:45:26 +0000 (11:45 +0200)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 1 Feb 2022 14:12:26 +0000 (10:12 -0400)
commit3a5e24df69a965c6a59c14fcceca7e44afec3042
treebbe18d3821210b6b627c4f26dedde135f4879356
parentb62b5c1277aef7183f81d47b4cd6e7e30c92bbeb
RDMA/mlx4: Don't continue event handler after memory allocation failure

The failure to allocate memory during MLX4_DEV_EVENT_PORT_MGMT_CHANGE
event handler will cause skip the assignment logic, but
ib_dispatch_event() will be called anyway.

Fix it by calling to return instead of break after memory allocation
failure.

Fixes: f75ebe304817 ("mlx4: Use port management change event instead of smp_snoop")
Link: https://lore.kernel.org/r/12a0e83f18cfad4b5f62654f141e240d04915e10.1643622264.git.leonro@nvidia.com
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: HÃ¥kon Bugge <haakon.bugge@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/mlx4/main.c