summaryrefslogtreecommitdiff
path: root/fs/lockd
diff options
context:
space:
mode:
authoralex chen <alex.chen@huawei.com>2015-04-14 22:43:49 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-14 23:48:58 (GMT)
commit2f2eca20a09dac0e9d62bf57ce6a0c6ef6cf91e6 (patch)
tree481e731e8379647344f431c7b72c7ac15f46b984 /fs/lockd
parent1543306e75ee40662b2c6d37c43c8659f3d6f880 (diff)
downloadlinux-2f2eca20a09dac0e9d62bf57ce6a0c6ef6cf91e6.tar.xz
ocfs2: check if the ocfs2 lock resource has been initialized before calling ocfs2_dlm_lock
If ocfs2 lockres has not been initialized before calling ocfs2_dlm_lock, the lock won't be dropped and then will lead umount hung. The case is described below: ocfs2_mknod ocfs2_mknod_locked __ocfs2_mknod_locked ocfs2_journal_access_di Failed because of -ENOMEM or other reasons, the inode lockres has not been initialized yet. iput(inode) ocfs2_evict_inode ocfs2_delete_inode ocfs2_inode_lock ocfs2_inode_lock_full_nested __ocfs2_cluster_lock Succeeds and allocates a new dlm lockres. ocfs2_clear_inode ocfs2_open_unlock ocfs2_drop_inode_locks ocfs2_drop_lock Since lockres has not been initialized, the lock can't be dropped and the lockres can't be migrated, thus umount will hang forever. Signed-off-by: Alex Chen <alex.chen@huawei.com> Reviewed-by: Joseph Qi <joseph.qi@huawei.com> Reviewed-by: joyce.xue <xuejiufei@huawei.com> Cc: Mark Fasheh <mfasheh@suse.com> Cc: Joel Becker <jlbec@evilplan.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/lockd')
0 files changed, 0 insertions, 0 deletions