Hi Greg, Please apply this patch to v3.4.y ASAP to address a regression bugfix introduced with:
commit 92a7389317838f3338466df0c0e3d23ad33cb1f4 Author: Nicholas Bellinger <[email protected]> Date: Tue Dec 4 23:43:57 2012 -0800 target: Add link_magic for fabric allow_link destination target_items Thanks again, --nab ---------------------------------------------------------------------- >From a562a4c62cce4b8650e36d66477f1f2f149c77e3 Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger <[email protected]> Date: Wed, 23 Jan 2013 12:22:46 -0800 Subject: [PATCH] target: Fix v3.4.y stable regression with dev_link_magic in target_fabric_port_link This patch fixes a bug introduced with v3.4.y stable where the dev->dev_link_magic check was incorrectly positioned head of the *dev assignment in target_fabric_port_link() Reported-by: Chris Boot <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]> --- drivers/target/target_core_fabric_configfs.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/target/target_core_fabric_configfs.c b/drivers/target/target_core_fabric_configfs.c index b009b89..817ba7c 100644 --- 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); -- 1.7.2.5 -- 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
