Bug 169750 - diskdump.c : wrong arg type for find_dump_device()
diskdump.c : wrong arg type for find_dump_device()
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nobuhiro Tachino
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-02 19:49 EDT by Stephan GUILLOUX
Modified: 2007-11-30 17:11 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-10-25 03:42:03 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)

  None (edit)
Description Stephan GUILLOUX 2005-10-02 19:49:15 EDT
Description of problem:
  Function find_dump_device() is always called with void * argument,
  but uses it as struct dump_device_s *, which is wrong.
  Found in the original diskdump patch, on FC3. Probably exists also
  in FC4 or other red-hat products.

Version-Release number of selected component (if applicable):
  kernel-2.6.12-1.1378_FC3

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
  Initial diskdump (over 2.6.9) patch has the same pb.
  - In ide-dump.c, the function ide_dump_probe returns a ide_drive_t 
    pointer.
  - In scsi_dump.c, the function scsi_dump_probe returns a scsi_device
    pointer.
  The value returned by xxx_probe is given as is to find_dump_device(),
  which use them as disk_dump_device pointers. Below, one possible patch :


diff -ru linux-2.6.12.old/drivers/block/diskdump.c
linux-2.6.12.new/drivers/block/diskdump.c
--- linux-2.6.12.old/drivers/block/diskdump.c   2005-10-02 02:49:49.000000000 +0200
+++ linux-2.6.12.new/drivers/block/diskdump.c   2005-10-03 01:47:59.000000000 +0200
@@ -689,12 +689,12 @@
        return NULL;
 }
 
-static struct disk_dump_device *find_dump_device(struct disk_dump_device *device)
+static struct disk_dump_device *find_dump_device(void *real_device)
 {
        struct disk_dump_device *dump_device;
 
        list_for_each_entry(dump_device, &disk_dump_devices, list)
-               if (device->device == dump_device->device)
+               if (dump_device->device == real_device)
                        return  dump_device;
        return NULL;
 }
Comment 1 Stephan GUILLOUX 2005-10-03 04:01:35 EDT
Other related BUG #id
167752 – Either diskdumputils should be removed or diskdumps supported

I had a look into the kernel.src.rpm :
None of dump-ide or dump-scsi are present, but they exist in diskdump-1.0 
archive. Is diskdump still supported ?

Comment 2 Jeff Moyer 2005-10-17 17:28:10 EDT
Dave,

I'm not sure who needs to look at this.  Can you see to it that the proper
maintainer is alerted?
Comment 3 Nobuhiro Tachino 2005-10-18 10:27:08 EDT
Thank you. Your patch is correct. Actually the diskdump for kernel v2.4 has the
same code which you provided. Porting to v2.6 seems to have slipped the bug into
the code.
Comment 4 Nobuhiro Tachino 2005-10-18 10:29:15 EDT
(In reply to comment #1)
> Other related BUG #id
> 167752 – Either diskdumputils should be removed or diskdumps supported
> 
> I had a look into the kernel.src.rpm :
> None of dump-ide or dump-scsi are present, but they exist in diskdump-1.0 
> archive. Is diskdump still supported ?

diskdump is not supported in FC.

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