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

    target: fix regression with dev_link_magic in target_fabric_port_link

to the 3.4-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-regression-with-dev_link_magic-in-target_fabric_port_link.patch
and it can be found in the queue-3.4 subdirectory.

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


>From [email protected]  Fri Feb  1 11:39:40 2013
From: Nicholas Bellinger <[email protected]>
Date: Thu, 24 Jan 2013 21:57:14 -0500 (EST)
Subject: target: fix regression with dev_link_magic in target_fabric_port_link
To: [email protected]
Cc: Nicholas Bellinger <[email protected]>, Chris Boot <[email protected]>
Message-ID: <[email protected]>

From: Nicholas Bellinger <[email protected]>

This is to fix a regression that only affect the stable (not for the mainline)
that the stable commit fdf9d86 was incorrectly placed dev->dev_link_magic check
before the *dev assignment in target_fabric_port_link() due to fuzzy 
automatically
context adjustment during the back-porting.

Reported-by: Chris Boot <[email protected]>
Signed-off-by: Nicholas Bellinger <[email protected]>
Signed-off-by: CAI Qian <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/target/target_core_fabric_configfs.c |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

--- a/drivers/target/target_core_fabric_configfs.c
+++ b/drivers/target/target_core_fabric_configfs.c
@@ -752,12 +752,6 @@ static int target_fabric_port_link(
        struct target_fabric_configfs *tf;
        int ret;
 
-       if (dev->dev_link_magic != SE_DEV_LINK_MAGIC) {
-               pr_err("Bad dev->dev_link_magic, not a valid se_dev_ci pointer:"
-                       " %p to struct se_device: %p\n", se_dev_ci, dev);
-               return -EFAULT;
-       }
-
        tpg_ci = &lun_ci->ci_parent->ci_group->cg_item;
        se_tpg = container_of(to_config_group(tpg_ci),
                                struct se_portal_group, tpg_group);
@@ -775,6 +769,11 @@ static int target_fabric_port_link(
                ret = -ENODEV;
                goto out;
        }
+       if (dev->dev_link_magic != SE_DEV_LINK_MAGIC) {
+               pr_err("Bad dev->dev_link_magic, not a valid se_dev_ci pointer:"
+                       " %p to struct se_device: %p\n", se_dev_ci, dev);
+               return -EFAULT;
+       }
 
        lun_p = core_dev_add_lun(se_tpg, dev->se_hba, dev,
                                lun->unpacked_lun);


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

queue-3.4/target-fix-regression-with-dev_link_magic-in-target_fabric_port_link.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