[dpdk-dev] [PATCH v3 1/2] enic: fix seg fault when releasing queues
johndale at cisco.com
Thu Jun 9 20:56:08 CEST 2016
If device configuration failed due to a lack of resources, such as
if more queues are requested than are available, the queue release
function is called with NULL pointers which were being dereferenced.
Skip releasing queues if they are NULL pointers.
Fixes: fefed3d1e62c ("enic: new driver")
Signed-off-by: John Daley <johndale at cisco.com>
v3: bail out of free rq function if rq is null instead of if
around != NULL.
drivers/net/enic/enic_main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 996f999..5939b9d 100644
@@ -429,6 +429,9 @@ void enic_free_rq(void *rxq)
struct vnic_rq *rq = (struct vnic_rq *)rxq;
struct enic *enic = vnic_dev_priv(rq->vdev);
+ if (rxq == NULL)
rq->mbuf_ring = NULL;
More information about the dev