From: Jay L. <jl...@en...> - 2006-05-05 17:14:44
|
The DUMPDEV configuration of /etc/sysconfig/dump (or /etc/dumputils.conf) is defined to "/dev/vmdump", which is then linked to another device. Some invalid values defined to the device can cause kernel panic. I was able to reproduce the problem easily by doing echo 1000 > /sys/dump/dumpdev Stack trace: [<a00000010000caa0>] ia64_leave_kernel+0x0/0x280 sp=e00000600c06fc40 bsp=e00000600c0695e0 [<a000000100183f00>] iput+0x80/0x200 sp=e00000600c06fe10 bsp=e00000600c0695a8 [<a00000010015b600>] bdput+0x20/0x40 sp=e00000600c06fe10 bsp=e00000600c069588 [<a000000206859290>] dump_block_open+0x570/0x960 [dump_blockdev] sp=e00000600c06fe10 bsp=e00000600c069538 [<a000000206d167f0>] dump_generic_configure+0x250/0x420 [dump] sp=e00000600c06fe20 bsp=e00000600c069500 [<a000000206d11b40>] dumper_setup+0x1c0/0x2a0 [dump] sp=e00000600c06fe20 bsp=e00000600c0694c0 [<a000000206d11da0>] store_dumpdev+0x180/0x2a0 [dump] sp=e00000600c06fe20 bsp=e00000600c069480 [<a0000001001ee4e0>] subsys_attr_store+0x60/0xa0 sp=e00000600c06fe20 bsp=e00000600c069448 [<a0000001001eef60>] sysfs_write_file+0x240/0x2e0 sp=e00000600c06fe20 bsp=e00000600c0693f0 [<a000000100147580>] vfs_write+0x200/0x3a0 sp=e00000600c06fe20 bsp=e00000600c0693a0 [<a000000100148270>] sys_write+0x70/0xe0 sp=e00000600c06fe20 bsp=e00000600c069328 The problem is on blkdev_get() failure dump_block_open (both intr and poll versions) would skip to err1: bdput() which hits BUG(). This patch would simply returns a retval on blkdev_get() failure as would do in all other blkdev_get() failure instances in the kernel. With the patch, assigning invalid value to DUMPDEV would fail with "Invalid argument". Signed-off-by: Jay Lan <jl...@en...> --- |