From: Nicholas Bellinger Date: Fri, 6 Jun 2014 07:52:57 +0000 (-0700) Subject: target: Fix alua_access_state attribute OOPs for un-configured devices X-Git-Tag: omap-for-v3.16/fixes-against-rc1~95^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1453773514bb8b0bba0716301e8c8f17f8d39c7;p=pandora-kernel.git target: Fix alua_access_state attribute OOPs for un-configured devices This patch fixes a OOPs where an attempt to write to the per-device alua_access_state configfs attribute at: /sys/kernel/config/target/core/$HBA/$DEV/alua/$TG_PT_GP/alua_access_state results in an NULL pointer dereference when the backend device has not yet been configured. This patch adds an explicit check for DF_CONFIGURED, and fails with -ENODEV to avoid this case. Reported-by: Chris Boot Reported-by: Philip Gaw Cc: Chris Boot Cc: Philip Gaw Cc: stable@vger.kernel.org # 3.8+ Signed-off-by: Nicholas Bellinger --- Reading git-diff-tree failed