diff options
author | Oleg Drokin <green@linuxhacker.ru> | 2015-02-01 21:52:19 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-02-07 17:32:34 +0800 |
commit | 3a09f36efd8f0c5c5d968fbbbb0967121076a25b (patch) | |
tree | a38c2bfe8326f8ae977691bd952b3b22f62529a9 /drivers/staging | |
parent | 431b567856875536c7f574f30cd870d758aa6c2f (diff) |
staging/lustre/mdc: Initialize req in mdc_enqueue for !it case
Commit ab909585b813 ("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: Oleg Drokin <green@linuxhacker.ru>
CC: Srikrishan Malik <srikrishanmalik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/lustre/lustre/mdc/mdc_locks.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c index 8c9b4f5494e9..d1c224ecd2b7 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c @@ -828,6 +828,7 @@ resend: 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); |