From dd71e74fecf45b81daa27c89c0b8065a58cac5c1 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. 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 --- lustre/obdclass/genops.c | 2 -- 1 file changed, 2 deletions(-) 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); -- 1.8.3.1