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,
jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com
Cc: keescook@chromium.org, grzegorzx.szczurek@intel.com,
mitch.a.williams@intel.com, linux-kernel@vger.kernel.org,
huangcun@sangfor.com.cn, gregory.v.rose@intel.com,
michal.kubiak@intel.com, jeffrey.t.kirsher@intel.com,
simon.horman@corigine.com, pengdonglin@sangfor.com.cn,
Ding Hui <dinghui@sangfor.com.cn>,
netdev@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: [Intel-wired-lan] [PATCH net v5 0/2] iavf: Fix issues when setting channels concurrency with removing
Date: Tue, 9 May 2023 19:11:46 +0800 [thread overview]
Message-ID: <20230509111148.4608-1-dinghui@sangfor.com.cn> (raw)
The patchset fix two issues which can be reproduced by the following script:
[root@host ~]# cat repro.sh
#!/bin/bash
pf_dbsf="0000:41:00.0"
vf0_dbsf="0000:41:02.0"
g_pids=()
function do_set_numvf()
{
echo 2 >/sys/bus/pci/devices/${pf_dbsf}/sriov_numvfs
sleep $((RANDOM%3+1))
echo 0 >/sys/bus/pci/devices/${pf_dbsf}/sriov_numvfs
sleep $((RANDOM%3+1))
}
function do_set_channel()
{
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
ethtool -L $nic combined 1
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_set_channel ; 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
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
next reply other threads:[~2023-05-09 11:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-09 11:11 Ding Hui [this message]
2023-05-09 11:11 ` [Intel-wired-lan] [PATCH net v5 1/2] iavf: Fix use-after-free in free_netdev Ding Hui
2023-05-09 13:39 ` Leon Romanovsky
2023-07-17 13:25 ` Romanowski, Rafal
2023-05-09 11:11 ` [Intel-wired-lan] [PATCH net v5 2/2] iavf: Fix out-of-bounds when setting channels on remove Ding Hui
2023-05-09 13:39 ` Leon Romanovsky
2023-07-17 13:26 ` Romanowski, Rafal
2023-05-10 12:16 ` [Intel-wired-lan] [PATCH net v5 0/2] iavf: Fix issues when setting channels concurrency with removing Michal Kubiak
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=20230509111148.4608-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=gregory.v.rose@intel.com \
--cc=grzegorzx.szczurek@intel.com \
--cc=huangcun@sangfor.com.cn \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jeffrey.t.kirsher@intel.com \
--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=michal.kubiak@intel.com \
--cc=mitch.a.williams@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pengdonglin@sangfor.com.cn \
--cc=simon.horman@corigine.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