Re: [PATCH 5/6] libmultipath: Fix sgio_get_vpd()

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

 



On Mon, 2018-03-05 at 18:09 +0100, Martin Wilck wrote:
> On Mon, 2018-03-05 at 17:53 +0100, Martin Wilck wrote:
> > On Thu, 2018-03-01 at 11:29 -0800, Bart Van Assche wrote:
> > > Pass the VPD page number to sgio_get_vpd() such that the page
> > > needed
> > > by the caller is queried instead of page 0x83. Fix the statement
> > > that
> > > computes the length of the page returned by do_inq(). Fix the
> > > return
> > > code check in the caller of sgio_get_vpd().
> > > 
> > > Signed-off-by: Bart Van Assche <bart.vanassche@xxxxxxx>
> > > ---
> > 
> > Bart, thanks for the patch. Please consider rebasing your work on
> > my
> > previously submitted patches which have already been positively
> > reviewed ([1], [2]):
> > 
> >  libmultipath: get_vpd_sgio: support VPD 0xc9
> >  libmultipath: sgio_get_vpd: add page argument
> >  libmultipath: fix return code of sgio_get_vpd()
> > 
> > Otherwise, ACK.
> 
> Sorry, I found a glitch.
> 
> With the change of the "len" calculation and the return value check,
> we
>   need to make sure sufficient data has been read:

Replying to self - this is actually not necessary, as we're looking at
the response buffer of a successful VPD INQUIRY, so we have to assume
that at least the header has been read correctly.

All we need to change is the return code and the respective comment,
because the function actually returns the number of INQUIRY bytes if
INQUIRY was successful (before my patch "libmultipath: fix return code
of sgio_get_vpd()", the function behaved rather strange, returning -1
on failure, 0 on success, and len > buffer length on buffer overflow).

Unless you object, I'll repost your series rebased on mine.

Martin

-- 
Dr. Martin Wilck <mwilck@xxxxxxxx>, Tel. +49 (0)911 74053 2107
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux