Bug 169750 - diskdump.c : wrong arg type for find_dump_device()
Summary: diskdump.c : wrong arg type for find_dump_device()
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nobuhiro Tachino
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-10-02 23:49 UTC by Stephan GUILLOUX
Modified: 2007-11-30 22:11 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-10-25 07:42:03 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Stephan GUILLOUX 2005-10-02 23:49:15 UTC
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 08:01:35 UTC
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 21:28:10 UTC
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 14:27:08 UTC
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 14:29:15 UTC
(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.