[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8d87655f-27c6-6a66-6eb0-9244279fbf2c@linux.microsoft.com>
Date: Mon, 22 Feb 2021 18:15:08 +0530
From: Allen Pais <apais@...ux.microsoft.com>
To: Dhananjay Phadke <dphadke@...ux.microsoft.com>,
allen.lkml@...il.com, jens.wiklander@...aro.org, zajec5@...il.com
Cc: linux-kernel@...r.kernel.org, linux-mips@...r.kernel.org,
op-tee@...ts.trustedfirmware.org,
linux-arm-kernel@...ts.infradead.org,
bcm-kernel-feedback-list@...adcom.com
Subject: Re: [PATCH 1/2] optee: fix tee out of memory failure seen during
kexec reboot
> On Wed, 17 Feb 2021 14:57:12 +0530, Allen Pais wrote:
>> - /*
>> - * Ask OP-TEE to free all cached shared memory objects to decrease
>> - * reference counters and also avoid wild pointers in secure world
>> - * into the old shared memory range.
>> - */
>> - optee_disable_shm_cache(optee);
>> + if (shutdown) {
>> + optee_disable_shm_cache(optee);
>> + } else {
>> + /*
>> + * Ask OP-TEE to free all cached shared memory
>> + * objects to decrease reference counters and
>> + * also avoid wild pointers in secure world
>> + * into the old shared memory range.
>> + */
>> + optee_disable_shm_cache(optee);
>
> Calling optee_disable_shm_cache() in both if and else. It could be
> put in front of if().
>
Ideally, I could just use optee_remove for shutdown() too.
But it would not look good. Hence this approach.
- Allen
Powered by blists - more mailing lists