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

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



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


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