diff mbox

[Bug,584143,NEW] qemu fails to set hdd serial number

Message ID 20100522092104.29268.17427.malonedeb@soybean.canonical.com
State New
Headers show

Commit Message

Michael Tokarev May 22, 2010, 9:21 a.m. UTC
Public bug reported:

The -drive ...,serial=xyz option is broken, at least in 0.12.  See
Debian bug#573439, http://bugs.debian.org/cgi-
bin/bugreport.cgi?bug=573439 for details.

The proposed fix from the original reporter:

Comments

Aurelien Jarno Feb. 20, 2011, 5:13 p.m. UTC | #1
** Changed in: qemu
       Status: Fix Committed => Fix Released
Serge Hallyn March 14, 2011, 10:34 p.m. UTC | #2
Patch with fix is at http://patchwork.ozlabs.org/patch/77142/mbox/.  It
is in 0.14.0 so marked natty bug as fix released.  I will propose merge
of the fix for maverick and lucid.

** Changed in: qemu-kvm (Ubuntu)
     Assignee: (unassigned) => Serge Hallyn (serge-hallyn)

** Also affects: qemu-kvm (Ubuntu Maverick)
   Importance: Undecided
       Status: New

** Changed in: qemu-kvm (Ubuntu)
       Status: Triaged => Fix Released

** Changed in: qemu-kvm (Ubuntu Lucid)
     Assignee: (unassigned) => Serge Hallyn (serge-hallyn)

** Changed in: qemu-kvm (Ubuntu Maverick)
     Assignee: (unassigned) => Serge Hallyn (serge-hallyn)
Serge Hallyn March 15, 2011, 2:48 a.m. UTC | #3
** Branch linked: lp:~serge-hallyn/ubuntu/lucid/qemu-kvm/hdd-serial
Serge Hallyn March 15, 2011, 2:54 a.m. UTC | #4
** Branch linked: lp:~serge-hallyn/ubuntu/maverick/qemu-kvm/hdd-serial
Serge Hallyn March 15, 2011, 4:05 a.m. UTC | #5
** Attachment added: "amd64 debs for lucid"
   https://bugs.launchpad.net/qemu/+bug/584143/+attachment/1909175/+files/hdd-lucid-debs.tgz
Serge Hallyn March 15, 2011, 4:13 a.m. UTC | #6
** Attachment added: "amd64 debs for maverick"
   https://bugs.launchpad.net/qemu/+bug/584143/+attachment/1909178/+files/hdd-mav-debs.tgz
Serge Hallyn March 15, 2011, 4:25 a.m. UTC | #7
** Changed in: qemu-kvm (Ubuntu Maverick)
       Status: New => In Progress

** Changed in: qemu-kvm (Ubuntu Lucid)
       Status: Confirmed => In Progress
Serge Hallyn March 15, 2011, 1:29 p.m. UTC | #8
Please test the packages uploaded in comment #6 (or, if you're on
maverick, comment #7) and comment if they work for you.  Once verified
we can merge the linked bzr trees.
Serge Hallyn March 15, 2011, 1:37 p.m. UTC | #9
** Description changed:

+ =========================================
+ SRU Justification:
+ 1. Impact: 'qemu -drive ...,serial=xyz' does not work
+ 2. How addressed: a patch from upstream fixes bug that sizeof was called on the wrong thing.
+ 3. patch: is in the description
+ 4. to reproduce: use '-drive ...,serial=xyz' option to qemu
+ 5. regression potential:  this only changes one line which called sizeof on the wrong thing, so should not impact any other code.
+ =========================================
+ 
  The -drive ...,serial=xyz option is broken, at least in 0.12.  See
  Debian bug#573439, http://bugs.debian.org/cgi-
  bin/bugreport.cgi?bug=573439 for details.
  
  The proposed fix from the original reporter:
  
  --- qemu-kvm-0.12.3+dfsg/vl.c	2010-02-26 11:34:00.000000000 +0900
  +++ qemu-kvm-0.12.3+dfsg.old/vl.c	2010-03-11 02:26:00.134217787 +0900
  @@ -2397,7 +2397,7 @@
-      dinfo->on_write_error = on_write_error;
-      dinfo->opts = opts;
-      if (serial)
+      dinfo->on_write_error = on_write_error;
+      dinfo->opts = opts;
+      if (serial)
  -        strncpy(dinfo->serial, serial, sizeof(serial));
  +        strncpy(dinfo->serial, serial, sizeof(dinfo->serial));
-      QTAILQ_INSERT_TAIL(&drives, dinfo, next);
-      if (is_extboot) {
-          extboot_drive = dinfo;
+      QTAILQ_INSERT_TAIL(&drives, dinfo, next);
+      if (is_extboot) {
+          extboot_drive = dinfo;
Serge Hallyn March 15, 2011, 10:34 p.m. UTC | #10
** Tags added: verification-needed
Serge Hallyn Aug. 10, 2011, 11:02 p.m. UTC | #11
** Changed in: qemu-kvm (Debian)
       Status: Unknown => Fix Released
Adolfo Jayme Barrientos July 6, 2013, 11:34 a.m. UTC | #12
** No longer affects: qemu-kvm (Ubuntu Lucid)

** No longer affects: qemu-kvm (Ubuntu Maverick)
diff mbox

Patch

--- qemu-kvm-0.12.3+dfsg/vl.c	2010-02-26 11:34:00.000000000 +0900
+++ qemu-kvm-0.12.3+dfsg.old/vl.c	2010-03-11 02:26:00.134217787 +0900
@@ -2397,7 +2397,7 @@ 
     dinfo->on_write_error = on_write_error;
     dinfo->opts = opts;
     if (serial)
-        strncpy(dinfo->serial, serial, sizeof(serial));
+        strncpy(dinfo->serial, serial, sizeof(dinfo->serial));
     QTAILQ_INSERT_TAIL(&drives, dinfo, next);
     if (is_extboot) {
         extboot_drive = dinfo;

** Affects: qemu
     Importance: Undecided
         Status: New


** Tags: patch

-- 
qemu fails to set hdd serial number
https://bugs.launchpad.net/bugs/584143
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.

Status in QEMU: New

Bug description:
The -drive ...,serial=xyz option is broken, at least in 0.12.  See Debian bug#573439, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=573439 for details.

The proposed fix from the original reporter:

--- qemu-kvm-0.12.3+dfsg/vl.c	2010-02-26 11:34:00.000000000 +0900
+++ qemu-kvm-0.12.3+dfsg.old/vl.c	2010-03-11 02:26:00.134217787 +0900
@@ -2397,7 +2397,7 @@ 
     dinfo->on_write_error = on_write_error;
     dinfo->opts = opts;
     if (serial)
-        strncpy(dinfo->serial, serial, sizeof(serial));
+        strncpy(dinfo->serial, serial, sizeof(dinfo->serial));
     QTAILQ_INSERT_TAIL(&drives, dinfo, next);
     if (is_extboot) {
         extboot_drive = dinfo;