This is a note to let you know that I've just added the patch titled

    target: Fix alua_access_state attribute OOPs for un-configured devices

to the 3.14-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     target-fix-alua_access_state-attribute-oops-for-un-configured-devices.patch
and it can be found in the queue-3.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From f1453773514bb8b0bba0716301e8c8f17f8d39c7 Mon Sep 17 00:00:00 2001
From: Nicholas Bellinger <[email protected]>
Date: Fri, 6 Jun 2014 00:52:57 -0700
Subject: target: Fix alua_access_state attribute OOPs for un-configured devices

From: Nicholas Bellinger <[email protected]>

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 <[email protected]>
Reported-by: Philip Gaw <[email protected]>
Cc: Chris Boot <[email protected]>
Cc: Philip Gaw <[email protected]>
Signed-off-by: Nicholas Bellinger <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/target/target_core_configfs.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/drivers/target/target_core_configfs.c
+++ b/drivers/target/target_core_configfs.c
@@ -2223,6 +2223,11 @@ static ssize_t target_core_alua_tg_pt_gp
                        " tg_pt_gp ID: %hu\n", tg_pt_gp->tg_pt_gp_valid_id);
                return -EINVAL;
        }
+       if (!(dev->dev_flags & DF_CONFIGURED)) {
+               pr_err("Unable to set alua_access_state while device is"
+                      " not configured\n");
+               return -ENODEV;
+       }
 
        ret = kstrtoul(page, 0, &tmp);
        if (ret < 0) {


Patches currently in stable-queue which might be from [email protected] are

queue-3.14/iscsi-target-fix-wrong-buffer-buffer-overrun-in-iscsi_change_param_value.patch
queue-3.14/target-fix-alua_access_state-attribute-oops-for-un-configured-devices.patch
queue-3.14/iser-target-add-missing-target_put_sess_cmd-for-immedatedata-failure.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to