]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/fsl-rio: Fix fsl_rio_setup error paths and use-after-unmap
authorScott Wood <scottwood@freescale.com>
Mon, 28 Apr 2014 23:20:09 +0000 (18:20 -0500)
committerScott Wood <scottwood@freescale.com>
Fri, 9 May 2014 20:49:05 +0000 (15:49 -0500)
commit7a8933c7298ce2450dcf902ba4943f5abde9eeea
treedc9bf3d6aca7d4ce35e88807ac0502322f7ccc72
parent9585097d0dd29bcba27200af8c4234cb4e0a9b5f
powerpc/fsl-rio: Fix fsl_rio_setup error paths and use-after-unmap

Several of the error paths from fsl_rio_setup are missing error
messages.

Worse, fsl_rio_setup initializes several global pointers and does not
NULL them out after freeing/unmapping on error.  This caused
fsl_rio_mcheck_exception() to crash when accessing rio_regs_win which
was non-NULL but had been unmapped.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Cc: Liu Gang <Gang.Liu@freescale.com>
---
Liu Gang, are you sure all of these error conditions are fatal?  Why
does the rio driver fail if rmu is not present (e.g.  on t4240)?
arch/powerpc/sysdev/fsl_rio.c