[dm-devel] [PATCH]multipath-tools: Mismatch between allocation length and transfer length in rdac prio
Merla, ShivaKrishna
ShivaKrishna.Merla at netapp.com
Mon May 19 14:49:03 UTC 2014
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);
--
More information about the dm-devel
mailing list