Thread (10 messages) 10 messages, 4 authors, 2021-02-24

Re: [PATCH 1/2] optee: fix tee out of memory failure seen during kexec reboot

flat view

From: Jens Wiklander <hidden>
Date: 2021-02-23 08:20:59
Also in: linux-arm-kernel, lkml, op-tee

On Mon, Feb 22, 2021 at 06:15:08PM +0530, Allen Pais wrote:
quoted
On Wed, 17 Feb 2021 14:57:12 +0530, Allen Pais wrote:
quoted
-	/*
-	 * 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.
What is the problem with using optee_remove() for shutdown()?

Cheers,
Jens
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help