lkml.org 
[lkml]   [2021]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH v1 0/1] binder: fix freeze race
Date
From: Li Li <dualli@google.com>

As there isn't an atomic operation to freeze the main thread and binder
interface together, it's possible the main thread initiates a new binder
transaction while the binder interfaces are already frozen. This race issue
will result in failed binder transaction and unexpectedly crash the app.

This patch allows a post-froze rollback mechanism by checking if there's
any new pending binder transaction waiting for response. At the same time,
it treats the response transaction like an oneway transaction so that the
response can successfully reach the frozen process.

Li Li (1):
binder: fix freeze race

drivers/android/binder.c | 32 +++++++++++++++++++++++++++----
drivers/android/binder_internal.h | 2 ++
2 files changed, 30 insertions(+), 4 deletions(-)

--
2.33.0.309.g3052b89438-goog

\
 
 \ /
  Last update: 2021-09-10 01:22    [W:0.059 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site