From ef9d21b694f5d8ff3ac3e6bcac128d7d929021bc Mon Sep 17 00:00:00 2001 From: Li Dongyang Date: Wed, 13 Nov 2019 15:01:25 +1100 Subject: [PATCH] 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. Lustre-change: https://review.whamcloud.com/36743 Lustre-commit: dd71e74fecf45b81daa27c89c0b8065a58cac5c1 Signed-off-by: Li Dongyang Change-Id: I3d63acf2bff543924ca0e74a35d24c507d68f6aa Reviewed-by: James Simmons Reviewed-by: Shaun Tancheff Reviewed-by: Yang Sheng Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/37066 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/obdclass/genops.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index 5a3802d..ab319bb 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -1268,8 +1268,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); -- 1.8.3.1