lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <80769D7B14936844A23C0C43D9FBCF0F12D49A2CE7@orsmsx501.amr.corp.intel.com>
Date:	Tue, 12 Jan 2010 12:52:31 -0800
From:	"Duyck, Alexander H" <alexander.h.duyck@...el.com>
To:	Anton Blanchard <anton@...ba.org>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>,
	"Brandeburg, Jesse" <jesse.brandeburg@...el.com>,
	"Allan, Bruce W" <bruce.w.allan@...el.com>,
	"Waskiewicz Jr, Peter P" <peter.p.waskiewicz.jr@...el.com>,
	"Ronciak, John" <john.ronciak@...el.com>,
	"Skidmore, Donald C" <donald.c.skidmore@...el.com>,
	"Zou, Yi" <yi.zou@...el.com>
CC:	"e1000-devel@...ts.sourceforge.net" 
	<e1000-devel@...ts.sourceforge.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH] ixgbe: Fix ixgbe_tx_map error path

Actually it looks like the bug for ixgbe is in the while (count >= 0) check.  It should be just while (count > 0) insead.

It also appears there is an issue I may have introduced in igb as well.  I will go back through the drivers and see about submitting some patches to address these issues.

Thanks,

Alex

-----Original Message-----
From: Anton Blanchard [mailto:anton@...ba.org] 
Sent: Tuesday, January 12, 2010 3:02 AM
To: Kirsher, Jeffrey T; Brandeburg, Jesse; Allan, Bruce W; Waskiewicz Jr, Peter P; Ronciak, John; Skidmore, Donald C; Zou, Yi; Duyck, Alexander H
Cc: e1000-devel@...ts.sourceforge.net; netdev@...r.kernel.org
Subject: [PATCH] ixgbe: Fix ixgbe_tx_map error path


Commit e5a43549f7a58509a91b299a51337d386697b92c (ixgbe: remove
skb_dma_map/unmap calls from driver) looks to have introduced a bug in
ixgbe_tx_map. If we get an error from a PCI DMA call, we loop backwards
through count until it becomes -1 and return that.

The caller of ixgbe_tx_map expects 0 on error, so return that instead.

---

diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 1a2ea62..af660ba 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -5174,7 +5174,7 @@ dma_error:
 		ixgbe_unmap_and_free_tx_resource(adapter, tx_buffer_info);
 	}
 
-	return count;
+	return 0;
 }
 
 static void ixgbe_tx_queue(struct ixgbe_adapter *adapter,
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ