diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-10-28 08:17:54 +0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-10-28 08:39:09 +0400 |
commit | 2ed2d5b33cb564025b1eb90650d70a0a3592c0e3 (patch) | |
tree | 650796f8962c82818464f1c03feecbc9d0bc551f /fs/f2fs/dir.c | |
parent | b8b60e1a65893728ca868493cb4c4b64b55e7f9c (diff) | |
download | linux-2ed2d5b33cb564025b1eb90650d70a0a3592c0e3.tar.xz |
f2fs: fix a deadlock during init_acl procedure
The deadlock is found through the following scenario.
sys_mkdir()
-> f2fs_add_link()
-> __f2fs_add_link()
-> init_inode_metadata()
: lock_page(inode);
-> f2fs_init_acl()
-> f2fs_set_acl()
-> f2fs_setxattr(..., NULL)
: This NULL page incurs a deadlock at update_inode_page().
So, likewise f2fs_init_security(), this patch adds a parameter to transfer the
locked inode page to f2fs_setxattr().
Found by Linux File System Verification project (linuxtesting.org).
Reported-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/dir.c')
-rw-r--r-- | fs/f2fs/dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index 384c6daf9a89..c9d53fc510c5 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c @@ -346,7 +346,7 @@ static struct page *init_inode_metadata(struct inode *inode, goto error; } - err = f2fs_init_acl(inode, dir); + err = f2fs_init_acl(inode, dir, page); if (err) goto error; |