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]
Message-Id: <20120213162008.a9a3092bec076bcf0f05c261@canb.auug.org.au>
Date:	Mon, 13 Feb 2012 16:20:08 +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,
	Nitin Gupta <ngupta@...are.org>, Greg KH <greg@...ah.com>
Subject: linux-next: manual merge of the kmap_atomic tree with the staging
 tree

Hi Cong,

Today's linux-next merge of the kmap_atomic tree got a conflict in
drivers/staging/zram/zram_drv.c between commit fd1a30dea194 ("staging:
zram: replace xvmalloc with zsmalloc") from the staging tree and commit
ea81cfe7d7fb ("zram: 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/staging/zram/zram_drv.c
index 5833156,1cf68ad..0000000
--- a/drivers/staging/zram/zram_drv.c
+++ b/drivers/staging/zram/zram_drv.c
@@@ -188,12 -195,12 +188,12 @@@ static void handle_uncompressed_page(st
  	struct page *page = bvec->bv_page;
  	unsigned char *user_mem, *cmem;
  
- 	user_mem = kmap_atomic(page, KM_USER0);
- 	cmem = kmap_atomic(zram->table[index].handle, KM_USER1);
+ 	user_mem = kmap_atomic(page);
 -	cmem = kmap_atomic(zram->table[index].page);
++	cmem = kmap_atomic(zram->table[index].handle);
  
  	memcpy(user_mem + bvec->bv_offset, cmem + offset, bvec->bv_len);
- 	kunmap_atomic(cmem, KM_USER1);
- 	kunmap_atomic(user_mem, KM_USER0);
+ 	kunmap_atomic(cmem);
+ 	kunmap_atomic(user_mem);
  
  	flush_dcache_page(page);
  }
@@@ -259,8 -267,8 +259,8 @@@ static int zram_bvec_read(struct zram *
  		kfree(uncmem);
  	}
  
 -	kunmap_atomic(cmem);
 +	zs_unmap_object(zram->mem_pool, zram->table[index].handle);
- 	kunmap_atomic(user_mem, KM_USER0);
+ 	kunmap_atomic(user_mem);
  
  	/* Should NEVER happen. Return bio error if it does. */
  	if (unlikely(ret != LZO_E_OK)) {
@@@ -399,9 -407,8 +399,9 @@@ static int zram_bvec_write(struct zram 
  		store_offset = 0;
  		zram_set_flag(zram, index, ZRAM_UNCOMPRESSED);
  		zram_stat_inc(&zram->stats.pages_expand);
 -		zram->table[index].page = page_store;
 +		handle = page_store;
- 		src = kmap_atomic(page, KM_USER0);
- 		cmem = kmap_atomic(page_store, KM_USER1);
+ 		src = kmap_atomic(page);
++		cmem = kmap_atomic(page_store);
  		goto memstore;
  	}
  
@@@ -426,15 -438,9 +426,15 @@@ memstore
  
  	memcpy(cmem, src, clen);
  
 -	kunmap_atomic(cmem);
 -	if (unlikely(zram_test_flag(zram, index, ZRAM_UNCOMPRESSED)))
 +	if (unlikely(zram_test_flag(zram, index, ZRAM_UNCOMPRESSED))) {
- 		kunmap_atomic(cmem, KM_USER1);
- 		kunmap_atomic(src, KM_USER0);
++		kunmap_atomic(cmem);
+ 		kunmap_atomic(src);
 +	} else {
 +		zs_unmap_object(zram->mem_pool, handle);
 +	}
 +
 +	zram->table[index].handle = handle;
 +	zram->table[index].size = clen;
  
  	/* Update stats */
  	zram_stat64_add(zram, &zram->stats.compr_size, clen);

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ