diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2014-06-06 00:52:57 -0700 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-06-20 17:34:13 +0200 |
commit | ca55f49d628c4b9805d6567b45c6cc27503ac32f (patch) | |
tree | 455056b41c5b80cb1047ef66920a8f8287f8664f /drivers/target/target_core_pr.h | |
parent | a12e3e7bfc80023f8ef4ab17eebeb0e344494036 (diff) |
target: Fix alua_access_state attribute OOPs for un-configured devices
commit f1453773514bb8b0bba0716301e8c8f17f8d39c7 upstream.
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 <crb@tiger-computing.co.uk>
Reported-by: Philip Gaw <pgaw@darktech.org.uk>
Cc: Chris Boot <crb@tiger-computing.co.uk>
Cc: Philip Gaw <pgaw@darktech.org.uk>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers/target/target_core_pr.h')
0 files changed, 0 insertions, 0 deletions