Commit 813110e5 authored by Norbert Zulinski's avatar Norbert Zulinski Committed by Jialin Zhang
Browse files

iavf: Fix bad page state

stable inclusion
from stable-v5.10.146
commit ccddb1db4b3c738310d0e37c2ffb9f4d27053809
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6D0VX

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ccddb1db4b3c738310d0e37c2ffb9f4d27053809



--------------------------------

[ Upstream commit 66039eb9 ]

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: a9f49e00 ("iavf: Fix handling of dummy receive descriptors")
Signed-off-by: default avatarNorbert Zulinski <norbertx.zulinski@intel.com>
Signed-off-by: default avatarMateusz Palczewski <mateusz.palczewski@intel.com>
Tested-by: default avatarKonrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
Reviewed-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent f44d8568
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment