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]
Message-ID: <49BA927F.8020701@dti2.net>
Date:	Fri, 13 Mar 2009 18:06:07 +0100
From:	"Jorge Boncompte [DTI2]" <jorge@...2.net>
To:	npiggin@...e.de
CC:	ext-adrian.hunter@...ia.com, LKML <linux-kernel@...r.kernel.org>
Subject: Re: Error testing ext3 on brd ramdisk

Nick Piggin escribió:
> On Tue, Mar 10, 2009 at 05:49:13PM +0100, Jorge Boncompte [DTI2] wrote:
>> Nick Piggin escribió:
>>> Ah, of course, it would be due to directory-in-pagecache. You need
>>> the following patch if you expect this to work.
>>>
>>> And that confirms the ext3 problem is a different one because it
>>> doesn't use directory in pagecache I think. Well, I'll look at
>>> that one tomorrow.
>>>
>>> Thanks,
>>> Nick
>>>
>>> ---
>>> fs/super.c |    2 ++
>>> 1 file changed, 2 insertions(+)
>>>
>>> Index: linux-2.6/fs/super.c
>>> ===================================================================
>>> --- linux-2.6.orig/fs/super.c
>>> +++ linux-2.6/fs/super.c
>>> @@ -644,6 +644,8 @@ int do_remount_sb(struct super_block *sb
>>> 		acct_auto_close(sb);
>>> 	shrink_dcache_sb(sb);
>>> 	fsync_super(sb);
>>> +	if (flags & MS_RDONLY)
>>> +		invalidate_bdev(sb->s_bdev);
>>>
>>> 	/* If we are remounting RDONLY and current sb is read/write,
>>> 	   make sure there are no rw files opened */
>>>
>>>
>>>
>>>
>> 	With this applied it seems I cannot reproduce the corruption, I have 
> 
> Ah, that sounds promising.
> 
>> 	to do more tests, but the box oopses on reboot after doing "umount -na -r".
> 
> Oh, silly me, s_bdev will be NULL for non block device based filesystems.
> If you check for s_bdev != NULL there too, it should work.

	Hi Nick, no problems noticed in the last days running with the below 
patch...

--- linux-2.6.29-rc8/fs/super.c       2009-03-13 13:46:19 +0100
+++ kernel/fs/super.c       2009-03-13 13:47:50 +0100
@@ -647,6 +647,8 @@ int do_remount_sb(struct super_block *sb
                 acct_auto_close(sb);
         shrink_dcache_sb(sb);
         fsync_super(sb);
+       if (sb->s_bdev && (flags & MS_RDONLY))
+               invalidate_bdev(sb->s_bdev);

         /* If we are remounting RDONLY and current sb is read/write,
            make sure there are no rw files opened */

-- 
==============================================================
Jorge Boncompte - Ingenieria y Gestion de RED
DTI2 - Desarrollo de la Tecnologia de las Comunicaciones
--------------------------------------------------------------
C/ Abogado Enriquez Barrios, 5   14004 CORDOBA (SPAIN)
Tlf: +34 957 761395 / FAX: +34 957 450380
==============================================================
- Sin pistachos no hay Rock & Roll...
- Without wicker a basket cannot be made.
==============================================================

--
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