From: Benjamin Herrenschmidt Date: Mon, 2 Apr 2012 03:37:13 +0000 (+1000) Subject: nouveau: Fix crash when pci_ram_rom() returns a size of 0 X-Git-Tag: v3.4-rc2~33^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea71f98d680c9ac768a7849d26d7ce4744064510;p=pandora-kernel.git nouveau: Fix crash when pci_ram_rom() returns a size of 0 From b15b244d6e6e20964bd4b85306722cb60c3c0809 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Mon, 2 Apr 2012 13:28:18 +1000 Subject: Under some circumstances, pci_map_rom() can return a valid mapping but a size of 0 (if it cannot find an image in the header). This causes nouveau to try to kmalloc() a 0 sized pointer and dereference it, which crashes. Signed-off-by: Benjamin Herrenschmidt Acked-by: Ben Skeggs Signed-off-by: Dave Airlie --- Reading git-diff-tree failed