[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160912152159.590258099@linuxfoundation.org>
Date: Mon, 12 Sep 2016 18:58:45 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Dmitry Fleytman <dmitry@...nix.com>,
Leonid Bloch <leonid@...nix.com>,
Aaron Brown <aaron.f.brown@...el.com>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
Sasha Levin <alexander.levin@...izon.com>
Subject: [PATCH 4.4 016/192] [PATCH 016/135] e1000e: fix division by zero on jumbo MTUs
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
[ Upstream commit b77ac46bbae862dcb3f51296825c940404c69b0f ]
This patch fixes possible division by zero in receive
interrupt handler when working without adaptive interrupt
moderation.
The adaptive interrupt moderation mechanism is typically
disabled on jumbo MTUs.
Signed-off-by: Dmitry Fleytman <dmitry@...nix.com>
Signed-off-by: Leonid Bloch <leonid@...nix.com>
Tested-by: Aaron Brown <aaron.f.brown@...el.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Signed-off-by: Sasha Levin <alexander.levin@...izon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/net/ethernet/intel/e1000e/netdev.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -1959,8 +1959,10 @@ static irqreturn_t e1000_intr_msix_rx(in
* previous interrupt.
*/
if (rx_ring->set_itr) {
- writel(1000000000 / (rx_ring->itr_val * 256),
- rx_ring->itr_register);
+ u32 itr = rx_ring->itr_val ?
+ 1000000000 / (rx_ring->itr_val * 256) : 0;
+
+ writel(itr, rx_ring->itr_register);
rx_ring->set_itr = 0;
}
Powered by blists - more mailing lists