Bug 175553 - [RHEL4 U3] diskdump - system crashes if a wholde device is registered as a dump device
Summary: [RHEL4 U3] diskdump - system crashes if a wholde device is registered as a du...
Keywords:
Status: CLOSED DUPLICATE of bug 168967
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel
Version: 4.3
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
: ---
Assignee: Akira Imamura
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-12-12 18:49 UTC by Keiichiro Tokunaga
Modified: 2007-11-30 22:07 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-08-02 21:07:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Keiichiro Tokunaga 2005-12-12 18:49:17 UTC
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):
kernel-2.6.9-24.ELsmp

How reproducible:
Always

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
   order.

   DEVICE=/dev/sda1:/dev/sdb

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 19:32:12 UTC
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)) {
 		dump_type->remove_device(dump_device);
 		module_put(dump_type->owner);
 		list_del(&dump_device->list);

_


Comment 3 Dave Anderson 2006-08-02 18:09:46 UTC
> Comment #2 From RHEL Product and Program Management (pm-rhel)...
>
> 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 21:05:55 UTC
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 21:07:31 UTC

*** 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.