Skip to content
Commit 09f16cf5 authored by Majd Dibbiny's avatar Majd Dibbiny Committed by Doug Ledford
Browse files

IB/mlx5: Fix use of null pointer PD



When a Raw Ethernet QP is created, a NULL pointer PD could be used.
Fixing that by only using the PD after validating it's valid.
smatch also reported this error:
drivers/infiniband/hw/mlx5/qp.c:1629 mlx5_ib_create_qp()
	 error: we previously assumed 'pd' could be null (see line 1616)

Fixes: 0fb2ed66 ('IB/mlx5: Add create and destroy functionality for Raw Packet QP')
Signed-off-by: default avatarMajd Dibbiny <majd@mellanox.com>
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent a168a41c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment