Message ID | 20230408140030.5769-1-dinghui@sangfor.com.cn |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp891052vqo; Sat, 8 Apr 2023 07:03:15 -0700 (PDT) X-Google-Smtp-Source: AKy350YCHGXBPdpNhkEYfM4UZj2gG0kDj70YH7oL+Ozdod4du4D8FsvyG958metS//MSbmZ+03wo X-Received: by 2002:a05:6a20:1e48:b0:d9:840f:79c2 with SMTP id cy8-20020a056a201e4800b000d9840f79c2mr1930171pzb.2.1680962594780; Sat, 08 Apr 2023 07:03:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680962594; cv=none; d=google.com; s=arc-20160816; b=nMZPdGBXgHMtgdKoMv2DiM7U/7p25kcre4Hb2EPFJBQ48Dk22p7umg/VciyLAmR18N mruKzJp7gj51FqjKeI/PBjzlODJh8YGSXXtFHlLvIEx2UywTYkmiWYV0NVsgWchUv4VK 7WkF39BsNSUhYrq5v7U3kP1p4yYQDQWCpa0CyaMB9n/GG5DSpi9rkxyhtLR0UIgi7sRz DHBZAqdJj0Fh0TDGIozp1JPw+xuVasUL8seGsrQluoh7YjQtjHt81JMQfFFnYCJzEObF OMvtd5L3MBowrXNN4Sh+mhwArPvgj0Sv35cCsyvlBOHVYVaRrROqSZFE4wIj/8Nz8Un/ vHgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=ml7joP6SrIiui3VZrbXcB4g4i2fHDFcVHCrWe1kC0G8=; b=lS/xc1HfSgiLR7tTMPbXeZZgDR0u6Z9xOWBP1dFprd1pprtvJsLiE9dvr/+vL6SWPg cN9eUmf/tHAET0rV3gSKhmh7cow3HmD0wcxc1HLU68Rx/KTtw0J0RcVglFi5GzGEq+vL 1yiPUBN0bL4oDvJMrVvoF3PJSDOSupShrk70McdWOY78iRPSVle5EesAI3P28i8/UHqa jMDZ1r8fgknusB8H6YG3U7fiRZ1OwcPB2PTlHWlT7s/sXlEJHrHXpLyoZ0m81WDCqsHM 5+NLPEwd/E5qSP34f43kWQx52Iv3/HTiOT7AwKGg+yuiFV/OdzfE1qVWhLL6TT0Ao6E5 aIDw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=sangfor.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h21-20020aa796d5000000b0062804ba6fb4si6274338pfq.58.2023.04.08.07.03.02; Sat, 08 Apr 2023 07:03:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=sangfor.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229647AbjDHOBY (ORCPT <rfc822;a1648639935@gmail.com> + 99 others); Sat, 8 Apr 2023 10:01:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjDHOBW (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 8 Apr 2023 10:01:22 -0400 Received: from mail-m11880.qiye.163.com (mail-m11880.qiye.163.com [115.236.118.80]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72464EF88; Sat, 8 Apr 2023 07:01:20 -0700 (PDT) Received: from localhost.localdomain (unknown [IPV6:240e:3b7:3279:cf80:b96f:666f:20ca:bc83]) by mail-m11880.qiye.163.com (Hmail) with ESMTPA id 60349201AB; Sat, 8 Apr 2023 22:01:12 +0800 (CST) 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 Message-Id: <20230408140030.5769-1-dinghui@sangfor.com.cn> X-Mailer: git-send-email 2.17.1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWS1ZQUlXWQ8JGhUIEh9ZQVlDSB1MVkkfQ0lDH09MShlNH1UTARMWGhIXJBQOD1 lXWRgSC1lBWUlPSx5BSBlMQUhJTEJBGB1DS0EZQk0dQU1NTR1BSUsYGkEZGENIWVdZFhoPEhUdFF lBWU9LSFVKSktCSE5VSktLVUtZBg++ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6PxQ6DQw5Pz0cTzcXSSo#HEox MzQaCi5VSlVKTUNLQk1JT0xISkJLVTMWGhIXVR8SFRwTDhI7CBoVHB0UCVUYFBZVGBVFWVdZEgtZ QVlJT0seQUgZTEFISUxCQRgdQ0tBGUJNHUFNTU0dQUlLGBpBGRhDSFlXWQgBWUFJTUJLNwY+ X-HM-Tid: 0a87612bcb4d2eb6kusn60349201ab X-HM-MType: 1 X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762617033703662652?= X-GMAIL-MSGID: =?utf-8?q?1762617033703662652?= |
Series |
iavf: Fix issues when setting channels concurrency
|
|
Message
Ding Hui
April 8, 2023, 2 p.m. UTC
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(-)