Commit 475144f6 authored by jensen's avatar jensen
Browse files

MALI: midgard: Fixup for (compat) 32-bit clients

Signed-off-by: default avatarjensen <jensenhuang@friendlyarm.com>
parent deac908a
Showing with 18 additions and 2 deletions
+18 -2
......@@ -515,11 +515,19 @@ static int kbase_legacy_dispatch(struct kbase_context *kctx,
case KBASE_FUNC_JOB_SUBMIT:
{
struct kbase_uk_job_submit *job = args;
char __user *user_buf;
if (sizeof(*job) != args_size)
goto bad_size;
if (kbase_jd_submit(kctx, job->addr.value,
#ifdef CONFIG_COMPAT
if (kbase_ctx_flag(kctx, KCTX_COMPAT))
user_buf = compat_ptr(job->addr.compat_value);
else
#endif
user_buf = job->addr.value;
if (kbase_jd_submit(kctx, user_buf,
job->nr_atoms,
job->stride,
false) != 0)
......@@ -531,11 +539,19 @@ static int kbase_legacy_dispatch(struct kbase_context *kctx,
case KBASE_FUNC_JOB_SUBMIT_UK6:
{
struct kbase_uk_job_submit *job = args;
char __user *user_buf;
if (sizeof(*job) != args_size)
goto bad_size;
if (kbase_jd_submit(kctx, job->addr.value,
#ifdef CONFIG_COMPAT
if (kbase_ctx_flag(kctx, KCTX_COMPAT))
user_buf = compat_ptr(job->addr.compat_value);
else
#endif
user_buf = job->addr.value;
if (kbase_jd_submit(kctx, user_buf,
job->nr_atoms,
job->stride,
true) != 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment