From owner-freebsd-bugs@FreeBSD.ORG Mon May 10 10:00:43 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 94EFE16A4CE for ; Mon, 10 May 2004 10:00:43 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A75E943D58 for ; Mon, 10 May 2004 10:00:40 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i4AH0enw088030 for ; Mon, 10 May 2004 10:00:40 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i4AH0eZq088029; Mon, 10 May 2004 10:00:40 -0700 (PDT) (envelope-from gnats) Resent-Date: Mon, 10 May 2004 10:00:40 -0700 (PDT) Resent-Message-Id: <200405101700.i4AH0eZq088029@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, HITOSHI Osada Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 06E8316A4CE for ; Mon, 10 May 2004 09:53:24 -0700 (PDT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id D3D0943D31 for ; Mon, 10 May 2004 09:53:23 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i4AGrNNY049858 for ; Mon, 10 May 2004 09:53:23 -0700 (PDT) (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.11/8.12.11/Submit) id i4AGrNeX049857; Mon, 10 May 2004 09:53:23 -0700 (PDT) (envelope-from nobody) Message-Id: <200405101653.i4AGrNeX049857@www.freebsd.org> Date: Mon, 10 May 2004 09:53:23 -0700 (PDT) From: HITOSHI Osada To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: kern/66479: mpt has a bug when creating chain elements. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 May 2004 17:00:43 -0000 >Number: 66479 >Category: kern >Synopsis: mpt has a bug when creating chain elements. >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon May 10 10:00:39 PDT 2004 >Closed-Date: >Last-Modified: >Originator: HITOSHI Osada >Release: 5.2 >Organization: >Environment: >Description: There is a bug in mpt_run_xfer(). I found this bug in NetBSD and the same bug exists in mpt_freebsd.c. >How-To-Repeat: Access SCSI disks via mpt. >Fix: --- mpt_freebsd.c~ 2004-05-11 01:42:29.000000000 +0900 +++ mpt_freebsd.c 2004-05-11 01:50:06.000000000 +0900 @@ -268,11 +268,13 @@ ntodo = MPT_NSGL(mpt) - 1; ce->NextChainOffset = (MPT_RQSL(mpt) - sizeof (SGE_SIMPLE32)) >> 2; + ce->Length = MPT_NSGL(mpt) + * sizeof(SGE_SIMPLE32); } else { ntodo = nleft; ce->NextChainOffset = 0; + ce->Length = ntodo * sizeof (SGE_SIMPLE32); } - ce->Length = ntodo * sizeof (SGE_SIMPLE32); ce->Address = req->req_pbuf + ((char *)se - (char *)mpt_req); ce->Flags = MPI_SGE_FLAGS_CHAIN_ELEMENT; >Release-Note: >Audit-Trail: >Unformatted: