Details
-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
3
-
9223372036854775807
Description
For inactive OST lov->lov_tgts[index]->ltd_exp is NULL, it should be checked before accessing lov->lov_tgts[index]->ltd_exp->exp_obd.
static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len, void *karg, void __user *uarg) ... imp = lov->lov_tgts[index]->ltd_exp->exp_obd->u.cli.cl_import; if (!lov->lov_tgts[index]->ltd_active && imp->imp_state != LUSTRE_IMP_IDLE) RETURN(-ENODATA); ...
The problem can be seen with:
# REFORMAT=yes sh llmount.sh # lctl conf_param lustre-OST0001.osc.active=0 # sh llmountcleanup.sh # NOFORMAT=yes sh llmount.sh # lfs df
It causes:
[ 2659.212961] BUG: unable to handle kernel NULL pointer dereference at 0000000000000100 [ 2659.216168] IP: [<ffffffffc0cbd3b8>] lov_iocontrol+0x308/0x21f0 [lov]