All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fsl_pci: Correct fsl_pci_mcheck_exception
@ 2017-09-05 11:59 Joakim Tjernlund
  2017-09-06 15:34 ` York Sun
  0 siblings, 1 reply; 6+ messages in thread
From: Joakim Tjernlund @ 2017-09-05 11:59 UTC (permalink / raw)
  To: linuxppc-dev linuxppc-dev, York Sun

get_user() had it args reversed causing NIP to be NULL:ed instead
of fixing up the PCI access.

Note: This still hangs my P1020 Freescale CPU hard, but at least
I get a NIP now.

Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
---
 arch/powerpc/sysdev/fsl_pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 7c8b779c329a..9e64c12dff6a 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -996,7 +996,7 @@ int fsl_pci_mcheck_exception(struct pt_regs *regs)
 	if (is_in_pci_mem_space(addr)) {
 		if (user_mode(regs)) {
 			pagefault_disable();
-			ret = get_user(regs->nip, &inst);
+			ret = get_user(inst, (__u32 __user *)regs->nip);
 			pagefault_enable();
 		} else {
 			ret = probe_kernel_address(regs->nip, inst);
-- 
2.13.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-12-05 20:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-05 11:59 [PATCH] fsl_pci: Correct fsl_pci_mcheck_exception Joakim Tjernlund
2017-09-06 15:34 ` York Sun
2017-09-06 19:19   ` Leo Li
2017-11-21 17:17     ` Joakim Tjernlund
2017-12-05 15:16       ` Leo Li
2017-12-05 20:10         ` Scott Wood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.