Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp394135ybl; Wed, 4 Dec 2019 04:39:05 -0800 (PST) X-Google-Smtp-Source: APXvYqwyFviWE7p73yK5KbU70ktuNGaq+X1QYJH8GEWrZuOgYxWTy56NCqbt5pTHldX/wUmUbL7W X-Received: by 2002:aca:c146:: with SMTP id r67mr2337118oif.61.1575463145555; Wed, 04 Dec 2019 04:39:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575463145; cv=none; d=google.com; s=arc-20160816; b=jUUb1wXyAJz4kFJmF5vye/SpMXEgjFkLmlyhJLP5fiSaqwGIKaa8nIUqxT/vR9JXA8 lT+Zpe8VY8HuIXyOucR3FyHtSwMTkIvqDoTY6FpPWWgfzDZpO/yKP8aEcQyGt5JMc1sV bR0un+HVbxdeqfMCtBohwHtGjaqsI0QnW1RVMCnSsFhGbDHZMYxnlHnYXTubsfVTQYQx QxFPWZqwtyNB+5HF4AiiKB6j6jxHAIOf+cqJjDY33siF8bufVD469eahPll6uGsVcFwz UNWb0Zt1uXSyTuHqvRnpoiOhNGC/HEWQORACI0uL396mxB+ZDEX6utxh5MELDww5UAg3 OjSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=W+6XHVRAEKHrXBIDuxqYjMYymgnEW1L1jJ9HfIbKRV4=; b=nwDa7ECIzwIV3b/Y/eYbS+kOx0l9LsOEjXKJc+mbAMygl7Gi4qhDwh7fFxIQgVqUHF VUxKkkWmaTiySBLnv4wiANDswLNsKdgMkjWStYOHs/RXDxRGq0pQQwDvRRwcaPxIPXME egn6tDvEtA8IaiQiw6oh4vjNLdI+dP40BLIreArt3JwVjusDUd58v72vKkteg628MV+S ICWzISzGJDD6ypIPoDkwmBPNdCn4OwQiYbHS0rMNUegj+La1w9NFuHI1qJRqaS8K8vx7 6EPDXB2yksVDNvYNV3Oeq8L68i7VWiKip479O8s94uF7YXNs5XBeY3+ywc5GgIOULiIw 9LIA== 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 l84si3079037oig.5.2019.12.04.04.38.53; Wed, 04 Dec 2019 04:39:05 -0800 (PST) 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 S1727820AbfLDMiS (ORCPT + 99 others); Wed, 4 Dec 2019 07:38:18 -0500 Received: from jabberwock.ucw.cz ([46.255.230.98]:54932 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726586AbfLDMiR (ORCPT ); Wed, 4 Dec 2019 07:38:17 -0500 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 4DD3F1C25CF; Wed, 4 Dec 2019 13:38:16 +0100 (CET) Date: Wed, 4 Dec 2019 13:38:15 +0100 From: Pavel Machek To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Huazhong Tan , "David S. Miller" , Sasha Levin Subject: Re: [PATCH 4.19 187/306] net: hns3: bugfix for is_valid_csq_clean_head() Message-ID: <20191204123815.GC29179@duo.ucw.cz> References: <20191127203114.766709977@linuxfoundation.org> <20191127203128.927710566@linuxfoundation.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZARJHfwaSJQLOEUz" Content-Disposition: inline In-Reply-To: <20191127203128.927710566@linuxfoundation.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ZARJHfwaSJQLOEUz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > From: Huazhong Tan >=20 > [ Upstream commit 6d71ec6cbf74ac9c2823ef751b1baa5b889bb3ac ] >=20 > The HEAD pointer of the hardware command queue maybe equal to the command > queue's next_to_use in the driver, so that does not belong to the invalid > HEAD pointer, since the hardware may not process the command in time, > causing the HEAD pointer to be too late to update. The variables' name > in this function is unreadable, so give them a more readable one. >=20 > +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_cmd.c > @@ -24,15 +24,15 @@ static int hclge_ring_space(struct hclge_cmq_ring *ri= ng) > return ring->desc_num - used - 1; > } > =20 > -static int is_valid_csq_clean_head(struct hclge_cmq_ring *ring, int h) > +static int is_valid_csq_clean_head(struct hclge_cmq_ring *ring, int head) > { =2E.. > - if (unlikely(h >=3D ring->desc_num)) > - return 0; This sanity check was removed, and it is not mentioned in the changelog. Is it intended? Best regards, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --ZARJHfwaSJQLOEUz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCXeeotwAKCRAw5/Bqldv6 8kw6AJ9lWCvcGClFCqWfamchhJ0Pm6qXagCdHMT7YH7MJa/eTaWTgXzxi06CY0U= =9rax -----END PGP SIGNATURE----- --ZARJHfwaSJQLOEUz--