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:	Thu, 17 Jan 2013 13:35:33 +1100
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Greg KH <greg@...ah.com>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Nitin Gupta <ngupta@...are.org>,
	Davidlohr Bueso <davidlohr.bueso@...com>
Subject: linux-next: manual merge of the staging tree with Linus' tree

Hi Greg,

Today's linux-next merge of the staging tree got a conflict in
drivers/staging/zram/zram_drv.c between commit 397c60668aa5 ("staging:
zram: fix invalid memory references during disk write") from Linus' tree
and commit d178a07c4bd3 ("staging: zram: drop zram_stat_dec/inc
functions") from the staging tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

diff --cc drivers/staging/zram/zram_drv.c
index f2a73bd,6762b99..0000000
--- a/drivers/staging/zram/zram_drv.c
+++ b/drivers/staging/zram/zram_drv.c
@@@ -300,19 -291,17 +289,19 @@@ static int zram_bvec_write(struct zram 
  
  	user_mem = kmap_atomic(page);
  
 -	if (is_partial_io(bvec))
 +	if (is_partial_io(bvec)) {
  		memcpy(uncmem + offset, user_mem + bvec->bv_offset,
  		       bvec->bv_len);
 -	else
 +		kunmap_atomic(user_mem);
 +		user_mem = NULL;
 +	} else {
  		uncmem = user_mem;
 +	}
  
  	if (page_zero_filled(uncmem)) {
 -		kunmap_atomic(user_mem);
 -		if (is_partial_io(bvec))
 -			kfree(uncmem);
 +		if (!is_partial_io(bvec))
 +			kunmap_atomic(user_mem);
- 		zram_stat_inc(&zram->stats.pages_zero);
+ 		zram->stats.pages_zero++;
  		zram_set_flag(zram, index, ZRAM_ZERO);
  		ret = 0;
  		goto out;
@@@ -333,11 -320,9 +322,11 @@@
  	}
  
  	if (unlikely(clen > max_zpage_size)) {
- 		zram_stat_inc(&zram->stats.bad_compress);
+ 		zram->stats.bad_compress++;
 -		src = uncmem;
  		clen = PAGE_SIZE;
 +		src = NULL;
 +		if (is_partial_io(bvec))
 +			src = uncmem;
  	}
  
  	handle = zs_malloc(zram->mem_pool, clen);
@@@ -362,14 -343,13 +351,14 @@@
  
  	/* Update stats */
  	zram_stat64_add(zram, &zram->stats.compr_size, clen);
- 	zram_stat_inc(&zram->stats.pages_stored);
+ 	zram->stats.pages_stored++;
  	if (clen <= PAGE_SIZE / 2)
- 		zram_stat_inc(&zram->stats.good_compress);
+ 		zram->stats.good_compress++;
  
 -	return 0;
 -
  out:
 +	if (is_partial_io(bvec))
 +		kfree(uncmem);
 +
  	if (ret)
  		zram_stat64_inc(zram, &zram->stats.failed_writes);
  	return ret;

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ