You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
2.3 KiB
61 lines
2.3 KiB
From cc5ba2a52846c54f6be4668a790d82ea260b51a1 Mon Sep 17 00:00:00 2001
|
|
From: Igor Russkikh <irusskik@redhat.com>
|
|
Date: Fri, 6 Nov 2020 18:36:51 -0500
|
|
Subject: [PATCH 034/139] [netdrv] net: aquantia: fix unintention integer
|
|
overflow on left shift
|
|
|
|
Message-id: <1604687916-15087-35-git-send-email-irusskik@redhat.com>
|
|
Patchwork-id: 338462
|
|
Patchwork-instance: patchwork
|
|
O-Subject: [RHEL8.4 BZ 1857861 034/139] net: aquantia: fix unintention integer overflow on left shift
|
|
Bugzilla: 1857861
|
|
RH-Acked-by: David Arcari <darcari@redhat.com>
|
|
RH-Acked-by: John Linville <linville@redhat.com>
|
|
RH-Acked-by: Tony Camuso <tcamuso@redhat.com>
|
|
|
|
Bugzilla: http://bugzilla.redhat.com/1857861
|
|
|
|
commit 92d72f1b8bbbd87220daa49cd1253ce72bb7553c
|
|
Author: Colin Ian King <colin.king@canonical.com>
|
|
Date: Fri Oct 25 12:58:11 2019 +0100
|
|
|
|
net: aquantia: fix unintention integer overflow on left shift
|
|
|
|
Shifting the integer value 1 is evaluated using 32-bit
|
|
arithmetic and then used in an expression that expects a 64-bit
|
|
value, so there is potentially an integer overflow. Fix this
|
|
by using the BIT_ULL macro to perform the shift and avoid the
|
|
overflow.
|
|
|
|
Addresses-Coverity: ("Unintentional integer overflow")
|
|
Fixes: 04a1839950d9 ("net: aquantia: implement data PTP datapath")
|
|
Signed-off-by: Colin Ian King <colin.king@canonical.com>
|
|
Reviewed-by: Igor Russkikh <irusskikh@marvell.com>
|
|
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
|
|
Signed-off-by: Igor Russkikh <irusskik@redhat.com>
|
|
|
|
Cc: David Arcari <darcari@redhat.com>
|
|
Cc: Igor Russkikh <irusskik@redhat.com>
|
|
Signed-off-by: Jan Stancek <jstancek@redhat.com>
|
|
---
|
|
drivers/net/ethernet/aquantia/atlantic/aq_ptp.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c b/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
|
|
index 1b3be0553e31..dca092f454b4 100644
|
|
--- a/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
|
|
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_ptp.c
|
|
@@ -713,7 +713,7 @@ static int aq_ptp_poll(struct napi_struct *napi, int budget)
|
|
if (work_done < budget) {
|
|
napi_complete_done(napi, work_done);
|
|
aq_nic->aq_hw_ops->hw_irq_enable(aq_nic->aq_hw,
|
|
- 1 << aq_ptp->ptp_ring_param.vec_idx);
|
|
+ BIT_ULL(aq_ptp->ptp_ring_param.vec_idx));
|
|
}
|
|
|
|
err_exit:
|
|
--
|
|
2.13.6
|
|
|