From: Li Dongyang Date: Wed, 13 Nov 2019 04:01:25 +0000 (+1100) Subject: LU-12965 obdclass: remove assertion for imp_refcount X-Git-Tag: 2.13.51~68 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=dd71e74fecf45b81daa27c89c0b8065a58cac5c1;p=fs%2Flustre-release.git LU-12965 obdclass: remove assertion for imp_refcount After calling obd_zombie_import_add(), obd_import could be freed by obd_zombie before we check imp_refcount with LASSERT_ATOMIC_GE_LT. It's a use after free and could crash the box. Signed-off-by: Li Dongyang Change-Id: I3d63acf2bff543924ca0e74a35d24c507d68f6aa Reviewed-on: https://review.whamcloud.com/36743 Reviewed-by: James Simmons Reviewed-by: Shaun Tancheff Tested-by: jenkins Tested-by: Maloo Reviewed-by: Yang Sheng Reviewed-by: Oleg Drokin --- diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index af218a1..1ef9637 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -1255,8 +1255,6 @@ void class_import_put(struct obd_import *imp) obd_zombie_import_add(imp); } - /* catch possible import put race */ - LASSERT_ATOMIC_GE_LT(&imp->imp_refcount, 0, LI_POISON); EXIT; } EXPORT_SYMBOL(class_import_put);