Merge "qcom: smcinvoke: Fix stack overflow for arr_filp"
This commit is contained in:
commit
44607545fc
1 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2016-2017,2019 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
|
@ -302,7 +302,7 @@ static int marshal_in(const struct smcinvoke_cmd_req *req,
|
|||
const union smcinvoke_arg *args_buf, uint32_t tzhandle,
|
||||
uint8_t *buf, size_t buf_size, struct file **arr_filp)
|
||||
{
|
||||
int ret = -EINVAL, i = 0;
|
||||
int ret = -EINVAL, i = 0, j = 0;
|
||||
union smcinvoke_tz_args *tz_args = NULL;
|
||||
struct smcinvoke_msg_hdr msg_hdr = {tzhandle, req->op, req->counts};
|
||||
uint32_t offset = sizeof(struct smcinvoke_msg_hdr) +
|
||||
|
@ -347,7 +347,7 @@ static int marshal_in(const struct smcinvoke_cmd_req *req,
|
|||
}
|
||||
FOR_ARGS(i, req->counts, OI) {
|
||||
if (get_tzhandle_from_fd(args_buf[i].o.fd,
|
||||
&arr_filp[i], &(tz_args->tzhandle)))
|
||||
&arr_filp[j++], &(tz_args->tzhandle)))
|
||||
goto out;
|
||||
tz_args++;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue