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:
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 #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.
As Dave said, the fix is in U4. So, I think this bugzilla should be marked as a duplicate of BZ #168967.
*** This bug has been marked as a duplicate of 168967 ***