Re: [PATCH][next] RDMA: check for null return from call to ib_get_client_data

From: Jason Gunthorpe
Date: Thu Jun 20 2019 - 11:07:36 EST

On Thu, Jun 20, 2019 at 02:50:52PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
> The return from ib_get_client_data can potentially be null, so add a null
> check on umad_dev and return -ENODEV in this unlikely case to avoid any
> null pointer deferences.

It would be a kernel bug if NULL is seen here.