Received: by 10.213.65.68 with SMTP id h4csp1720008imn; Mon, 19 Mar 2018 11:22:46 -0700 (PDT) X-Google-Smtp-Source: AG47ELuOF2t5bdJQMudcDf0StSxeK5U2rzRHavLX+2eM5Yah547lQLNbTjgEjdJHbI/UxZm0K80p X-Received: by 10.99.95.86 with SMTP id t83mr9643472pgb.183.1521483766127; Mon, 19 Mar 2018 11:22:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521483766; cv=none; d=google.com; s=arc-20160816; b=VZQ7kFvytGT+Q75AjTemGIeav0OSD4iKAsBt5wMhn37cVG20G3mE1TiSZyUg/BNOvT G45wS89jAdgcTb2mduExFlHakaO9g/AgIJimoe8ZwVhq6vu4akg6jwUnRYSJRju+xF6P MRlWajeButij+9GOBOFjzwgENEJn8yLV2kZH5RtNcuiz3GWgc5Xhmnj/gw1zgAMEC+4S Fnr6cLGUf1h1iYbuoaXrhBIJlwKKX06+hCnkqhqrm9XpvRHdTEvBdip/tQvpIL/7TBMf Squ4rBgFMKKPqDeeFSpBH5HuoSVZVM88bHEMDFqpNffijPQA292XoLRpB7ak536FgtQ0 frAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=OBl5nU3VvpOeiTogMvEUB22/u3nxeZl/hicLCVgVeo8=; b=GGOdGlIDcvOcyNGRs/EWsSlpQehX27i2AH0rOPW0eyJAfxPHTBUDnJpfEuQxA3w91X FNwtaqYlH9uor2NFoszYc0BKy05FNIS396fVqwHvSY4wrkHb7nW3JRq/SqpR2XNmfwSj G83BvkOs6OSM4FiEtagO2B2GiDAC+onrGH/fWgg+pVG2oKLAACYEtHXFHNGs0pAm1LWG A+IP0ilmPbG5ZCZ09s5kpSkz9c1uLpU91TkBtVcgT+2U9x7sBpbEXRIjKDqWP9BlrzJi /aUhR3FQgthiWpt11UECcsvKwRXwlxu7nA3quqcRh7XXh28iPTeV9BHRSfe//Am9G+z6 IS6g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s9-v6si461041plk.490.2018.03.19.11.22.31; Mon, 19 Mar 2018 11:22:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031015AbeCSSUw (ORCPT + 99 others); Mon, 19 Mar 2018 14:20:52 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:47838 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S969555AbeCSSUr (ORCPT ); Mon, 19 Mar 2018 14:20:47 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 3BB3311D3; Mon, 19 Mar 2018 18:20:47 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Iyappan Subramanian , Quan Nguyen , "David S. Miller" , Sasha Levin Subject: [PATCH 4.9 030/241] drivers: net: xgene: Fix wrong logical operation Date: Mon, 19 Mar 2018 19:04:55 +0100 Message-Id: <20180319180752.415954080@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319180751.172155436@linuxfoundation.org> References: <20180319180751.172155436@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Quan Nguyen [ Upstream commit 11623fce0f9afef30c45e3f2120b063de3809a8f ] This patch fixes the wrong logical OR operation by changing it to bit-wise OR operation. Fixes: 3bb502f83080 ("drivers: net: xgene: fix statistics counters race condition") Signed-off-by: Iyappan Subramanian Signed-off-by: Quan Nguyen Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c @@ -537,9 +537,9 @@ static int xgene_enet_rx_frame(struct xg buf_pool->rx_skb[skb_index] = NULL; /* checking for error */ - status = (GET_VAL(ELERR, le64_to_cpu(raw_desc->m0)) << LERR_LEN) || + status = (GET_VAL(ELERR, le64_to_cpu(raw_desc->m0)) << LERR_LEN) | GET_VAL(LERR, le64_to_cpu(raw_desc->m0)); - if (unlikely(status > 2)) { + if (unlikely(status)) { dev_kfree_skb_any(skb); xgene_enet_parse_error(rx_ring, netdev_priv(rx_ring->ndev), status);