Bug 175553 - [RHEL4 U3] diskdump - system crashes if a wholde device is registered as a dump device
[RHEL4 U3] diskdump - system crashes if a wholde device is registered as a du...
Status: CLOSED DUPLICATE of bug 168967
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Akira Imamura
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2005-12-12 13:49 EST by Keiichiro Tokunaga
Modified: 2007-11-30 17:07 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-08-02 17:07:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Keiichiro Tokunaga 2005-12-12 13:49:17 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)

Description of problem:
This bug was found in the course of the investigation on BZ#175207.

The system crashes when running "cat /proc/diskdump" in the
case that a whole device is registered as a dump device.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Use kernel-2.6.9-24.ELsmp, which has a bug of BZ#175207
2. Register both a partition and a whole device (e.g. /dev/sdb)
   as a dump device in /etc/sysconfig/diskdump in the following


3. Run "service diskdump restart"
4. Run "cat /proc/diskdump"

Actual Results:  The system crashes.

Expected Results:  Information of dump devices that /proc/diskdump is supposed to
show is displayed.

Additional info:
Comment 1 Keiichiro Tokunaga 2005-12-15 14:32:12 EST
This panic hardly occurs because this can occur only if
add_dump_partition() fails.  add_dump_partition() fails
only if kmalloc() fails to allocate 24bytes(32bit)/48bytes
(64bit) memory or "struct bdev" doesn't exist for a dump
device.  However, there is another chance to reproduce
this panic due to BZ#175207.  If a whole device (e.g. /dev/sda)
is registered as a dump device, that makes add_dump_partition()
fail.  Consequently, running "cat /proc/diskdump" causes
the panic.  BZ#175207 will be fixed in U4.  A README file
of diskdumputils in U3 says that a whole device is not
supported in U3.

If add_dump_partition() fails, some error handling code
is supposed to run.  However, it never runs because the
condition of a if-statement is wrong.  Consequently,
running "cat /proc/diskdump" refers to data that shouldn't
be there anymore, and causes the panic.

Here is a patch to fix the bug.


 linux-2.6.9-24-kei/drivers/block/diskdump.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/block/diskdump.c~fix-panic drivers/block/diskdump.c
--- linux-2.6.9-24/drivers/block/diskdump.c~fix-panic	2005-12-13
00:33:54.000000000 -0500
+++ linux-2.6.9-24-kei/drivers/block/diskdump.c	2005-12-13 00:33:54.000000000 -0500
@@ -1028,7 +1028,7 @@ static int add_dump(struct device *dev, 
 	ret = add_dump_partition(dump_device, bdev);
-	if (ret < 0 && list_empty(&dump_device->list)) {
+	if (ret < 0 && list_empty(&dump_device->partitions)) {

Comment 3 Dave Anderson 2006-08-02 14:09:46 EDT
> Comment #2 From RHEL Product and Program Management (pm-rhel@redhat.com)...
> Removed from RHEL4U4Proposed tracker. Added to rhel-4.5 proposed list. 
> If you do not plan to fix this issue, please set to CLOSED/WONTFIX.

The above fix is already in RHEL4-U4, as part of the larger patch for
this RELEASE_PENDING bugzilla:

  Bugzilla Bug 168967 – [RHEL4] [diskdump] kernel - The dump device is not
                                changed on multiple dump devices environment

This bugzilla should probably be marked as a duplicate of BZ #168967.
Comment 4 Akira Imamura 2006-08-02 17:05:55 EDT
As Dave said, the fix is in U4. So, I think this bugzilla should be marked
as a duplicate of BZ #168967.
Comment 5 Linda Wang 2006-08-02 17:07:31 EDT

*** This bug has been marked as a duplicate of 168967 ***

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