Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 337748 Details for
Bug 454128
sys-fs/gentoo-sources-3.7.4 - NULL reference OOPS in target_fabric_port_link because 0ff8754 depends on missing patch 0fd97cc
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
target: Move dev->dev_link_magic check to after dev initialization
0001-target-Move-dev-dev_link_magic-check-to-after-dev-in.patch (text/plain), 1.90 KB, created by
Ben Peddell
on 2013-02-03 07:14:20 UTC
(
hide
)
Description:
target: Move dev->dev_link_magic check to after dev initialization
Filename:
MIME Type:
Creator:
Ben Peddell
Created:
2013-02-03 07:14:20 UTC
Size:
1.90 KB
patch
obsolete
>From f5240c39c83e54e05b5e4ad76b9350a7ae8c331f Mon Sep 17 00:00:00 2001 >From: Ben Peddell <klightspeed@killerwolves.net> >Date: Sun, 3 Feb 2013 17:10:25 +1000 >Subject: [PATCH] target: Move dev->dev_link_magic check to after dev > initialization > >Commit fdf9d862969f1be18814273b03fb9497ec2dbdae (target: Add link_magic >for fabric allow_link destination target_items) applied without commit >0fd97ccf45be26fb01b3a412f1f6c6b5044b2f16 (Simplify the code a lot by >killing the superflous struct se_subsystem_dev) put the >dev->dev_link_magic check before dev was initialized in >target_fabric_port_link. This patch moves the dev->dev_link_magic check >to after dev is initialized. > >Signed-off-by: Ben Peddell <klightspeed@killerwolves.net> >--- > drivers/target/target_core_fabric_configfs.c | 12 ++++++------ > 1 files changed, 6 insertions(+), 6 deletions(-) > >diff --git a/drivers/target/target_core_fabric_configfs.c b/drivers/target/target_core_fabric_configfs.c >index a55f91a..d7bb0c0 100644 >--- a/drivers/target/target_core_fabric_configfs.c >+++ b/drivers/target/target_core_fabric_configfs.c >@@ -751,12 +751,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,12 @@ static int target_fabric_port_link( > 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, lun->unpacked_lun); > if (IS_ERR(lun_p)) { > pr_err("core_dev_add_lun() failed\n"); >-- >1.7.8.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 454128
:
336878
|
337748