Unverified Commit 9c7763ce authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!6618 net/bnx2x: Prevent access to a freed page in page_pool

parents 948ef5c9 1aafbb3c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1002,9 +1002,6 @@ static inline void bnx2x_set_fw_mac_addr(__le16 *fw_hi, __le16 *fw_mid,
static inline void bnx2x_free_rx_mem_pool(struct bnx2x *bp,
					  struct bnx2x_alloc_pool *pool)
{
	if (!pool->page)
		return;

	put_page(pool->page);

	pool->page = NULL;
@@ -1015,6 +1012,9 @@ static inline void bnx2x_free_rx_sge_range(struct bnx2x *bp,
{
	int i;

	if (!fp->page_pool.page)
		return;

	if (fp->mode == TPA_MODE_DISABLED)
		return;