]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ocfs2/dlm: fix BUG in dlm_move_lockres_to_recovery_list
authorJoseph Qi <joseph.qi@huawei.com>
Fri, 25 Mar 2016 21:21:29 +0000 (14:21 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 26 May 2016 22:46:40 +0000 (15:46 -0700)
commita2d7c3612f658ce30f2c2eb738865a81f2ace80e
tree5c98bf112e8bc06106d869790d578fa5744bb207
parent863411544adc86bb8ca44a70f2a78a6dcc11b466
ocfs2/dlm: fix BUG in dlm_move_lockres_to_recovery_list

Orabug: 23331156

[ Upstream commit be12b299a83fc807bbaccd2bcb8ec50cbb0cb55c ]

When master handles convert request, it queues ast first and then
returns status.  This may happen that the ast is sent before the request
status because the above two messages are sent by two threads.  And
right after the ast is sent, if master down, it may trigger BUG in
dlm_move_lockres_to_recovery_list in the requested node because ast
handler moves it to grant list without clear lock->convert_pending.  So
remove BUG_ON statement and check if the ast is processed in
dlmconvert_remote.

Signed-off-by: Joseph Qi <joseph.qi@huawei.com>
Reported-by: Yiwen Jiang <jiangyiwen@huawei.com>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Tariq Saeed <tariq.x.saeed@oracle.com>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit 474b8c6d329cfc40680ef308878d22f5a1a3b02b)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
fs/ocfs2/dlm/dlmconvert.c
fs/ocfs2/dlm/dlmrecovery.c