]> git.hungrycats.org Git - linux/commit
binder: allow freeze notification for dead nodes
authorCarlos Llamas <cmllamas@google.com>
Thu, 26 Sep 2024 23:36:17 +0000 (23:36 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Dec 2024 09:41:11 +0000 (10:41 +0100)
commitf3cf682d3a97815e9a702066ed4e4bf9cddad0aa
tree9f33f97e535a11c0a78ab209c57416f7169b5647
parent648c92b1a89885846086a8ba8ac3422684142ad4
binder: allow freeze notification for dead nodes

commit ca63c66935b978441055e3d87d30225267f99329 upstream.

Alice points out that binder_request_freeze_notification() should not
return EINVAL when the relevant node is dead [1]. The node can die at
any point even if the user input is valid. Instead, allow the request
to be allocated but skip the initial notification for dead nodes. This
avoids propagating unnecessary errors back to userspace.

Fixes: d579b04a52a1 ("binder: frozen notification")
Cc: stable@vger.kernel.org
Suggested-by: Alice Ryhl <aliceryhl@google.com>
Link: https://lore.kernel.org/all/CAH5fLghapZJ4PbbkC8V5A6Zay-_sgTzwVpwqk6RWWUNKKyJC_Q@mail.gmail.com/
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Acked-by: Todd Kjos <tkjos@google.com>
Link: https://lore.kernel.org/r/20240926233632.821189-7-cmllamas@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/android/binder.c