From: phil Date: Thu, 21 Aug 2003 06:40:50 +0000 (+0000) Subject: if the connection fails for whatever reason and we pass an invalid X-Git-Tag: v1_7_0_51~2^7~646 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=31997f7960593067b1287735042e9b300d67a248;p=fs%2Flustre-release.git if the connection fails for whatever reason and we pass an invalid export handle into oscc_init, don't dereference a NULL --- diff --git a/lustre/osc/osc_create.c b/lustre/osc/osc_create.c index 84af0dc..d683ff5 100644 --- a/lustre/osc/osc_create.c +++ b/lustre/osc/osc_create.c @@ -267,8 +267,12 @@ static int osccd_main(void *arg) void oscc_init(struct lustre_handle *exph) { struct obd_export *exp = class_conn2export(exph); - struct osc_export_data *oed = &exp->exp_osc_data; + struct osc_export_data *oed; + if (exp == NULL) + return; + + oed = &exp->exp_osc_data; memset(oed, 0, sizeof(*oed)); INIT_LIST_HEAD(&oed->oed_oscc.oscc_list); init_waitqueue_head(&oed->oed_oscc.oscc_waitq);