mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
Merge "msm: adsprpc: Fix error code for invalid ioctl"
This commit is contained in:
commit
5f981341c1
3 changed files with 14 additions and 11 deletions
|
|
@ -63,6 +63,7 @@
|
|||
|
||||
#define FASTRPC_DMAHANDLE_NOMAP (16)
|
||||
|
||||
#define FASTRPC_ENOSUCH 39
|
||||
#define DEBUGFS_SIZE 3072
|
||||
#define UL_SIZE 25
|
||||
#define PID_SIZE 10
|
||||
|
|
@ -2207,12 +2208,12 @@ static int get_args(uint32_t kernel, struct smq_invoke_ctx *ctx)
|
|||
goto bail;
|
||||
}
|
||||
}
|
||||
ADSPRPC_DEBUG(
|
||||
"copied non ion buffer sc 0x%x pv 0x%llx, mend 0x%llx mstart 0x%llx, len %zu size %zu\n",
|
||||
sc, rpra[i].buf.pv,
|
||||
ctx->overps[oix]->mend,
|
||||
ctx->overps[oix]->mstart,
|
||||
rpra[i].buf.len, map->size);
|
||||
if (len > DEBUG_PRINT_SIZE_LIMIT)
|
||||
ADSPRPC_DEBUG(
|
||||
"copied non ion buffer sc 0x%x pv 0x%llx, mend 0x%llx mstart 0x%llx, len %zu\n",
|
||||
sc, rpra[i].buf.pv,
|
||||
ctx->overps[oix]->mend,
|
||||
ctx->overps[oix]->mstart, len);
|
||||
args = args + mlen;
|
||||
rlen -= mlen;
|
||||
}
|
||||
|
|
@ -2722,7 +2723,7 @@ static int fastrpc_internal_invoke(struct fastrpc_file *fl, uint32_t mode,
|
|||
if (err)
|
||||
goto bail;
|
||||
if (fl->sctx->smmu.faults)
|
||||
err = -EDESTADDRREQ;
|
||||
err = -FASTRPC_ENOSUCH;
|
||||
if (err)
|
||||
goto bail;
|
||||
if (ctx) {
|
||||
|
|
@ -5482,7 +5483,7 @@ static inline int fastrpc_mmap_device_ioctl(struct fastrpc_file *fl,
|
|||
goto bail;
|
||||
break;
|
||||
default:
|
||||
err = -EINVAL;
|
||||
err = -ENOTTY;
|
||||
pr_info("bad ioctl: %d\n", ioctl_num);
|
||||
break;
|
||||
}
|
||||
|
|
@ -5614,7 +5615,7 @@ static long fastrpc_device_ioctl(struct file *file, unsigned int ioctl_num,
|
|||
err = fastrpc_mmap_device_ioctl(fl, ioctl_num, &p, param);
|
||||
break;
|
||||
default:
|
||||
err = -EINVAL;
|
||||
err = -ENOTTY;
|
||||
pr_info("bad ioctl: %d\n", ioctl_num);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -388,7 +388,7 @@ static int compat_get_fastrpc_ioctl_invoke2(
|
|||
break;
|
||||
}
|
||||
default:
|
||||
err = -EBADRQC;
|
||||
err = -ENOTTY;
|
||||
break;
|
||||
}
|
||||
*inva = inv2_user;
|
||||
|
|
@ -987,6 +987,6 @@ long compat_fastrpc_device_ioctl(struct file *filp, unsigned int cmd,
|
|||
case COMPAT_FASTRPC_IOCTL_MUNMAP:
|
||||
return compat_fastrpc_mmap_device_ioctl(filp, cmd, arg);
|
||||
default:
|
||||
return -ENOIOCTLCMD;
|
||||
return -ENOTTY;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -146,6 +146,8 @@ do {\
|
|||
pr_debug("Debug: adsprpc (%d): %s: %s: " fmt, __LINE__,\
|
||||
current->comm, __func__, ##args)
|
||||
|
||||
#define DEBUG_PRINT_SIZE_LIMIT (512*1024)
|
||||
|
||||
#define remote_arg64_t union remote_arg64
|
||||
|
||||
struct remote_buf64 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue