]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
libceph: fix potential hang in ceph_osdc_notify()
authorIlya Dryomov <idryomov@gmail.com>
Tue, 1 Aug 2023 17:14:24 +0000 (19:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Aug 2023 13:13:55 +0000 (15:13 +0200)
commitcd6872f2cf56626b5ae1f46589ad2b6aec281b7f
tree7b610841f0bbe04bc94c1f4b0170505ed4710bc2
parente5f5b4a89809630c24cf6f7bd8026a3e94a5c94e
libceph: fix potential hang in ceph_osdc_notify()

commit e6e2843230799230fc5deb8279728a7218b0d63c upstream.

If the cluster becomes unavailable, ceph_osdc_notify() may hang even
with osd_request_timeout option set because linger_notify_finish_wait()
waits for MWatchNotify NOTIFY_COMPLETE message with no associated OSD
request in flight -- it's completely asynchronous.

Introduce an additional timeout, derived from the specified notify
timeout.  While at it, switch both waits to killable which is more
correct.

Cc: stable@vger.kernel.org
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ceph/osd_client.c