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>] [day] [month] [year] [list]
Message-ID: <20100811103550.GA6372@swordfish.minsk.epam.com>
Date:	Wed, 11 Aug 2010 13:35:50 +0300
From:	Sergey Senozhatsky <sergey.senozhatsky@...il.com>
To:	Al Viro <viro@...iv.linux.org.uk>
Cc:	Jan Kara <jack@...e.cz>, reiserfs-devel@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: convert reiserfs to ->evict_inode()

Hello,

commit 845a2cc0507055278e0fa722ed0f8c791b7401dd introduced:

@@ -77,9 +79,14 @@ void reiserfs_delete_inode(struct inode *inode)
                ;
        }
       out:
-       clear_inode(inode);     /* note this must go after the journal_end to prevent deadlock */
+       end_writeback(inode);   /* note this must go after the journal_end to prevent deadlock */
+       dquot_drop(inode);
        inode->i_blocks = 0;
        reiserfs_write_unlock_once(inode->i_sb, depth);
+
+no_delete:
+       end_writeback(inode);
+       dquot_drop(inode);
 }


We will have problems here when going to end_writeback second time.

Probably should be:
@@ -77,9 +79,14 @@ void reiserfs_delete_inode(struct inode *inode)
                ;                                                 
        }        
       out:   
-       clear_inode(inode);     /* note this must go after the journal_end to prevent deadlock */
+       end_writeback(inode);   /* note this must go after the journal_end to prevent deadlock */
+       dquot_drop(inode);
        inode->i_blocks = 0;
        reiserfs_write_unlock_once(inode->i_sb, depth);
+	return;
	^^^^^^
+
+no_delete:
+       end_writeback(inode);
+       dquot_drop(inode);
 }



[ 2347.942981] kernel BUG at fs/inode.c:298!
[ 2347.945553] invalid opcode: 0000 [#8] PREEMPT SMP 
[ 2347.948133] last sysfs file: /sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:13/PNP0C0A:00/power_supply/BAT0/current_now
[ 2347.950770] CPU 2 
[ 2347.950791] Modules linked in: ipv6 snd_hwdep snd_hda_codec_atihdmi snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_hda_codec_realtek snd_mixer_oss ac battery snd_hda_intel snd_hda_codec snd_pcm
snd_timer wmi snd soundcore snd_page_alloc button processor thermal broadcom usbhid hid tg3 libphy psmouse intel_ips serio_raw evdev radeon ttm drm_kms_helper ehci_hcd sr_mod usbcore cdrom sd_mod ahci libahci
[ 2347.961651] 
[ 2347.964423] Pid: 6301, comm: mconf Tainted: G      D     2.6.36-rc0-git11-07128-g4104046-dirty #104 Aspire 5741G    /Aspire 5741G    
[ 2347.967369] RIP: 0010:[<ffffffff810ebc58>]  [<ffffffff810ebc58>] end_writeback+0x3b/0x6d
[ 2347.967388] RSP: 0018:ffff8801359d5ca8  EFLAGS: 00010202
[ 2347.967394] RAX: 0000000000000060 RBX: ffff880123120a58 RCX: 00000000ffffffff
[ 2347.967400] RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff880123120a58
[ 2347.967406] RBP: ffff8801359d5cb8 R08: 000000000002428a R09: 000000000002428a
[ 2347.967411] R10: ffff8801359d5828 R11: ffff8801359d58b8 R12: 0000000000000000
[ 2347.967417] R13: 0000000000000024 R14: 00000000ffffffff R15: 0000000000000000
[ 2347.967425] FS:  00002b1e2b68fde0(0000) GS:ffff880002280000(0000) knlGS:0000000000000000
[ 2347.967431] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 2347.967436] CR2: 00002b1e2b3934d0 CR3: 000000013599a000 CR4: 00000000000006e0
[ 2347.967442] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 2347.967448] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 2347.967455] Process mconf (pid: 6301, threadinfo ffff8801359d4000, task ffff880155700000)
[ 2347.967460] Stack:
[ 2347.967463]  ffff8801359d5cb8 ffff880123120a58 ffff8801359d5d28 ffffffff8113a1f8
[ 2347.967472] <0> ffff880155543800 0000000000000000 0000000000000000 0000000000000000
[ 2347.967481] <0> 0000000000000000 0000000000000000 0000000000000000 0000000000000001
[ 2347.967491] Call Trace:
[ 2347.967502]  [<ffffffff8113a1f8>] reiserfs_evict_inode+0x13c/0x151
[ 2347.967513]  [<ffffffff810ebcac>] evict+0x22/0x92
[ 2347.967517]  [<ffffffff810ec884>] iput+0x1c8/0x228
[ 2347.967521]  [<ffffffff810e8e64>] dentry_iput+0xb0/0xc8
[ 2347.967525]  [<ffffffff810e8ec8>] d_kill+0x4c/0x6c
[ 2347.967528]  [<ffffffff810e9719>] dput+0x14c/0x159
[ 2347.967532]  [<ffffffff810e53f0>] sys_renameat+0x1ae/0x200
[ 2347.967541]  [<ffffffff810557b9>] ? up_read+0x1e/0x35
[ 2347.967546]  [<ffffffff81022150>] ? do_page_fault+0x32b/0x36b
[ 2347.967552]  [<ffffffff810bff27>] ? do_munmap+0x2c3/0x2dc
[ 2347.967558]  [<ffffffff8136d7d6>] ? lockdep_sys_exit_thunk+0x35/0x67
[ 2347.967562]  [<ffffffff810e5458>] sys_rename+0x16/0x1a
[ 2347.967568]  [<ffffffff81002002>] system_call_fastpath+0x16/0x1b


	Sergey
Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ