mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 14:04:27 -04:00
Merge tag 'optee-fix-for-v7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/jenswi/linux-tee into arm/fixes
Add NULL check in optee_ffa_lend_protmem() * tag 'optee-fix-for-v7.2' of git://git.kernel.org/pub/scm/linux/kernel/git/jenswi/linux-tee: optee: ffa: Add NULL check in optee_ffa_lend_protmem Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
@@ -698,6 +698,9 @@ static int optee_ffa_lend_protmem(struct optee *optee, struct tee_shm *protmem,
|
||||
int rc;
|
||||
|
||||
mem_attr = kzalloc_objs(*mem_attr, ma_count);
|
||||
if (!mem_attr)
|
||||
return -ENOMEM;
|
||||
|
||||
for (n = 0; n < ma_count; n++) {
|
||||
mem_attr[n].receiver = mem_attrs[n] & U16_MAX;
|
||||
mem_attr[n].attrs = mem_attrs[n] >> 16;
|
||||
|
||||
Reference in New Issue
Block a user