Re: [PATCH] RDMA/cxgb4: fix null pointer dereference on alloc_skb failure
From: Jason Gunthorpe
Date: Tue Apr 16 2019 - 07:06:30 EST
On Sat, Apr 13, 2019 at 05:00:26PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> Currently if alloc_skb fails to allocate the skb a null skb is passed
> to t4_set_arp_err_handler and this ends up dereferencing the null skb.
> Avoid the null pointer dereference by checking for a null skb and
> returning early.
>
> Addresses-Coverity: ("Dereference null return")
> Fixes: b38a0ad8ec11 ("RDMA/cxgb4: Set arp error handler for PASS_ACCEPT_RPL messages")
> Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
> Acked-by: Potnuri Bharat Teja <bharat@xxxxxxxxxxx>
> ---
> drivers/infiniband/hw/cxgb4/cm.c | 2 ++
> 1 file changed, 2 insertions(+)
Applied to for-next
Thanks,
Jason