Skip to content
Snippets Groups Projects
Commit 90a3113a authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Cheng Jian
Browse files

dm: use noio when sending kobject event

stable inclusion
from linux-4.19.133
commit 35a9af8ddb6271fb20b9f4fa07c26fec1e6c52df
Bugzilla: 38833

--------------------------------

commit 6958c1c6 upstream.

kobject_uevent may allocate memory and it may be called while there are dm
devices suspended. The allocation may recurse into a suspended device,
causing a deadlock. We must set the noio flag when sending a uevent.

The observed deadlock was reported here:
https://www.redhat.com/archives/dm-devel/2020-March/msg00025.html



Reported-by: default avatarKhazhismel Kumykov <khazhy@google.com>
Reported-by: default avatarTahsin Erdogan <tahsin@google.com>
Reported-by: default avatarGabriel Krisman Bertazi <krisman@collabora.com>
Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarZhang Xiaoxu <zhangxiaoxu5@huawei.com>
Reviewed-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarCheng Jian <cj.chengjian@huawei.com>
parent b171ae61
No related branches found
No related tags found
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment