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>] [day] [month] [year] [list]
Message-Id: <201109072137.p87LbV51024857@d01av04.pok.ibm.com>
Date:	Wed, 07 Sep 2011 16:37:34 -0500
From:	Brian King <brking@...ux.vnet.ibm.com>
To:	netdev@...r.kernel.org
Cc:	santil@...ux.vnet.ibm.com, anton@...ba.org,
	brking@...ux.vnet.ibm.com
Subject: [PATCH 1/1] ibmveth: Fix DMA unmap error


Commit 6e8ab30ec677925e8999a9f5bdb028736d22d48c introduced a DMA mapping
API inconsistency resulting in dma_unmap_page getting called on memory
mapped via dma_map_single. This was seen when CONFIG_DMA_API_DEBUG was
enabled. Fix up this API usage inconsistency.

Signed-off-by: Brian King <brking@...ux.vnet.ibm.com>
---

 drivers/net/ibmveth.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff -puN drivers/net/ibmveth.c~ibmveth_fix_mapping_issue drivers/net/ibmveth.c
--- linux-2.6/drivers/net/ibmveth.c~ibmveth_fix_mapping_issue	2011-09-07 16:28:19.000000000 -0500
+++ linux-2.6-bjking1/drivers/net/ibmveth.c	2011-09-07 16:28:19.000000000 -0500
@@ -1026,7 +1026,12 @@ retry_bounce:
 		netdev->stats.tx_bytes += skb->len;
 	}
 
-	for (i = 0; i < skb_shinfo(skb)->nr_frags + 1; i++)
+	dma_unmap_single(&adapter->vdev->dev,
+			 descs[0].fields.address,
+			 descs[0].fields.flags_len & IBMVETH_BUF_LEN_MASK,
+			 DMA_TO_DEVICE);
+
+	for (i = 1; i < skb_shinfo(skb)->nr_frags + 1; i++)
 		dma_unmap_page(&adapter->vdev->dev, descs[i].fields.address,
 			       descs[i].fields.flags_len & IBMVETH_BUF_LEN_MASK,
 			       DMA_TO_DEVICE);
_
--
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