Disable memory allocation in {soe,sdo}_request_write

Because it's not compatible with Xenomai and other atomic contexts.
The memory is preallocated when creating the request in before.
This commit is contained in:
Bjarne von Horn 2024-02-05 16:05:57 +01:00
parent 501903aec7
commit 19b8f672c7
1 changed files with 4 additions and 6 deletions

View File

@ -3593,9 +3593,8 @@ static ATTRIBUTES int ec_ioctl_sdo_request_write(
return -ENOENT;
}
ret = ec_sdo_request_alloc(req, data.size);
if (ret)
return ret;
if (data.size > req->mem_size)
return -ENOMEM;
if (ec_copy_from_user(req->data, (void __user *) data.data,
data.size, ctx))
@ -3843,9 +3842,8 @@ static ATTRIBUTES int ec_ioctl_soe_request_write(
return -ENOENT;
}
ret = ec_soe_request_alloc(req, data.size);
if (ret)
return ret;
if (data.size > req->mem_size)
return -ENOMEM;
if (ec_copy_from_user(req->data, (void __user *) data.data,
data.size, ctx))