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-next>] [day] [month] [year] [list]
Date:	Wed, 8 Feb 2012 15:10:57 +1100
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Cong Wang <amwang@...hat.com>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	David Miller <davem@...emloft.net>, <netdev@...r.kernel.org>,
	Bruce Allan <bruce.w.allan@...el.com>,
	Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Subject: linux-next: manual merge of the kmap_atomic tree with the  tree

Hi Cong,

Today's linux-next merge of the kmap_atomic tree got a conflict in
drivers/net/ethernet/intel/e1000e/netdev.c between commit 0e15df490eef
("e1000e: minor whitespace and indentation cleanup") from the net-next
tree and commit 2b4ba510a572 ("net: remove the second argument of k
[un]map_atomic()") from the kmap_atomic tree.

I fixed it up (see below) and can carry the fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

diff --cc drivers/net/ethernet/intel/e1000e/netdev.c
index 293a760,7a1ea1d..0000000
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@@ -1267,49 -1253,43 +1267,48 @@@ static bool e1000_clean_rx_irq_ps(struc
  		skb_put(skb, length);
  
  		{
 -		/*
 -		 * this looks ugly, but it seems compiler issues make it
 -		 * more efficient than reusing j
 -		 */
 -		int l1 = le16_to_cpu(rx_desc->wb.upper.length[0]);
 -
 -		/*
 -		 * page alloc/put takes too long and effects small packet
 -		 * throughput, so unsplit small packets and save the alloc/put
 -		 * only valid in softirq (napi) context to call kmap_*
 -		 */
 -		if (l1 && (l1 <= copybreak) &&
 -		    ((length + l1) <= adapter->rx_ps_bsize0)) {
 -			u8 *vaddr;
 -
 -			ps_page = &buffer_info->ps_pages[0];
 +			/*
 +			 * this looks ugly, but it seems compiler issues make
 +			 * it more efficient than reusing j
 +			 */
 +			int l1 = le16_to_cpu(rx_desc->wb.upper.length[0]);
  
  			/*
 -			 * there is no documentation about how to call
 -			 * kmap_atomic, so we can't hold the mapping
 -			 * very long
 +			 * page alloc/put takes too long and effects small
 +			 * packet throughput, so unsplit small packets and
 +			 * save the alloc/put only valid in softirq (napi)
 +			 * context to call kmap_*
  			 */
 -			dma_sync_single_for_cpu(&pdev->dev, ps_page->dma,
 -						PAGE_SIZE, DMA_FROM_DEVICE);
 -			vaddr = kmap_atomic(ps_page->page);
 -			memcpy(skb_tail_pointer(skb), vaddr, l1);
 -			kunmap_atomic(vaddr);
 -			dma_sync_single_for_device(&pdev->dev, ps_page->dma,
 -						   PAGE_SIZE, DMA_FROM_DEVICE);
 -
 -			/* remove the CRC */
 -			if (!(adapter->flags2 & FLAG2_CRC_STRIPPING))
 -				l1 -= 4;
 -
 -			skb_put(skb, l1);
 -			goto copydone;
 -		} /* if */
 +			if (l1 && (l1 <= copybreak) &&
 +			    ((length + l1) <= adapter->rx_ps_bsize0)) {
 +				u8 *vaddr;
 +
 +				ps_page = &buffer_info->ps_pages[0];
 +
 +				/*
 +				 * there is no documentation about how to call
 +				 * kmap_atomic, so we can't hold the mapping
 +				 * very long
 +				 */
 +				dma_sync_single_for_cpu(&pdev->dev,
 +							ps_page->dma,
 +							PAGE_SIZE,
 +							DMA_FROM_DEVICE);
- 				vaddr = kmap_atomic(ps_page->page,
- 						    KM_SKB_DATA_SOFTIRQ);
++				vaddr = kmap_atomic(ps_page->page);
 +				memcpy(skb_tail_pointer(skb), vaddr, l1);
- 				kunmap_atomic(vaddr, KM_SKB_DATA_SOFTIRQ);
++				kunmap_atomic(vaddr);
 +				dma_sync_single_for_device(&pdev->dev,
 +							   ps_page->dma,
 +							   PAGE_SIZE,
 +							   DMA_FROM_DEVICE);
 +
 +				/* remove the CRC */
 +				if (!(adapter->flags2 & FLAG2_CRC_STRIPPING))
 +					l1 -= 4;
 +
 +				skb_put(skb, l1);
 +				goto copydone;
 +			} /* if */
  		}
  
  		for (j = 0; j < PS_PAGE_BUFFERS; j++) {

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ