Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 8070

Summary: kudzu hangs (seg-fault) when probing parallel port
Product: [Retired] Red Hat Linux Reporter: gio
Component: kudzuAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-12-30 18:34:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description gio 1999-12-30 18:31:34 UTC
I've installed Red Hat 6.1 after which I've recompiled a linux kernel
version 2.2.13 with parallel port support built-in. After that
kudzu has begun to hang with a segmentation-fault (because mfr is NULL);
I've patched it and now it seems working properly. I hope this helps.

Giovanni Lagorio (gio@libertyline.com)

*** parallel.c-orig	Thu Dec 30 14:33:27 1999
--- parallel.c	Thu Dec 30 14:48:03 1999
***************
*** 255,261 ****
  	probebuf=calloc(8192,sizeof(char));
  	bytes=read(lpfile,probebuf,8192);

! 	mfr=model=desc=func=modes=NULL;
  	ptr = probebuf;
  	while (probebuf[0]!='\0') {
  		while (*ptr && *ptr !='\n') ptr++;
--- 255,264 ----
  	probebuf=calloc(8192,sizeof(char));
  	bytes=read(lpfile,probebuf,8192);

! 	mfr=strdup("Unknown vendor") ;
! 	model=strdup("Unknown device") ;
! 	desc=func=modes=NULL ;
!
  	ptr = probebuf;
  	while (probebuf[0]!='\0') {
  		while (*ptr && *ptr !='\n') ptr++;
***************
*** 282,288 ****
  		}
  		probebuf=ptr;
  	}
! 	if (!strcmp(mfr,"Unknown vendor")&&!strcmp(model,"Unknown device"))
return NULL;
  	key.pnpmfr = mfr;
  	key.pnpmodel = model;
  	pardev = bsearch(&key,parallelDeviceList,numParallelDevices,
--- 285,298 ----
  		}
  		probebuf=ptr;
  	}
! 	if (!strcmp(mfr,"Unknown vendor")&&!strcmp(model,"Unknown device")) {
! 		if (mfr) free(mfr);
! 		if (model) free(model);
! 		if (func) free(func);
! 		if (modes) free(modes);
! 		if (desc) free(desc);
! 		return NULL;
! 	}
  	key.pnpmfr = mfr;
  	key.pnpmodel = model;
  	pardev = bsearch(&key,parallelDeviceList,numParallelDevices,

Comment 1 Bill Nottingham 1999-12-30 18:34:59 UTC
This should be fixed in the latest kudzu currently in
Raw Hide (albeit fixed differently)