]> git.baikalelectronics.ru Git - kernel.git/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:04:06 +0000 (11:04 +0200)
commitf17c79acc12bfdf3b2c75cd176a1e6bb86221379
tree316d8c81dc4a4dbe8815fbb65237cf64a3f2b84d
parent30026b92c23a7451c10099f832b6d4512d482d92
iavf: Fix bad page state

[ Upstream commit 103facdb928bac3f37871e51dcb05d2ab355ec4b ]

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: 6f66aea6da3e ("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