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 04:32:34 -0500 |
| commit | 3a09f36efd8f0c5c5d968fbbbb0967121076a25b (patch) | |
| tree | a38c2bfe8326f8ae977691bd952b3b22f62529a9 | |
| 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>
| -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: | |||
| 828 | einfo->ei_type); | 828 | einfo->ei_type); |
| 829 | policy = (ldlm_policy_data_t *)lmm; | 829 | policy = (ldlm_policy_data_t *)lmm; |
| 830 | res_id.name[3] = LDLM_FLOCK; | 830 | res_id.name[3] = LDLM_FLOCK; |
| 831 | req = NULL; | ||
| 831 | } else if (it->it_op & IT_OPEN) { | 832 | } else if (it->it_op & IT_OPEN) { |
| 832 | req = mdc_intent_open_pack(exp, it, op_data, lmm, lmmsize, | 833 | req = mdc_intent_open_pack(exp, it, op_data, lmm, lmmsize, |
| 833 | einfo->ei_cbdata); | 834 | einfo->ei_cbdata); |
