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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 9 Mar 2012 16:34:57 +0800
From:	Yang Bai <hamo.by@...il.com>
To:	Jan Kara <jack@...e.cz>
Cc:	Fengguang Wu <fengguang.wu@...el.com>,
	Dave Jones <davej@...hat.com>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	Fedora Kernel Team <kernel-team@...oraproject.org>,
	viro@...iv.linux.org.uk, Christoph Hellwig <hch@...radead.org>
Subject: Re: inode->i_wb_list corruption.

On Wed, Mar 7, 2012 at 6:42 PM, Jan Kara <jack@...e.cz> wrote:
> On Tue 06-03-12 23:26:08, Wu Fengguang wrote:
>  Umm, it's not *that* simple I'd say. E.g. sysfs doesn't provide
> alloc_inode() method so we use inode_cachep for allocations. And that cache
> is configured to use inode_init_once().
>
> Also note that the error message is:
> list_del corruption. prev->next should be ffff8801c2f41b18, but was (null)
>
> Which means that our inode had correct i_wb_list.prev but the previous
> inode had NULL in i_wb_list.next. But that means that both inodes were
> linked into the list at some point. So it does not seem like an
> initialization issue to me...
>
>                                                                Honza
>
I still want to know how to reproduce this bug. I add the following
patch to the kernel fc-16 3.2.9-1

diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 5b4a936..568ed0a 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -192,8 +192,13 @@ void bdi_start_background_writeback(struct
backing_dev_info *bdi)
 void inode_wb_list_del(struct inode *inode)
 {
 	struct backing_dev_info *bdi = inode_to_bdi(inode);
+	struct list_head *pos;

 	spin_lock(&bdi->wb.list_lock);
+	list_for_each(pos, &inode->i_wb_list) {
+		printk(KERN_EMERG "list entry: %p; next: %p; prev: %p",
+		       pos, pos->next, pos->prev);
+	}
 	list_del_init(&inode->i_wb_list);
 	spin_unlock(&bdi->wb.list_lock);
 }

So on every inode_wb_list_del, it will show the whole list.

and Doing while true; do touch a && rm -f a; done for almost one day
without any problem.

So How to reproduce it??

Thanks,
Yang
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ