From 31997f7960593067b1287735042e9b300d67a248 Mon Sep 17 00:00:00 2001 From: phil Date: Thu, 21 Aug 2003 06:40:50 +0000 Subject: [PATCH] if the connection fails for whatever reason and we pass an invalid export handle into oscc_init, don't dereference a NULL --- lustre/osc/osc_create.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); -- 1.8.3.1