]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
sparc64: Fix crash with /proc/iomem
authorMikulas Patocka <mpatocka@redhat.com>
Tue, 26 May 2009 23:00:12 +0000 (16:00 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 12 Jun 2009 03:01:14 +0000 (20:01 -0700)
commitccfc46013757a25fb2002ede397a2702f50a612e
treef0701d61838444f279722177ebedaa6bede4e6dd
parented787bfcb9675350fa78413773a62cb797faf113
sparc64: Fix crash with /proc/iomem

[ Upstream commit 192d7a4667c6d11d1a174ec4cad9a3c5d5f9043c ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/sparc64/kernel/pci_common.c