Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2641632pxa; Mon, 17 Aug 2020 15:14:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxN6t4ZaRFjaNgINJ+l32tC29jSnvKRcPlE7DZrAjD+1UpMyptFiPQtZCqg+7/id/pi4bJS X-Received: by 2002:aa7:d516:: with SMTP id y22mr16904244edq.221.1597702469786; Mon, 17 Aug 2020 15:14:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597702469; cv=none; d=google.com; s=arc-20160816; b=QVtvhMpdijCX3uaiXWIG8Q8bcz2+opbBDiKJnkTwdQT2fT6jCXuuzaEEGJiDnine1n UULTQmPd5INf61ndSADCR/A+lJzg82Otc+1kuw9zVPpkBx5m3YOYh8yLti6GaqcN+JkX cSDuBSoY+TDmqjXbqwBwjxcbHutHuwhVwgz8xFyQ2bMwYpjHse9IVM+MblZIHZ3ORpGJ Mi4qYzoQDQZLDv/I6vgkaHsKv1NgWTE9fZEaB2uM8Gbs4621JO2YmibcGGqPTv3rPLH9 5CKrJvdgPp2KFkh3MGdO/RKemwmzXTHwYd0WQ4x7HXb7mo9CE0G2aajlLZO9JuIAVatB djlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=x8T7KGC8XM2VXEbpa8tSBL1Dyap6Y1MwQYpq/0ggDqo=; b=PIGTOWF2IPXzgMUVNAz+TTgEJSqvKQQH0rkjbAxuPX1T7yNRkBod1ZyuZEV5SnTyF4 thqARFAYFIU43lcMJjcZn8C2aFglrHCpVbkyMkbKfv6jpbkpfBLbJlpTMFRZs3DRsVM+ 1sPoJSKh/iYkC4XX6H5DP5lyd6jBWufvbu4wJ/TgjNVbomD46Did39wswYmxZpBLRFyK VsK7jprR/vFf/CPrYyQy/2It1O/MDN//qG8wuM3L+7pXXmua7IS7ZyJCmgdXdpf0eA5l do4W6Izv9uOee73gdoDTjT+YTZlz+NmGhR43q4BOXWG7eJ5550V+jHAJ8WpxphaaQmzz pvVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NLknyUzg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a26si11443689eds.337.2020.08.17.15.14.06; Mon, 17 Aug 2020 15:14:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NLknyUzg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388865AbgHQQwG (ORCPT + 99 others); Mon, 17 Aug 2020 12:52:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:50440 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730847AbgHQQCz (ORCPT ); Mon, 17 Aug 2020 12:02:55 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C89F620729; Mon, 17 Aug 2020 16:02:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597680175; bh=Xod+VzE1VPgUVP0IyRAqLiqOrCbqQE3tlugT8HfZHb8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NLknyUzgtW9Fk7L6+Q95whY6Bay0ZtEipqjT8pyXhNKt6mLtzk1xWJavxJtYwqTp1 qqGig6AZDQCIBOc7bkmurSKA7wNPtAYM8PMSkQIGXrLhmnW2f65n7Etp9xUOMkbQVY WaZTpHqyyLA7X5LbWQ9k7p3ENC4Mj/+lVSue8x4A= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shannon Nelson , "David S. Miller" , Sasha Levin Subject: [PATCH 5.4 081/270] ionic: update eid test for overflow Date: Mon, 17 Aug 2020 17:14:42 +0200 Message-Id: <20200817143759.801070926@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200817143755.807583758@linuxfoundation.org> References: <20200817143755.807583758@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shannon Nelson [ Upstream commit 3fbc9bb6ca32d12d4d32a7ae32abef67ac95f889 ] Fix up our comparison to better handle a potential (but largely unlikely) wrap around. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c index c00ec9a020973..e66002251596b 100644 --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c @@ -666,7 +666,7 @@ static bool ionic_notifyq_service(struct ionic_cq *cq, eid = le64_to_cpu(comp->event.eid); /* Have we run out of new completions to process? */ - if (eid <= lif->last_eid) + if ((s64)(eid - lif->last_eid) <= 0) return false; lif->last_eid = eid; -- 2.25.1