Bug 961

Summary: sndconfig dumps core without PCI kernel support loaded
Product: [Retired] Red Hat Linux Reporter: kjw
Component: sndconfigAssignee: David Lawrence <dkl>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 5.2   
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-01-25 20:41:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description kjw 1999-01-25 19:47:17 UTC
sndconfig will dump core (seg fault) if the kernel doesn't
have pci support linked in.  The fix is a one-line change:

oops, this patch is backwards, but I can't get another
diff -u generated until tomorrow.  You can see it's a simple
fix, though; it just doesn't detect the -1 return from the
pciProbeDevice, so it needs to check n<1 instead of the
erroneous !n.

--- pnpconf.c   Sat Jan 23 23:05:16 1999
+++ pnpconf.c-  Sat Jan 23 23:05:03 1999
@@ -305,7 +305,7 @@
     int i,n;

     n = pciProbeDevice(PCI_AUDIO, &devs);
-    if (n<1) {
+    if (!n) {
       return -1;
     }
     /* We don't support more than one card anywhere
else;    */

Comment 1 Bill Nottingham 1999-01-25 20:41:59 UTC
This can be worked around by running sndconfig with '--noprobe'
(of course, that turns off the isapnp probe as well.)

Fixed in sndconfig-0.29-5.