Thread (6 messages) flat view 6 messages, 4 authors, 2017-12-05

Re: [PATCH] fsl_pci: Correct fsl_pci_mcheck_exception

From: York Sun <hidden>
Date: 2017-09-06 15:34:17

On 09/05/2017 04:59 AM, Joakim Tjernlund wrote:=0A=
quoted hunk ↗ jump to hunk
get_user() had it args reversed causing NIP to be NULL:ed instead=0A=
of fixing up the PCI access.=0A=
=0A=
Note: This still hangs my P1020 Freescale CPU hard, but at least=0A=
I get a NIP now.=0A=
=0A=
Signed-off-by: Joakim Tjernlund <redacted>=0A=
---=0A=
  arch/powerpc/sysdev/fsl_pci.c | 2 +-=0A=
  1 file changed, 1 insertion(+), 1 deletion(-)=0A=
=0A=
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.=
c=0A=
quoted hunk ↗ jump to hunk
index 7c8b779c329a..9e64c12dff6a 100644=0A=
--- a/arch/powerpc/sysdev/fsl_pci.c=0A=
+++ b/arch/powerpc/sysdev/fsl_pci.c=0A=
@@ -996,7 +996,7 @@ int fsl_pci_mcheck_exception(struct pt_regs *regs)=0A=
  	if (is_in_pci_mem_space(addr)) {=0A=
  		if (user_mode(regs)) {=0A=
  			pagefault_disable();=0A=
-			ret =3D get_user(regs->nip, &inst);=0A=
+			ret =3D get_user(inst, (__u32 __user *)regs->nip);=0A=
  			pagefault_enable();=0A=
  		} else {=0A=
  			ret =3D probe_kernel_address(regs->nip, inst);=0A=
=0A=
=0A=
Leo,=0A=
=0A=
Can you take a look, or assign it to someone who is familiar with this code=
?=0A=
=0A=
York=0A=
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help