Re: [PATCH 1/7] util: Fix regression of wwn reading

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/05/13 22:56, Doug Goldstein wrote:
On Wed, May 8, 2013 at 9:49 AM, Osier Yang <jyang@xxxxxxxxxx> wrote:
On 08/05/13 20:56, John Ferlan wrote:
On 05/06/2013 08:45 AM, Osier Yang wrote:
Introduced by commit 244ce462e29, which refactored the helper for wwn
reading, however, it forgot to change the old "strndup" and "sizeof(buf)",
"sizeof(buf)" operates on the fixed length array ("buf") in the old code,
but now "buf" is a pointer.

Before the fix:

% virsh nodedev-dumpxml scsi_host5
<device>
   <name>scsi_host5</name>
   <parent>pci_0000_04_00_1</parent>
   <capability type='scsi_host'>
     <host>5</host>
     <capability type='fc_host'>
       <wwnn>2001001b</wwnn>
       <wwpn>2101001b</wwpn>
       <fabric_wwn>2001000d</fabric_wwn>
     </capability>
   </capability>
</device>

With the fix:

% virsh nodedev-dumpxml scsi_host5
<device>
   <name>scsi_host5</name>
   <parent>pci_0000_04_00_1</parent>
   <capability type='scsi_host'>
     <host>5</host>
     <capability type='fc_host'>
       <wwnn>0x2001001b32a9da4e</wwnn>
       <wwpn>0x2101001b32a9da4e</wwpn>
       <fabric_wwn>0x2001000dec9877c1</fabric_wwn>
     </capability>
   </capability>
</device>
---
  src/util/virutil.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

ACK for technically right; however, since this problem is in 1.0.4 is
there an "effect" where there is a written buffer that has the shorter
(and wrong) wwnn/wwpn that could cause "issues" on the read (and
possible compare) side now??

Yes, fortunately it seems no one used it yet, at least I saw no
bug.


We should put this fix into the -maint branch as well then. 

I will, when pushing it. Thanks.
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]