BACKPORT: binder: Set end of SG buffer area properly.
authorMartijn Coenen <maco@android.com>
Tue, 9 Jul 2019 11:09:23 +0000 (13:09 +0200)
committerDanny Wood <danwood76@gmail.com>
Fri, 8 Nov 2019 12:03:13 +0000 (12:03 +0000)
commit5e1baad7aaf461546dc53d790133e205a4c0535d
treee4f4e913d19f73bd22f27a1f3ca559bff1118d36
parent793653c82e1f9a536a1ff3e73f7b2f2c5526f368
BACKPORT: binder: Set end of SG buffer area properly.

In case the target node requests a security context, the
extra_buffers_size is increased with the size of the security context.
But, that size is not available for use by regular scatter-gather
buffers; make sure the ending of that buffer is marked correctly.

Bug: 136210786
Acked-by: Todd Kjos <tkjos@google.com>
Fixes: ec74136ded79 ("binder: create node flag to request sender's security context")
Signed-off-by: Martijn Coenen <maco@android.com>
Cc: stable@vger.kernel.org # 5.1+
Link: https://lore.kernel.org/r/20190709110923.220736-1-maco@android.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit a56587065094fd96eb4c2b5ad65571daad32156d)
Change-Id: Ib4d3a99e7a881992c1313169f902cfad02a508a6
drivers/android/binder.c