From nobody@FreeBSD.org  Mon Nov 15 19:52:31 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9A3AF1065693
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 15 Nov 2010 19:52:31 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 6ECFE8FC12
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 15 Nov 2010 19:52:31 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id oAFJqVk4073710
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 15 Nov 2010 19:52:31 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id oAFJqVL7073709;
	Mon, 15 Nov 2010 19:52:31 GMT
	(envelope-from nobody)
Message-Id: <201011151952.oAFJqVL7073709@www.freebsd.org>
Date: Mon, 15 Nov 2010 19:52:31 GMT
From: Rmi LAURENT <cloud@madpowah.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Sysinstall Load KLD Segfault
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         152270
>Category:       bin
>Synopsis:       sysinstall(8) Load KLD Segfault
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    brucec
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 15 20:00:17 UTC 2010
>Closed-Date:    Thu Dec 02 09:11:32 UTC 2010
>Last-Modified:  Thu Dec  2 09:20:10 UTC 2010
>Originator:     Rmi LAURENT
>Release:        8.1 Stable
>Organization:
>Environment:
FreeBSD Server 8.1-STABLE FreeBSD 8.1-STABLE #1: Sun Nov 14 21:13:47 CET 2010
>Description:
Sysinstall segfault segfault when I try to Load a KLD from floppy.

Backtrace :

(gdb) bt
#0  0x281bf4d7 in free () from /lib/libc.so.7
#1  0x080628a4 in ?? ()
#2  0x08075f73 in ?? ()
#3  0x2830f580 in ?? ()
#4  0x00000114 in ?? ()
#5  0x28120af9 in dupwin () from /lib/libncurses.so.8
#6  0x280e504c in dialog_menu () from /usr/lib/libdialog.so.7
#7  0x08054adc in ?? ()
#8  0x080847a5 in ?? ()
#9  0x0808b064 in ?? ()
#10 0x00000016 in ?? ()
#11 0x00000050 in ?? ()
#12 0x0000000c in ?? ()
#13 0xffffffed in ?? ()
#14 0x080b4060 in __progname ()
#15 0x00000000 in ?? ()
#16 0xbfbfe534 in ?? ()
#17 0xbfbfe530 in ?? ()
#18 0x00000000 in ?? ()
#19 0xffffffed in ?? ()
#20 0xbfbfe530 in ?? ()
#21 0xbfbfe534 in ?? ()
#22 0x080b4060 in __progname ()
#23 0x00000000 in ?? ()
#24 0x00000000 in ?? ()
#25 0x00000000 in ?? ()
#26 0x7273752f in ?? ()
#27 0x6372732f in ?? ()
#28 0x7273752f in ?? ()
#29 0x6962732e in ?? ()
#30 0x79732f6e in ?? ()
#31 0x736e6973 in ?? ()
#32 0x6c6c6174 in ?? ()
#33 0x6c65682f in ?? ()
#34 0x6f632f70 in ?? ()
#35 0x6769666e in ?? ()
#36 0x2e657275 in ?? ()
#37 0x00706c68 in ?? ()
#38 0x00000000 in ?? ()
#39 0x00000000 in ?? ()
#40 0x00000000 in ?? ()
#41 0x00000000 in ?? ()
#42 0x00000000 in ?? ()
#43 0x00000000 in ?? ()
#44 0x00000000 in ?? ()
#45 0x00000000 in ?? ()
#46 0x00000000 in ?? ()
#47 0x00000000 in ?? ()
#48 0x00000000 in ?? ()
#49 0x00000000 in ?? ()
#50 0x00000000 in ?? ()
#51 0x00000000 in ?? ()
#52 0x00000000 in ?? ()
#53 0x00000000 in ?? ()
#54 0x00000000 in ?? ()
#55 0x00000000 in ?? ()
#56 0x00000000 in ?? ()
#57 0x00000000 in ?? ()
#58 0x920021b7 in ?? ()
#59 0x28250f98 in ?? () from /lib/libc.so.7
#60 0x00000000 in ?? ()
#61 0x2830e120 in ?? ()
#62 0xbfbfe1b8 in ?? ()
#63 0x2822083e in sprintf () from /lib/libc.so.7
#64 0x08054c10 in ?? ()
#65 0x080b404c in __progname ()
#66 0xbfbfe534 in ?? ()
#67 0xbfbfe530 in ?? ()
#68 0xbfbfe52c in ?? ()
#69 0xbfbfe528 in ?? ()
#70 0x00000000 in ?? ()
#71 0x00000000 in ?? ()
#72 0x00000000 in ?? ()
#73 0x00000000 in ?? ()
#74 0x00000000 in ?? ()
#75 0xbfbfe548 in ?? ()
#76 0x08054c3c in ?? ()
#77 0x080b404c in __progname ()
#78 0x00000000 in ?? ()
#79 0xbfbfe718 in ?? ()
#80 0x280e504c in dialog_menu () from /usr/lib/libdialog.so.7
Previous frame inner to this frame (corrupt stack?)

>How-To-Repeat:
Launch sysinstall and do :
Configure > Load KLD

I have got the message :
No floppy devices found!  Please check that your system's configuration is correct.  For more information, consult the hardware guide in the Doc menu.

Push OK and sysinstall segfault.
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-sysinstall 
Responsible-Changed-By: brucec 
Responsible-Changed-When: Mon Nov 15 20:48:27 UTC 2010 
Responsible-Changed-Why:  
sysinstall bug. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=152270 
State-Changed-From-To: open->patched 
State-Changed-By: brucec 
State-Changed-When: Mon Nov 29 11:55:21 UTC 2010 
State-Changed-Why:  
Fixed in r216051. 


Responsible-Changed-From-To: freebsd-sysinstall->brucec 
Responsible-Changed-By: brucec 
Responsible-Changed-When: Mon Nov 29 11:55:21 UTC 2010 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=152270 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/152270: commit references a PR
Date: Mon, 29 Nov 2010 11:55:23 +0000 (UTC)

 Author: brucec
 Date: Mon Nov 29 11:55:17 2010
 New Revision: 216053
 URL: http://svn.freebsd.org/changeset/base/216053
 
 Log:
   If no floppy drive is installed kldBrowser() can generate an error early on.
   Initialize menu and count so the cleanup code doesn't try and use their
   uninitialized values.
   
   PR:	bin/152270
   Submitted by:	Remi LAURENT <cloud at madpowah.org>
   MFC after:	3 days
 
 Modified:
   head/usr.sbin/sysinstall/modules.c
 
 Modified: head/usr.sbin/sysinstall/modules.c
 ==============================================================================
 --- head/usr.sbin/sysinstall/modules.c	Mon Nov 29 11:28:31 2010	(r216052)
 +++ head/usr.sbin/sysinstall/modules.c	Mon Nov 29 11:55:17 2010	(r216053)
 @@ -123,13 +123,14 @@ driverFloppyCheck(void)
  int
  kldBrowser(dialogMenuItem *self)
  {
 -    DMenu	*menu;
 +    DMenu	*menu = NULL;
      int		i, what = DITEM_SUCCESS, msize, count;
      DIR		*dir;
      struct dirent *de;
      char	*err;
      
      err = NULL;
 +    count = 0;
      
      if (DITEM_STATUS(mediaSetFloppy(NULL)) == DITEM_FAILURE) {
  	err = "Unable to set media device to floppy.";
 @@ -142,7 +143,6 @@ kldBrowser(dialogMenuItem *self)
      }
  
      msize = sizeof(DMenu) + (sizeof(dialogMenuItem) * 2);
 -    count = 0;
      if ((menu = malloc(msize)) == NULL) {
  	err = "Failed to allocate memory for menu";
  	goto errout;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/152270: commit references a PR
Date: Thu,  2 Dec 2010 09:09:54 +0000 (UTC)

 Author: brucec
 Date: Thu Dec  2 09:09:46 2010
 New Revision: 216116
 URL: http://svn.freebsd.org/changeset/base/216116
 
 Log:
   MFC r216052:
   Update the serial port device names. They changed in 8.0 because the
   default driver is now uart(4).
   
   PR:	bin/140887
   Submitted by:	Joe Barbish <fbsd1 at a1poweruser.com>
   
   MFC r216053:
   If no floppy drive is installed kldBrowser() can generate an error
   early on. Initialize menu and count so the cleanup code doesn't try
   and use their uninitialized values.
   
   PR:	bin/152270
   Submitted by:	Remi LAURENT <cloud at madpowah.org>
   
   Approved by:	re (kensmith)
 
 Modified:
   stable/8/usr.sbin/sysinstall/devices.c
   stable/8/usr.sbin/sysinstall/menus.c
   stable/8/usr.sbin/sysinstall/modules.c
 Directory Properties:
   stable/8/usr.sbin/sysinstall/   (props changed)
 
 Modified: stable/8/usr.sbin/sysinstall/devices.c
 ==============================================================================
 --- stable/8/usr.sbin/sysinstall/devices.c	Thu Dec  2 06:40:21 2010	(r216115)
 +++ stable/8/usr.sbin/sysinstall/devices.c	Thu Dec  2 09:09:46 2010	(r216116)
 @@ -91,7 +91,7 @@ static struct _devname {
      DISK("ipsd%d",	"IBM ServeRAID RAID array",		4),
      DISK("mfid%d",	"LSI MegaRAID SAS array",		4),
      FLOPPY("fd%d",	"floppy drive unit A",			4),
 -    SERIAL("cuad%d",	"%s on device %s (COM%d)",		16),
 +    SERIAL("cuau%d",	"%s on device %s (COM%d)",		16),
      USB("da%da",	"USB Mass Storage Device",		16),
      NETWORK("ae",	"Attansic/Atheros L2 Fast Ethernet"),
      NETWORK("age",	"Attansic/Atheros L1 Gigabit Ethernet"),
 
 Modified: stable/8/usr.sbin/sysinstall/menus.c
 ==============================================================================
 --- stable/8/usr.sbin/sysinstall/menus.c	Thu Dec  2 06:40:21 2010	(r216115)
 +++ stable/8/usr.sbin/sysinstall/menus.c	Thu Dec  2 09:09:46 2010	(r216116)
 @@ -426,10 +426,10 @@ DMenu MenuMousePort = {
      {
        { "1 BusMouse",	"PC-98x1 bus mouse (/dev/mse0)", 
  	dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/mse0" },
 -      { "2 COM1",	"Serial mouse on COM1 (/dev/cuad0)",
 -	dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuad0" },
 -      { "3 COM2",	"Serial mouse on COM2 (/dev/cuad1)",
 -	dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuad1" },
 +      { "2 COM1",	"Serial mouse on COM1 (/dev/cuau0)",
 +	dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuau0" },
 +      { "3 COM2",	"Serial mouse on COM2 (/dev/cuau1)",
 +	dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuau1" },
        { NULL } },
  };
  #else
 @@ -442,14 +442,14 @@ DMenu MenuMousePort = {
      NULL,
      { { "1 PS/2",	"PS/2 style mouse (/dev/psm0)", 
  	dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/psm0" },
 -      { "2 COM1",	"Serial mouse on COM1 (/dev/cuad0)",
 -	dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuad0" },
 -      { "3 COM2",	"Serial mouse on COM2 (/dev/cuad1)",
 -	dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuad1" },
 -      { "4 COM3",	"Serial mouse on COM3 (/dev/cuad2)",
 -	dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuad2" },
 -      { "5 COM4",	"Serial mouse on COM4 (/dev/cuad3)", 
 -	dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuad3" },
 +      { "2 COM1",	"Serial mouse on COM1 (/dev/cuau0)",
 +	dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuau0" },
 +      { "3 COM2",	"Serial mouse on COM2 (/dev/cuau1)",
 +	dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuau1" },
 +      { "4 COM3",	"Serial mouse on COM3 (/dev/cuau2)",
 +	dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuau2" },
 +      { "5 COM4",	"Serial mouse on COM4 (/dev/cuau3)", 
 +	dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/cuau3" },
        { "6 BusMouse",	"Logitech, ATI or MS bus mouse (/dev/mse0)", 
  	dmenuVarCheck, dmenuSetVariable, NULL, VAR_MOUSED_PORT "=/dev/mse0" },
        { NULL } },
 
 Modified: stable/8/usr.sbin/sysinstall/modules.c
 ==============================================================================
 --- stable/8/usr.sbin/sysinstall/modules.c	Thu Dec  2 06:40:21 2010	(r216115)
 +++ stable/8/usr.sbin/sysinstall/modules.c	Thu Dec  2 09:09:46 2010	(r216116)
 @@ -123,13 +123,14 @@ driverFloppyCheck(void)
  int
  kldBrowser(dialogMenuItem *self)
  {
 -    DMenu	*menu;
 +    DMenu	*menu = NULL;
      int		i, what = DITEM_SUCCESS, msize, count;
      DIR		*dir;
      struct dirent *de;
      char	*err;
      
      err = NULL;
 +    count = 0;
      
      if (DITEM_STATUS(mediaSetFloppy(NULL)) == DITEM_FAILURE) {
  	err = "Unable to set media device to floppy.";
 @@ -142,7 +143,6 @@ kldBrowser(dialogMenuItem *self)
      }
  
      msize = sizeof(DMenu) + (sizeof(dialogMenuItem) * 2);
 -    count = 0;
      if ((menu = malloc(msize)) == NULL) {
  	err = "Failed to allocate memory for menu";
  	goto errout;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: brucec 
State-Changed-When: Thu Dec 2 09:11:13 UTC 2010 
State-Changed-Why:  
Merged to stable/7 and stable/8. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=152270 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/152270: commit references a PR
Date: Thu,  2 Dec 2010 09:10:50 +0000 (UTC)

 Author: brucec
 Date: Thu Dec  2 09:10:45 2010
 New Revision: 216117
 URL: http://svn.freebsd.org/changeset/base/216117
 
 Log:
   MFC r216053:
   If no floppy drive is installed kldBrowser() can generate an error
   early on. Initialize menu and count so the cleanup code doesn't try
   and use their uninitialized values.
   
   PR:	bin/152270
   Submitted by:	Remi LAURENT <cloud at madpowah.org>
   
   Approved by:	re (kensmith)
 
 Modified:
   stable/7/usr.sbin/sysinstall/modules.c
 Directory Properties:
   stable/7/usr.sbin/sysinstall/   (props changed)
 
 Modified: stable/7/usr.sbin/sysinstall/modules.c
 ==============================================================================
 --- stable/7/usr.sbin/sysinstall/modules.c	Thu Dec  2 09:09:46 2010	(r216116)
 +++ stable/7/usr.sbin/sysinstall/modules.c	Thu Dec  2 09:10:45 2010	(r216117)
 @@ -123,13 +123,14 @@ driverFloppyCheck(void)
  int
  kldBrowser(dialogMenuItem *self)
  {
 -    DMenu	*menu;
 +    DMenu	*menu = NULL;
      int		i, what = DITEM_SUCCESS, msize, count;
      DIR		*dir;
      struct dirent *de;
      char	*err;
      
      err = NULL;
 +    count = 0;
      
      if (DITEM_STATUS(mediaSetFloppy(NULL)) == DITEM_FAILURE) {
  	msgConfirm("Unable to set media device to floppy.");
 @@ -146,7 +147,6 @@ kldBrowser(dialogMenuItem *self)
      }
  
      msize = sizeof(DMenu) + (sizeof(dialogMenuItem) * 2);
 -    count = 0;
      if ((menu = malloc(msize)) == NULL) {
  	err = "Failed to allocate memory for menu";
  	goto errout;
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
