[dm-devel] [PATCH]multipath-tools: Mismatch between allocation length and transfer length in rdac prio

Christophe Varoqui christophe.varoqui at opensvc.com
Tue Jun 10 05:59:24 UTC 2014


Applied, thanks.

Christophe Varoqui
www.opensvc.com


On Mon, May 19, 2014 at 4:49 PM, Merla, ShivaKrishna <
ShivaKrishna.Merla at netapp.com> wrote:

> Fix mismatch between allocation length and dxfer len in rdac prio.
>
> Signed-off-by: shiva krishna merla <shivakrishna.merla at netapp.com>
> ---
> --- a/libmultipath/prioritizers/rdac.c  2014-02-10 08:55:09.017765026 -0600
> +++ b/libmultipath/prioritizers/rdac.c  2014-05-19 07:48:29.416854704 -0500
> @@ -14,15 +14,15 @@
>
>  int rdac_prio(const char *dev, int fd)
>  {
> -       unsigned char sense_buffer[256];
> +       unsigned char sense_buffer[128];
>         unsigned char sb[128];
>         unsigned char inqCmdBlk[INQUIRY_CMDLEN] = {INQUIRY_CMD, 1, 0xC9, 0,
> -                                               sizeof(sb), 0};
> +                                               sizeof(sense_buffer), 0};
>         struct sg_io_hdr io_hdr;
>         int ret = 0;
>
>         memset(&io_hdr, 0, sizeof (struct sg_io_hdr));
> -       memset(sense_buffer, 0, 256);
> +       memset(sense_buffer, 0, 128);
>         io_hdr.interface_id = 'S';
>         io_hdr.cmd_len = sizeof (inqCmdBlk);
>         io_hdr.mx_sb_len = sizeof (sb);
> --
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20140610/8383f260/attachment.htm>


More information about the dm-devel mailing list