Bug 206641 - Kudzu incomplete scsi probe with many scsi devices
Kudzu incomplete scsi probe with many scsi devices
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kudzu (Show other bugs)
4.4
All Linux
medium Severity high
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
:
: 203811 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-15 09:38 EDT by Denis Leroy
Modified: 2014-03-16 23:02 EDT (History)
6 users (show)

See Also:
Fixed In Version: RHBA-2007-0292
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-05-07 20:20:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch for scsi.c, fixes /proc/scsi/scsi read loop (732 bytes, patch)
2006-09-15 09:38 EDT, Denis Leroy
no flags Details | Diff

  None (edit)
Description Denis Leroy 2006-09-15 09:38:04 EDT
(Hi Bill)

So we have a SunFire X4200 running RHEL4U4 x86_64 with an HBA card connected to
an external StorEdge with 31+ disks.

When running 'kudzu -p -c HD', kudzu can only probe 25 disks, instead of the 38
available (31 external, 4 internal, cdrom, virtual cdrom, virtual floppy).

Turns out the bug is this: kudzu reads from /proc/scsi/scsi with a read()
command, but does not check the actual value returned by read() (the actual
number of bytes read). read buffer is 16k, so for a regular file this shouldn't
be a problem. In our case, with so many scsi devices, /proc/scsi/scsi has about
6k characters, so no prob for a 16k buffer. But /proc/scsi/scsi is no regular
file, and the first call to read() returns only about 3800 bytes, which breaks
the realloc loop. You'll understand easily when you look at the code.

Please find attached patch. Note this affects kudzu 1.1.95.15. I think kudzu
1.2.x uses sysfs and therefore should be ok (didn't verify though).

Corresponding Issue Tracker: 97738.

Thanks,
Denis Leroy
Sun Microsystems, Inc.
Comment 1 Denis Leroy 2006-09-15 09:38:04 EDT
Created attachment 136356 [details]
Patch for scsi.c, fixes /proc/scsi/scsi read loop
Comment 3 RHEL Product and Program Management 2006-09-15 12:04:00 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 5 David Aquilina 2006-09-21 18:06:13 EDT
*** Bug 203811 has been marked as a duplicate of this bug. ***
Comment 6 Bill Nottingham 2006-11-21 18:54:51 EST
Added, will be in 1.1.95.18-1 or later.
Comment 20 Red Hat Bugzilla 2007-05-07 20:21:00 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0292.html

Note You need to log in before you can comment on or make changes to this bug.