]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext4: don't return to userspace after freezing the fs with a mutex held
authorEric Sandeen <sandeen@redhat.com>
Mon, 31 May 2010 02:49:50 +0000 (22:49 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 Aug 2010 17:21:19 +0000 (10:21 -0700)
commite6afda19e101a5c85eb43ec49f00b8336002f2cd
treea62e5199ecf24331698639be519d20316aff3c86
parentad86a2309c447ebd7fb238f6bafb268e6b7e95b5
ext4: don't return to userspace after freezing the fs with a mutex held

commit 6b0310fbf087ad6e9e3b8392adca97cd77184084 upstream (as of v2.6.34-git13)

ext4_freeze() used jbd2_journal_lock_updates() which takes
the j_barrier mutex, and then returns to userspace.  The
kernel does not like this:

================================================
[ BUG: lock held when returning to user space! ]
------------------------------------------------
lvcreate/1075 is leaving the kernel with locks still held!
1 lock held by lvcreate/1075:
 #0:  (&journal->j_barrier){+.+...}, at: [<ffffffff811c6214>]
jbd2_journal_lock_updates+0xe1/0xf0

Use vfs_check_frozen() added to ext4_journal_start_sb() and
ext4_force_commit() instead.

Addresses-Red-Hat-Bugzilla: #568503

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ext4/super.c