Message ID | 1510846675-15169-5-git-send-email-brking@linux.vnet.ibm.com |
---|---|
State | Superseded |
Headers | show
Return-Path: <intel-wired-lan-bounces@osuosl.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=osuosl.org (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=<UNKNOWN>) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yd9mL1vdvz9ryr for <incoming@patchwork.ozlabs.org>; Fri, 17 Nov 2017 06:09:53 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3D797882CE; Thu, 16 Nov 2017 19:09:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qc36yPtbRAPB; Thu, 16 Nov 2017 19:09:51 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 7B49087E6B; Thu, 16 Nov 2017 19:09:51 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id E909F1C0AEA for <intel-wired-lan@lists.osuosl.org>; Thu, 16 Nov 2017 18:40:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id DC06E8862D for <intel-wired-lan@lists.osuosl.org>; Thu, 16 Nov 2017 18:40:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id y8luwrRzEc-M for <intel-wired-lan@lists.osuosl.org>; Thu, 16 Nov 2017 18:40:41 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by hemlock.osuosl.org (Postfix) with ESMTPS id 18E208855A for <intel-wired-lan@lists.osuosl.org>; Thu, 16 Nov 2017 18:40:41 +0000 (UTC) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vAGFbVpL111611 for <intel-wired-lan@lists.osuosl.org>; Thu, 16 Nov 2017 10:38:21 -0500 Received: from e13.ny.us.ibm.com (e13.ny.us.ibm.com [129.33.205.203]) by mx0a-001b2d01.pphosted.com with ESMTP id 2e9bj1f9v7-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for <intel-wired-lan@lists.osuosl.org>; Thu, 16 Nov 2017 10:38:21 -0500 Received: from localhost by e13.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for <intel-wired-lan@lists.osuosl.org> from <brking@linux.vnet.ibm.com>; Thu, 16 Nov 2017 10:38:19 -0500 Received: from b01cxnp23033.gho.pok.ibm.com (9.57.198.28) by e13.ny.us.ibm.com (146.89.104.200) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 16 Nov 2017 10:38:17 -0500 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vAGFcGFt59703510; Thu, 16 Nov 2017 15:38:16 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BD27E124035; Thu, 16 Nov 2017 10:35:20 -0500 (EST) Received: from oc3660843733-ibm-com.ibm.com (unknown [9.10.86.134]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP id 6AE7012403F; Thu, 16 Nov 2017 10:35:20 -0500 (EST) From: Brian King <brking@linux.vnet.ibm.com> To: Date: Thu, 16 Nov 2017 09:37:52 -0600 X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1510846675-15169-1-git-send-email-brking@linux.vnet.ibm.com> References: <1510846675-15169-1-git-send-email-brking@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17111615-0008-0000-0000-000002A2201D X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008074; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000240; SDB=6.00946748; UDB=6.00477924; IPR=6.00727040; BA=6.00005694; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00018046; XFM=3.00000015; UTC=2017-11-16 15:38:19 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17111615-0009-0000-0000-000037542181 Message-Id: <1510846675-15169-5-git-send-email-brking@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-11-16_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1711160210 Subject: [Intel-wired-lan] [PATCH 4/7] igbvf: Use smp_rmb rather than read_barrier_depends X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development <intel-wired-lan.osuosl.org> List-Unsubscribe: <https://lists.osuosl.org/mailman/options/intel-wired-lan>, <mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe> List-Archive: <http://lists.osuosl.org/pipermail/intel-wired-lan/> List-Post: <mailto:intel-wired-lan@osuosl.org> List-Help: <mailto:intel-wired-lan-request@osuosl.org?subject=help> List-Subscribe: <https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe> Cc: stable@vger.kernel.org, intel-wired-lan@lists.osuosl.org, brking@pobox.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" <intel-wired-lan-bounces@osuosl.org> |
Series |
intel: Use smp_rmb rather than read_barrier_depends
|
expand
|
diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c index 1ed5569..6f5888b 100644 --- a/drivers/net/ethernet/intel/igbvf/netdev.c +++ b/drivers/net/ethernet/intel/igbvf/netdev.c @@ -810,7 +810,7 @@ static bool igbvf_clean_tx_irq(struct igbvf_ring *tx_ring) break; /* prevent any other reads prior to eop_desc */ - read_barrier_depends(); + smp_rmb(); /* if DD is not set pending work has not been completed */ if (!(eop_desc->wb.status & cpu_to_le32(E1000_TXD_STAT_DD)))
The original issue being fixed in this patch was seen with the ixgbe driver, but the same issue exists with igbvf as well, as the code is very similar. read_barrier_depends is not sufficient to ensure loads following it are not speculatively loaded out of order by the CPU, which can result in stale data being loaded, causing potential system crashes. Cc: stable<stable@vger.kernel.org> Signed-off-by: Brian King <brking@linux.vnet.ibm.com> --- drivers/net/ethernet/intel/igbvf/netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)