Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a09f36e authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman
Browse files

staging/lustre/mdc: Initialize req in mdc_enqueue for !it case



Commit ab909585 ("staging: lustre: Cleanup variable declarations
in mdc_enqueue()") broke Lustre flock handling introducing access
to uninitialized req variable, leading to bizzare crash in a later
call to __req_capsule_offset with invalid pill value.

Set req to NULL just for this case as in all other cases req is
explicitly initialized with request packing call.

Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
CC: Srikrishan Malik <srikrishanmalik@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 431b5678
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -828,6 +828,7 @@ int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo,
			 einfo->ei_type);
		policy = (ldlm_policy_data_t *)lmm;
		res_id.name[3] = LDLM_FLOCK;
		req = NULL;
	} else if (it->it_op & IT_OPEN) {
		req = mdc_intent_open_pack(exp, it, op_data, lmm, lmmsize,
					   einfo->ei_cbdata);