This is a note to let you know that I've just added the patch titled
udf: Fix deadlock in udf_release_file()
to the 3.0-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
udf-fix-deadlock-in-udf_release_file.patch
and it can be found in the queue-3.0 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From a0391a3ae91d301c0e59368531a4de5f0b122bcf Mon Sep 17 00:00:00 2001
From: Jan Kara <[email protected]>
Date: Mon, 20 Feb 2012 17:49:56 +0100
Subject: udf: Fix deadlock in udf_release_file()
From: Jan Kara <[email protected]>
commit a0391a3ae91d301c0e59368531a4de5f0b122bcf upstream.
udf_release_file() can be called from munmap() path with mmap_sem held. Thus
we cannot take i_mutex there because that ranks above mmap_sem. Luckily,
i_mutex is not needed in udf_release_file() anymore since protection by
i_data_sem is enough to protect from races with write and truncate.
Reported-by: Al Viro <[email protected]>
Reviewed-by: Namjae Jeon <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
fs/udf/file.c | 2 --
1 file changed, 2 deletions(-)
--- a/fs/udf/file.c
+++ b/fs/udf/file.c
@@ -201,12 +201,10 @@ out:
static int udf_release_file(struct inode *inode, struct file *filp)
{
if (filp->f_mode & FMODE_WRITE) {
- mutex_lock(&inode->i_mutex);
down_write(&UDF_I(inode)->i_data_sem);
udf_discard_prealloc(inode);
udf_truncate_tail_extent(inode);
up_write(&UDF_I(inode)->i_data_sem);
- mutex_unlock(&inode->i_mutex);
}
return 0;
}
Patches currently in stable-queue which might be from [email protected] are
queue-3.0/ext4-flush-any-pending-end_io-requests-before-dio-reads-w-dioread_nolock.patch
queue-3.0/udf-fix-deadlock-in-udf_release_file.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html