]> git.itanic.dy.fi Git - linux-stable/commit
iavf: Fix bad page state
authorNorbert Zulinski <norbertx.zulinski@intel.com>
Wed, 14 Sep 2022 13:39:13 +0000 (15:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Sep 2022 09:10:32 +0000 (11:10 +0200)
commitccddb1db4b3c738310d0e37c2ffb9f4d27053809
tree26e962ad1c1659d33d98f8dba63b93cdd3117d0e
parent21b535fe5ecb10c872642013355433432bac88d6
iavf: Fix bad page state

[ Upstream commit 66039eb9015eee4f7ff0c99b83c65c7ecb3c8190 ]

Fix bad page state, free inappropriate page in handling dummy
descriptor. iavf_build_skb now has to check not only if rx_buffer is
NULL but also if size is zero, same thing in iavf_clean_rx_irq.
Without this patch driver would free page that will be used
by napi_build_skb.

Fixes: a9f49e006030 ("iavf: Fix handling of dummy receive descriptors")
Signed-off-by: Norbert Zulinski <norbertx.zulinski@intel.com>
Signed-off-by: Mateusz Palczewski <mateusz.palczewski@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/iavf/iavf_txrx.c