From patchwork Tue Jul 7 18:44:12 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: bmarzins@sourceware.org X-Patchwork-Id: 34507 Received: from hormel.redhat.com (hormel1.redhat.com [209.132.177.33]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n67IiZlx000572 for ; Tue, 7 Jul 2009 18:44:35 GMT Received: from listman.util.phx.redhat.com (listman.util.phx.redhat.com [10.8.4.110]) by hormel.redhat.com (Postfix) with ESMTP id EF091619A69; Tue, 7 Jul 2009 14:44:34 -0400 (EDT) Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by listman.util.phx.redhat.com (8.13.1/8.13.1) with ESMTP id n67IiX56026673 for ; Tue, 7 Jul 2009 14:44:33 -0400 Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n67IiXYP009825 for ; Tue, 7 Jul 2009 14:44:33 -0400 Received: from sourceware.org (sourceware.org [209.132.176.174]) by mx1.redhat.com (8.13.8/8.13.8) with SMTP id n67IiDwV004363 for ; Tue, 7 Jul 2009 14:44:13 -0400 Received: (qmail 25034 invoked by uid 9475); 7 Jul 2009 18:44:12 -0000 Date: 7 Jul 2009 18:44:12 -0000 Message-ID: <20090707184412.25032.qmail@sourceware.org> From: bmarzins@sourceware.org To: dm-cvs@sourceware.org, dm-devel@redhat.com X-RedHat-Spam-Score: -4 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 X-Scanned-By: MIMEDefang 2.63 on 172.16.48.31 X-loop: dm-devel@redhat.com Cc: Subject: [dm-devel] multipath-tools/path_priority/pp_alua rtpg.c X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.5 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 CVSROOT: /cvs/dm Module name: multipath-tools Branch: RHEL5_FC6 Changes by: bmarzins@sourceware.org 2009-07-07 18:44:12 Modified files: path_priority/pp_alua: rtpg.c Log message: Multipath needs to actually allocate the correct size buffer when it realizes that the existing rtpg buffer is too small. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/path_priority/pp_alua/rtpg.c.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.3.2.3&r2=1.3.2.4 --- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel --- multipath-tools/path_priority/pp_alua/rtpg.c 2009/05/06 22:57:58 1.3.2.3 +++ multipath-tools/path_priority/pp_alua/rtpg.c 2009/07/07 18:44:11 1.3.2.4 @@ -269,8 +269,8 @@ rc = do_rtpg(fd, buf, buflen); if (rc < 0) goto out; - scsi_buflen = buf[0] << 24 | buf[1] << 16 | buf[2] << 8 | buf[3]; - if (buflen < (scsi_buflen + 4)) { + scsi_buflen = buf[0] << 24 | buf[1] << 16 | buf[2] << 8 | buf[3] + 4; + if (buflen < scsi_buflen) { free(buf); buf = (unsigned char *)malloc(scsi_buflen); if (!buf) {