staging: tidspbridge: check return code of get_user
Subsystems (2)
PATCH 7/14 staging: tidspbridge: check return code of get_user
From: Vasiliy Kulikov <[email protected]>
Function get_user may fail. Check for it.
Signed-off-by Vasiliy Kulikov <[email protected]>
---
I couldn't compile this driver at all, so it is not tested.
drivers/staging/tidspbridge/pmgr/dspapi.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
drivers/staging/tidspbridge/pmgr/dspapi.c +5 -1
@@ -872,7 +872,11 @@ u32 procwrap_load(union trapped_args *args, void *pr_ctxt)/* number of elements in the envp array including NULL */ count =0 ;do { -get_user (temp, args->args_proc_load.user_envp + count); +if (get_user (temp, + args->args_proc_load.user_envp + count)) { + status = -EFAULT ; + goto func_cont; + } count++; }while (temp); envp =kmalloc (count *sizeof (u8 *),GFP_KERNEL );
Signature · 1 line
1.7.0.4