[PATCH 20/20] staging/lustre/mdc: Initialize req in mdc_enqueue for !it case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Oleg Drokin <green@xxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxx>
CC: Srikrishan Malik <srikrishanmalik@xxxxxxxxx>
---
 drivers/staging/lustre/lustre/mdc/mdc_locks.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c
index 8c9b4f5..d1c224e 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);
-- 
2.1.0

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux