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, 28 Dec 2011 12:48:33 +1100
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Artem Bityutskiy <dedekind1@...il.com>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Prasad Joshi <prasadjoshi.linux@...il.com>,
	"Jörn Engel" <joern@...fs.org>
Subject: linux-next: manual merge of the l2-mtd tree with the logfs tree

Hi Artem,

Today's linux-next merge of the l2-mtd tree got a conflict in
fs/logfs/dev_mtd.c between commit d1cc3ad397f2 ("Logfs: Allow NULL
block_isbad() methods") from the  tree and commit 22aed0c2578c ("mtd:
introduce mtd_block_isbad interface") from the l2-mtd tree.

I fixed it up (see below) and can carry the fix as necessary.  I am a
little worried that the block_isbad member of struct mtd_info may be
hidden in the future and so break the NULL checks here.
-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

diff --cc fs/logfs/dev_mtd.c
index d054d7e,136c736..0000000
--- a/fs/logfs/dev_mtd.c
+++ b/fs/logfs/dev_mtd.c
@@@ -147,16 -150,17 +150,16 @@@ static struct page *logfs_mtd_find_firs
  {
  	struct logfs_super *super = logfs_super(sb);
  	struct address_space *mapping = super->s_mapping_inode->i_mapping;
- 	filler_t *filler = mtd_readpage;
+ 	filler_t *filler = logfs_mtd_readpage;
  	struct mtd_info *mtd = super->s_mtd;
  
 -	if (!mtd->block_isbad)
 -		return NULL;
 -
  	*ofs = 0;
 -	while (mtd_block_isbad(mtd, *ofs)) {
 -		*ofs += mtd->erasesize;
 -		if (*ofs >= mtd->size)
 -			return NULL;
 +	if (mtd->block_isbad) {
- 		while (mtd->block_isbad(mtd, *ofs)) {
++		while (mtd_block_isbad(mtd, *ofs)) {
 +			*ofs += mtd->erasesize;
 +			if (*ofs >= mtd->size)
 +				return NULL;
 +		}
  	}
  	BUG_ON(*ofs & ~PAGE_MASK);
  	return read_cache_page(mapping, *ofs >> PAGE_SHIFT, filler, sb);
@@@ -166,16 -170,17 +169,16 @@@ static struct page *logfs_mtd_find_last
  {
  	struct logfs_super *super = logfs_super(sb);
  	struct address_space *mapping = super->s_mapping_inode->i_mapping;
- 	filler_t *filler = mtd_readpage;
+ 	filler_t *filler = logfs_mtd_readpage;
  	struct mtd_info *mtd = super->s_mtd;
  
 -	if (!mtd->block_isbad)
 -		return NULL;
 -
  	*ofs = mtd->size - mtd->erasesize;
 -	while (mtd_block_isbad(mtd, *ofs)) {
 -		*ofs -= mtd->erasesize;
 -		if (*ofs <= 0)
 -			return NULL;
 +	if (mtd->block_isbad) {
- 		while (mtd->block_isbad(mtd, *ofs)) {
++		while (mtd_block_isbad(mtd, *ofs)) {
 +			*ofs -= mtd->erasesize;
 +			if (*ofs <= 0)
 +				return NULL;
 +		}
  	}
  	*ofs = *ofs + mtd->erasesize - 0x1000;
  	BUG_ON(*ofs & ~PAGE_MASK);

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ