[PATCH] powerpc/fsl-rio: Fix fsl_rio_setup error paths and use-after-unmap

Gang.Liu at freescale.com Gang.Liu at freescale.com
Tue Apr 29 14:04:09 EST 2014


> -----Original Message-----
> From: Wood Scott-B07421
> Sent: Tuesday, April 29, 2014 9:32 AM
> To: linuxppc-dev at lists.ozlabs.org
> Cc: Wood Scott-B07421; Liu Gang-B34182
> Subject: [PATCH] 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 at freescale.com>
> Cc: Liu Gang <Gang.Liu at 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)?

Hi Scott, I think the errors you modified in the patch are serious and should
be fixed. Thanks very much!
And in fact, the rio driver can be used just for the submodule of the SRIO: RMU.
It should be used with arch/powerpc/sysdev/fsl_rmu.c and there should have the
RMU module.
The fsl_rio.c implements some basic and needed works to support the RMU running well.

In addition, could you please help to apply the following patch:

http://patchwork.ozlabs.org/patch/337810/

Thanks!
Liu Gang   
> ---
>  arch/powerpc/sysdev/fsl_rio.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)



More information about the Linuxppc-dev mailing list