From: Ding Hui <dinghui@sangfor.com.cn>
To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, intel-wired-lan@lists.osuosl.org
Cc: jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com,
keescook@chromium.org, grzegorzx.szczurek@intel.com,
mateusz.palczewski@intel.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org,
Ding Hui <dinghui@sangfor.com.cn>
Subject: [PATCH net 0/2] iavf: Fix issues when setting channels concurrency
Date: Sat, 8 Apr 2023 22:00:28 +0800 [thread overview]
Message-ID: <20230408140030.5769-1-dinghui@sangfor.com.cn> (raw)
There are two issues can be reproduced by the following script:
[root@host ~]# cat test-iavf-1.sh
#!/bin/bash
pf_dbsf="0000:40:01.1/0000:41:00.0"
vf0_dbsf="0000:40:01.1/0000:41:02.0"
g_pids=()
function do_set_numvf()
{
echo "set 2 vfs"
echo 2 >/sys/bus/pci/devices/${pf_dbsf}/sriov_numvfs
sleep $((RANDOM%3+1))
echo "set 0 vfs"
echo 0 >/sys/bus/pci/devices/${pf_dbsf}/sriov_numvfs
sleep $((RANDOM%3+1))
}
function do_nic_reset()
{
local nic=$(ls -1 --indicator-style=none /sys/bus/pci/devices/${vf0_dbsf}/net/)
[ -z "$nic" ] && { sleep $((RANDOM%3)) ; return 1; }
ifconfig $nic 192.168.18.5 netmask 255.255.255.0
ifconfig $nic up
echo "set $nic 1 combined"
ethtool -L $nic combined 1
echo "set $nic 4 combined"
ethtool -L $nic combined 4
sleep $((RANDOM%3))
}
function on_exit()
{
local pid
for pid in "${g_pids[@]}"; do
kill -0 "$pid" &>/dev/null && kill "$pid" &>/dev/null
done
g_pids=()
}
trap "on_exit; exit" EXIT
while :; do do_set_numvf ; done &
g_pids+=($!)
while :; do do_nic_reset ; done &
g_pids+=($!)
wait
Ding Hui (2):
iavf: Fix use-after-free in free_netdev
iavf: Fix out-of-bounds when setting channels on remove
drivers/net/ethernet/intel/iavf/iavf_ethtool.c | 4 +++-
drivers/net/ethernet/intel/iavf/iavf_main.c | 6 +-----
2 files changed, 4 insertions(+), 6 deletions(-)
--
2.17.1
next reply other threads:[~2023-04-08 14:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-08 14:00 Ding Hui [this message]
2023-04-08 14:00 ` [PATCH net 1/2] iavf: Fix use-after-free in free_netdev Ding Hui
2023-04-18 16:02 ` Michal Kubiak
2023-04-18 16:08 ` Michal Kubiak
2023-04-19 0:50 ` Ding Hui
2023-04-18 16:50 ` Tony Nguyen
2023-04-19 1:00 ` Ding Hui
2023-04-08 14:00 ` [PATCH net 2/2] iavf: Fix out-of-bounds when setting channels on remove Ding Hui
2023-04-18 16:11 ` Michal Kubiak
2023-04-19 0:53 ` Ding Hui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230408140030.5769-1-dinghui@sangfor.com.cn \
--to=dinghui@sangfor.com.cn \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=grzegorzx.szczurek@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jesse.brandeburg@intel.com \
--cc=keescook@chromium.org \
--cc=kuba@kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mateusz.palczewski@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®