]> git.baikalelectronics.ru Git - kernel.git/commit
sparc64: Fix crash with /proc/iomem
authorMikulas Patocka <mpatocka@redhat.com>
Thu, 19 Mar 2009 06:53:16 +0000 (23:53 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Mar 2009 06:53:16 +0000 (23:53 -0700)
commit745bbd58d1cf239fe2ab039487c6f6e05ea861e1
tree492fa7fbedffb167191aa4d6e218613667fb2864
parentcee31cbc5dc6362bc11468dbaf288a61ac6d938f
sparc64: Fix crash with /proc/iomem

When you compile kernel on Sparc64 with heap memory checking and type
"cat /proc/iomem", you get a crash, because pointers in struct
resource are uninitialized.

Most code fills struct resource with zeros, so I assume that it is
responsibility of the caller of request_resource to initialized it,
not the responsibility of request_resource functuion.

After 2.6.29 is out, there could be a check for uninitialized fields
added to request_resource to avoid crashes like this.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/pci_common.c