Re: [PATCH for-rc v2] RDMA/cma: Remove open coding of overflow checking for private_data_len

From: Leon Romanovsky
Date: Thu Nov 25 2021 - 06:37:16 EST


On Tue, Nov 23, 2021 at 11:06:18AM +0100, Håkon Bugge wrote:
> The existing tests are a little hard to comprehend. Use
> check_add_overflow() instead.
>
> Fixes: 04ded1672402 ("RDMA/cma: Verify private data length")
> Signed-off-by: Håkon Bugge <haakon.bugge@xxxxxxxxxx>
>
> ---
>
> v1 -> v2:
>
> * Also fixed same issue in cma_resolve_ib_udp() as pointed out
> by Leon
> ---
> drivers/infiniband/core/cma.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>

Thanks,
Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxx>