Files
android_kernel_xiaomi_sm8450/arch/powerpc/kernel
Mike Qiu 140ab6452c powerpc/PCI: Fix NULL dereference in sys_pciconfig_iobase() list traversal
3bc955987f ("powerpc/PCI: Use list_for_each_entry() for bus traversal")
caused a NULL pointer dereference because the loop body set the iterator to
NULL:

  Unable to handle kernel paging request for data at address 0x00000000
  Faulting instruction address: 0xc000000000041d78
  Oops: Kernel access of bad area, sig: 11 [#1]
  ...
  NIP [c000000000041d78] .sys_pciconfig_iobase+0x68/0x1f0
  LR [c000000000041e0c] .sys_pciconfig_iobase+0xfc/0x1f0
  Call Trace:
  [c0000003b4787db0] [c000000000041e0c] .sys_pciconfig_iobase+0xfc/0x1f0 (unreliable)
  [c0000003b4787e30] [c000000000009ed8] syscall_exit+0x0/0x98

Fix it by using a temporary variable for the iterator.

[bhelgaas: changelog, drop tmp_bus initialization]
Fixes: 3bc955987f powerpc/PCI: Use list_for_each_entry() for bus traversal
Signed-off-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2014-04-14 16:33:49 -06:00
..
2014-04-09 12:53:28 +10:00
2013-11-21 10:33:36 +11:00
2014-02-17 11:19:39 +11:00
2014-03-04 17:37:52 +01:00
2011-03-31 11:26:23 -03:00
2013-12-30 15:19:31 +11:00
2013-10-11 18:23:53 +11:00
2011-03-31 11:26:23 -03:00
2014-04-07 10:33:12 +10:00
2014-04-07 10:33:12 +10:00
2010-07-19 10:56:54 +02:00
2011-03-31 11:26:23 -03:00
2012-03-28 18:30:02 +01:00
2014-04-09 12:53:28 +10:00
2014-03-19 19:57:14 -05:00