From owner-freebsd-current@FreeBSD.ORG Sat Feb 28 09:53:31 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4228316A4CE for ; Sat, 28 Feb 2004 09:53:31 -0800 (PST) Received: from smtp.mho.com (smtp.mho.net [64.58.4.5]) by mx1.FreeBSD.org (Postfix) with SMTP id 0B20A43D1F for ; Sat, 28 Feb 2004 09:53:31 -0800 (PST) (envelope-from scottl@freebsd.org) Received: (qmail 85518 invoked by uid 1002); 28 Feb 2004 17:53:30 -0000 Received: from unknown (HELO freebsd.org) (64.58.1.252) by smtp.mho.net with SMTP; 28 Feb 2004 17:53:30 -0000 Message-ID: <4040D4E0.4020604@freebsd.org> Date: Sat, 28 Feb 2004 10:50:24 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20031103 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jonathan Weiss References: In-Reply-To: Content-Type: multipart/mixed; boundary="------------000105010608020409010009" cc: freebsd-current@freebsd.org Subject: Re: mlx driver related kernel panic in Freebsd 5.2.1-RELEASE X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2004 17:53:31 -0000 This is a multi-part message in MIME format. --------------000105010608020409010009 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Jonathan Weiss wrote: >>>OK, I seem to be able to get FreeBSD 5.2.1-RELEASE to reliably panic with >>>a "panic: free: address 0xd8d5e000(0xd8d5e000) has not been allocated." on >>>the serial console when it crashes. >>> >>>I'm doing two copies of the entire ports collection to seperate >>>subdirectories when the crash occurs. It seems to do this regardless of >>> >>>The machine is an IBM Netfinity 5500 with 4 x 550Mhz P3 Xeon CPUS, 2gigs >>>of ram and a Mylex DAC1100 RAID controller. There are 6 73G disks attached >>>to channel 0 of the controller, 5 disks are in a RAID 5 array, the sixth >>>is a hot spare. >>> >>>Any ideas? >> >>I see the same here with my p2 400 and a Mylex DAC960PL and 5x4,5 GB HDDs. >>Installing 5.2.1-RC2 fails with the same panic. >>5.1 worked flawlessly. >> >>Jonathan Weiss > > > Sorry for replying to myself, but I tried a snapshot (28/2/04) and got the > same panic. Installing 5.1 is working and until the end of january I also > had current without problems on this machine. I am not sure, but I think > that i also had 5.2.1-RC1 on this machine without problems, so the problem > may be introduced not long ago. > > Thank you, > Jonathan Weiss > Can you try the attached patch? Scott --------------000105010608020409010009 Content-Type: text/plain; name="mlx_free.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mlx_free.diff" Index: mlx.c =================================================================== RCS file: /usr/ncvs/src/sys/dev/mlx/mlx.c,v retrieving revision 1.44 diff -u -r1.44 mlx.c --- mlx.c 22 Feb 2004 09:52:46 -0000 1.44 +++ mlx.c 28 Feb 2004 17:48:59 -0000 @@ -1554,8 +1554,8 @@ if ((mc->mc_complete == NULL) && (mc != NULL)) mlx_releasecmd(mc); /* we got an error, and we allocated a result */ - if ((error != 0) && (mc->mc_data != NULL)) { - free(mc->mc_data, M_DEVBUF); + if ((error != 0) && (result != NULL)) { + free(result, M_DEVBUF); mc->mc_data = NULL; } return(result); --------------000105010608020409010009--