From patchwork Mon May 19 14:49:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Merla, ShivaKrishna" X-Patchwork-Id: 4207431 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0C0929F23C for ; Tue, 20 May 2014 06:39:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 25391201F2 for ; Tue, 20 May 2014 06:39:48 +0000 (UTC) Received: from mx6-phx2.redhat.com (mx6-phx2.redhat.com [209.132.183.39]) by mail.kernel.org (Postfix) with ESMTP id 125FE2026C for ; Tue, 20 May 2014 06:39:46 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx6-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s4K6ZZPk014969; Tue, 20 May 2014 02:35:36 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s4JEnYSf018956 for ; Mon, 19 May 2014 10:49:34 -0400 Received: from mx1.redhat.com (ext-mx12.extmail.prod.ext.phx2.redhat.com [10.5.110.17]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s4JEnXOD025643 for ; Mon, 19 May 2014 10:49:34 -0400 Received: from mx11.netapp.com (mx11.netapp.com [216.240.18.76]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4JEnTX7006639 for ; Mon, 19 May 2014 10:49:29 -0400 X-IronPort-AV: E=Sophos;i="4.98,867,1392192000"; d="scan'208";a="123983441" Received: from vmwexceht03-prd.hq.netapp.com ([10.106.76.241]) by mx11-out.netapp.com with ESMTP; 19 May 2014 07:49:28 -0700 Received: from HIOEXCMBX03-PRD.hq.netapp.com (10.122.105.36) by vmwexceht03-prd.hq.netapp.com (10.106.76.241) with Microsoft SMTP Server (TLS) id 14.3.123.3; Mon, 19 May 2014 07:49:28 -0700 Received: from HIOEXCMBX08-PRD.hq.netapp.com (10.122.105.41) by hioexcmbx03-prd.hq.netapp.com (10.122.105.36) with Microsoft SMTP Server (TLS) id 15.0.847.32; Mon, 19 May 2014 07:49:10 -0700 Received: from HIOEXCMBX08-PRD.hq.netapp.com ([::1]) by hioexcmbx08-prd.hq.netapp.com ([fe80::b0a7:913a:b39f:3141%21]) with mapi id 15.00.0847.030; Mon, 19 May 2014 07:49:04 -0700 From: "Merla, ShivaKrishna" To: "dm-devel@redhat.com" Thread-Topic: [PATCH]multipath-tools: Mismatch between allocation length and transfer length in rdac prio Thread-Index: Ac9zcFcOBjjt8yG9RZiiACc5wgjzUQ== Date: Mon, 19 May 2014 14:49:03 +0000 Message-ID: <7973fb83653f408fa27af8d60da6e8c6@hioexcmbx08-prd.hq.netapp.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.122.56.79] MIME-Version: 1.0 X-RedHat-Spam-Score: -2.962 (BAYES_00, DCC_REPUT_00_12, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS, URIBL_BLOCKED) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Scanned-By: MIMEDefang 2.68 on 10.5.110.17 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id s4JEnYSf018956 X-loop: dm-devel@redhat.com X-Mailman-Approved-At: Tue, 20 May 2014 02:35:34 -0400 Subject: [dm-devel] [PATCH]multipath-tools: Mismatch between allocation length and transfer length in rdac prio X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix mismatch between allocation length and dxfer len in rdac prio. Signed-off-by: shiva krishna merla --- -- -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel --- 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);