ARM: tegra: correctly access file in kernel
1. Tell the kernel the pointers from within the kernel address
space are safe before accessing the file. Save/restore current
process address before/after the file accessing.
2. Use macro IS_ERR to check file opening is successful or not
because filp_open() returns negtive value once error happens.
bug 865113
Original-Change-Id: Ic8d779352d3daeaf3d3ef92e7c5feb82e55b47cd
Reviewed-on: http://git-master/r/48775
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: R539a531fb1fef5918a136dcaff88bab6a487f51a
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
index cbf5fa1..ca673d1 100644
--- a/arch/arm/mach-tegra/common.c
+++ b/arch/arm/mach-tegra/common.c
@@ -660,3 +660,4 @@
tegra_bootloader_fb_size))
pr_err("Failed to free bootloader fb.\n");
}
+