diff mbox

multipath-tools: Mismatch between allocation length and transfer length in rdac prio

Message ID 7973fb83653f408fa27af8d60da6e8c6@hioexcmbx08-prd.hq.netapp.com (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show

Commit Message

Merla, ShivaKrishna May 19, 2014, 2:49 p.m. UTC
Fix mismatch between allocation length and dxfer len in rdac prio.

Signed-off-by: shiva krishna merla <shivakrishna.merla@netapp.com>
---
--

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

Comments

Christophe Varoqui June 10, 2014, 5:59 a.m. UTC | #1
Applied, thanks.

Christophe Varoqui
www.opensvc.com


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

> Fix mismatch between allocation length and dxfer len in rdac prio.
>
> Signed-off-by: shiva krishna merla <shivakrishna.merla@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);
> --
>
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
diff mbox

Patch

--- 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);