]> git.baikalelectronics.ru Git - kernel.git/commit
staging: lustre: mdc: fix NULL pointer dereference in mdc_adjust_dirpages
authorJames Simmons <jsimmons@infradead.org>
Mon, 22 Aug 2016 16:57:43 +0000 (12:57 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Aug 2016 20:39:15 +0000 (16:39 -0400)
commit877055f64e545898e6f633848171dceea9061bff
treef5675d910a992a01d054b627c43edcb8aa274fc0
parent57bd8410aba4af8bf479a8642dbd540490519406
staging: lustre: mdc: fix NULL pointer dereference in mdc_adjust_dirpages

The function mdc_adjust_dirpages is only called on platforms which
don't have pages 4K in size which is why kbuild only reported this
for platforms like the Alpha. The problem was a typo in ordering of
variables in the beginning of a while loop. We were accessing the
dp pointer before it was kmapped.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/mdc/mdc_request.c