Hello community,

here is the log from the commit of package tgt for openSUSE:Factory checked in 
at 2015-11-17 14:23:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/tgt (Old)
 and      /work/SRC/openSUSE:Factory/.tgt.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "tgt"

Changes:
--------
--- /work/SRC/openSUSE:Factory/tgt/tgt.changes  2015-09-24 06:14:41.000000000 
+0200
+++ /work/SRC/openSUSE:Factory/.tgt.new/tgt.changes     2015-11-17 
14:23:26.000000000 +0100
@@ -1,0 +2,15 @@
+Mon Nov 16 16:43:18 UTC 2015 - [email protected]
+
+- Adding upstream patch to silence bogus error
+  message when backing-store directory not present
+  (bsc#954801), adding patch:
+  * tgt-missing-module-directory-not-an-error 
+
+-------------------------------------------------------------------
+Mon Nov 16 00:54:26 UTC 2015 - [email protected]
+
+- Added upstream patch to handle possible target removal
+  while accessing it (bsc#922526), adding patch:
+  * tgt-handle-access-of-a-target-that-has-been-removed
+
+-------------------------------------------------------------------

New:
----
  tgt-handle-access-of-a-target-that-has-been-removed
  tgt-missing-module-directory-not-an-error

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ tgt.spec ++++++
--- /var/tmp/diff_new_pack.WvRJQS/_old  2015-11-17 14:23:27.000000000 +0100
+++ /var/tmp/diff_new_pack.WvRJQS/_new  2015-11-17 14:23:27.000000000 +0100
@@ -29,6 +29,8 @@
 Source4:        sysconfig.%{name}
 Patch2:         %{name}-fix-build
 Patch3:         setup-tgt-conf-d.patch
+Patch4:         %{name}-handle-access-of-a-target-that-has-been-removed
+Patch5:         %{name}-missing-module-directory-not-an-error
 BuildRequires:  docbook-xsl-stylesheets
 BuildRequires:  libaio-devel
 BuildRequires:  libxslt
@@ -51,6 +53,8 @@
 %setup -q
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
+%patch5 -p1
 
 %build
 %ifarch ppc ppc64 ppc64le

++++++ tgt-handle-access-of-a-target-that-has-been-removed ++++++
From: Lee Duncan <[email protected]>
Date: Wed, 28 Oct 2015 14:16:13 +0900
Subject: Handle access of a target that has been removed
Git-commit: 2791ed243ab2a2fcfe48aea4a0cc23f4ad8467dc
Patch-mainline: v1.0.61

I recently got a report of a tgtd core dump from our opencloud
group. The stack trace showed that a strcmp against a NULL was causing
the failure:

----------------------------------------------------------------
Program terminated with signal 11, Segmentation fault.
(gdb) bt
    name=0x6ac16f 
"iqn.2010-10.org.openstack:volume-e812c705-80bc-4064-a84c-5559cda8b1ca") at 
iscsi/target.c:216
    at iscsi/iscsid.c:654
    events=1, data=0x63a480 <target_list>) at iscsi/iscsi_tcp.c:158
----------------------------------------------------------------

It looks like target_find_by_name() uses tgt_targetname(), but doesn't
account for the fact that it can return a NULL when the target being
looked up does not (now) exist:

----------------------------------------------------------------
char *tgt_targetname(int tid)
{
        struct target *target;

        target = target_lookup(tid);
        if (!target)
           return NULL;

           return target->name;
}

Signed-off-by: FUJITA Tomonori <[email protected]>
Acked-by: Lee Duncan <[email protected]>
---
 usr/iscsi/target.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/usr/iscsi/target.c
+++ b/usr/iscsi/target.c
@@ -369,9 +369,11 @@ void target_list_build(struct iscsi_conn
 struct iscsi_target *target_find_by_name(const char *name)
 {
        struct iscsi_target *target;
+       char *tname;
 
        list_for_each_entry(target, &iscsi_targets_list, tlist) {
-               if (!strcmp(tgt_targetname(target->tid), name))
+               tname = tgt_targetname(target->tid);
+               if (tname && !strcmp(tname, name))
                        return target;
        }
 
++++++ tgt-missing-module-directory-not-an-error ++++++
From: Lee Duncan <[email protected]>
Date: Mon Nov 16 08:49:57 PST 2015
Subject: backing-store modules directory not present is not an error

The backing-store modules directory, normally
/usr/lib/tgt/backing-store, is not created, needed, or used when there
are no backing store modules. So change the error message printed when
the directory is not present to a debug message.

Signed-off-by: Lee Duncan <[email protected]>
---
 usr/bs.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/usr/bs.c
+++ b/usr/bs.c
@@ -263,7 +263,8 @@ static int bs_init_signalfd(void)
 
        dir = opendir(BSDIR);
        if (dir == NULL) {
-               eprintf("could not open backing-store module directory %s\n",
+               /* not considered an error if there are no modules */
+               dprintf("could not open backing-store module directory %s\n",
                        BSDIR);
        } else {
                struct dirent *dirent;

Reply via email to