diff options
Diffstat (limited to 'drivers/sbus/char')
-rw-r--r-- | drivers/sbus/char/Kconfig | 3 | ||||
-rw-r--r-- | drivers/sbus/char/oradax.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/sbus/char/Kconfig b/drivers/sbus/char/Kconfig index a785aa7660c3..bf3c5f735614 100644 --- a/drivers/sbus/char/Kconfig +++ b/drivers/sbus/char/Kconfig @@ -72,7 +72,8 @@ config DISPLAY7SEG config ORACLE_DAX tristate "Oracle Data Analytics Accelerator" - default m if SPARC64 + depends on SPARC64 + default m help Driver for Oracle Data Analytics Accelerator, which is a coprocessor that performs database operations in hardware. diff --git a/drivers/sbus/char/oradax.c b/drivers/sbus/char/oradax.c index 03dc04739225..c44d7c7ffc92 100644 --- a/drivers/sbus/char/oradax.c +++ b/drivers/sbus/char/oradax.c @@ -880,7 +880,7 @@ static int dax_ccb_exec(struct dax_ctx *ctx, const char __user *buf, dax_dbg("args: ccb_buf_len=%ld, idx=%d", count, idx); /* for given index and length, verify ca_buf range exists */ - if (idx + nccbs >= DAX_CA_ELEMS) { + if (idx < 0 || idx > (DAX_CA_ELEMS - nccbs)) { ctx->result.exec.status = DAX_SUBMIT_ERR_NO_CA_AVAIL; return 0; } |