[dpdk-dev] [PATCH] net/cxgbe: free resources in dev_uninit function

Ferruh Yigit ferruh.yigit at intel.com
Mon May 14 14:19:16 CEST 2018


On 5/12/2018 12:50 PM, Rahul Lakkireddy wrote:
> Move freeing up resources from dev_close() to dev_uninit(). This fixes
> NULL pointer de-reference when accessing adapter context needed by
> other ports under same PF, but had been freed up by the first port.
> This can happen if only the first port is started up and the check
> to free up all resources is still satisfied. When dev_close is
> called for other ports, adapter context is NULL since it was freed
> up by the first port.
> 
> Thus, by moving to dev_uninit() all the ports can be teared down
> safely without need for extra checks.
> 
> Fixes: 2195df6d11bd ("net/cxgbe: rework ethdev device allocation")
> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy at chelsio.com>
> Signed-off-by: Kumar Sanghvi <kumaras at chelsio.com>

Applied to dpdk-next-net/master, thanks.


More information about the dev mailing list