From: Oleg Drokin Date: Sat, 16 May 2015 07:38:33 +0000 (-0400) Subject: staging/lustre/ptlrpc: Fix potential NULL pointer dereference X-Git-Tag: omap-for-v4.3/legacy-v2-signed~121^2~562 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3959d0cb7e6e1a00cf815278901929534709e72a;p=pandora-kernel.git staging/lustre/ptlrpc: Fix potential NULL pointer dereference In lov_unpackmd() there's this strange bit of code where we first try to look inside of lmm striping pattern for it's type, and then we check if the pattern is NULL which cannot be right. Move the check under if (lmm) branch so that it's safe. Found by Coverity version 6.6.1 Signed-off-by: Sebastien Buisson Reviewed-on: http://review.whamcloud.com/7827 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4049 Reviewed-by: John L. Hammond Reviewed-by: jacques-Charles Lafoucriere Signed-off: Oleg Drokin Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed