]> 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>
Sun, 16 May 2010 06:00:00 +0000 (02:00 -0400)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 6 Jan 2011 23:07:34 +0000 (18:07 -0500)
commit924a7b8465438c478074ce82321f3d44ef2ba67b
tree86cc632e770f3e4893887f57a4accdb91d139bac
parent8b2b0f0ea18f2f696fc18eaff89ac3ab0e512150
ext4: don't return to userspace after freezing the fs with a mutex held

commit 6b0310fbf087ad6e9e3b8392adca97cd77184084 upstream.

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: Paul Gortmaker <paul.gortmaker@windriver.com>
fs/ext4/super.c