staging/lustre/mdc: Initialize req in mdc_enqueue for !it case
authorOleg Drokin <green@linuxhacker.ru>
Mon, 2 Feb 2015 02:52:19 +0000 (21:52 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Feb 2015 09:32:34 +0000 (17:32 +0800)
commit3a09f36efd8f0c5c5d968fbbbb0967121076a25b
treea38c2bfe8326f8ae977691bd952b3b22f62529a9
parent431b567856875536c7f574f30cd870d758aa6c2f
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>
drivers/staging/lustre/lustre/mdc/mdc_locks.c