Message ID | 20230429132022.31765-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 b10csp1597476vqo; Sat, 29 Apr 2023 06:40:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7NEsXCLlB3T51cAxItNCXRDg8aBaI7+CbsJDmNcKUORW2otm3iBpl/+iVHljRLVMhhSnWh X-Received: by 2002:a17:90a:5404:b0:24b:2794:9a31 with SMTP id z4-20020a17090a540400b0024b27949a31mr7884953pjh.48.1682775628902; Sat, 29 Apr 2023 06:40:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682775628; cv=none; d=google.com; s=arc-20160816; b=cJviyfxD3DGWkmpB157imzQ+UBlLpCoxEc7TBfUYDlfEciW1IS//ccdyk8syw9WPLe xmMMPdkqEI6tC3P467B3Zs99WNLw79m3jMrV+Z5+bg9zaUcU6Hm6yz+b9uBv8UcsoFyu NkHf+ZqGZXCFAj26RMyZf3C1YoNnjKl5UrmS+6rpp4vexrLkc5B2LAKA7TV5deqc3m5k PfT1QWRbloYWjud1CldieWdcvibHx8vc2oM/xZy80T5ZIlygOz6f9tIRDnCYAIsTD2MT d5HKY41/EUrjcM2VegPYvihRL06VvaBdCAHTNMQBUGrTHL2Z9PeufCmNWLeVk1Vrkb+N kNpA== 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=9Tc1ASznB8km9S9z19NLiMSSW0B+aIAneCfVuwJoqCg=; b=C2wRYHJmCwykYQkLKT2aCggP2ewgg+MGyXH437+qvD4oL9KvYummHDXrKsG/Yq6RCH 8ipMI5YiOJB+N8WUqmBy2FYQSxB5r/wCnZzi/KqJ2E1/NEIV///CRQX8sCE0UcMLdX+m 0DasJqO/UopCiWrANIY2DYw/xq7gTABr7j4aiTq1N89iVpzg9HJIjNOd2vcfZtPBkAYo B6bRBkeaTvWI+hyBhZlwm8bZcZW2lgubaamsGjjutPOG+bIfPbU5cu8qE3poMdu6blUZ lIBzuQLjwxy+oApUe7A2aYbRCOGBCvTRiD359IycA3Tbp6EN0e28AzQI7SS6rtFCQF6e AAtA== 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 g16-20020a63dd50000000b004dccf388f93si22738756pgj.522.2023.04.29.06.40.16; Sat, 29 Apr 2023 06:40:28 -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 S231248AbjD2NVV (ORCPT <rfc822;chrisjones.unixmen@gmail.com> + 99 others); Sat, 29 Apr 2023 09:21:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229659AbjD2NVT (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 29 Apr 2023 09:21:19 -0400 Received: from mail-m11876.qiye.163.com (mail-m11876.qiye.163.com [115.236.118.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88D3C1728; Sat, 29 Apr 2023 06:21:14 -0700 (PDT) Received: from localhost.localdomain (unknown [IPV6:240e:3b7:3271:1d90:5cf2:8ef5:1dc9:a429]) by mail-m11876.qiye.163.com (Hmail) with ESMTPA id 1C9603C0293; Sat, 29 Apr 2023 21:21:03 +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, jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com Cc: keescook@chromium.org, grzegorzx.szczurek@intel.com, mateusz.palczewski@intel.com, mitch.a.williams@intel.com, gregory.v.rose@intel.com, jeffrey.t.kirsher@intel.com, michal.kubiak@intel.com, simon.horman@corigine.com, madhu.chittim@intel.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, pengdonglin@sangfor.com.cn, huangcun@sangfor.com.cn, Ding Hui <dinghui@sangfor.com.cn> Subject: [PATCH net v3 0/2] iavf: Fix issues when setting channels concurrency with removing Date: Sat, 29 Apr 2023 21:20:20 +0800 Message-Id: <20230429132022.31765-1-dinghui@sangfor.com.cn> X-Mailer: git-send-email 2.17.1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWS1ZQUlXWQ8JGhUIEh9ZQVlDTxpIVhlPS0sfSEhOTx5JHlUTARMWGhIXJBQOD1 lXWRgSC1lBWUlPSx5BSBlMQUhJTEpBSh9CS0FOGB1JQUMeHU5BSh8YQkEaT0lCWVdZFhoPEhUdFF lBWU9LSFVKSktISkxVSktLVUtZBg++ X-HM-Tid: 0a87cd2c94cb2eb2kusn1c9603c0293 X-HM-MType: 1 X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6NTY6Pxw5ED0QMEwaI0szPlE9 OUhPFBVVSlVKTUNJTExPT01PSktCVTMWGhIXVR8SFRwTDhI7CBoVHB0UCVUYFBZVGBVFWVdZEgtZ QVlJT0seQUgZTEFISUxKQUofQktBThgdSUFDHh1OQUofGEJBGk9JQllXWQgBWUFIS09ONwY+ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham 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?1764518138189297185?= X-GMAIL-MSGID: =?utf-8?q?1764518138189297185?= |
Series |
iavf: Fix issues when setting channels concurrency with removing
|
|
Message
Ding Hui
April 29, 2023, 1:20 p.m. UTC
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(-)