]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
binder: use wake_up_pollfree()
authorEric Biggers <ebiggers@google.com>
Fri, 10 Dec 2021 23:53:09 +0000 (15:53 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Dec 2021 09:18:06 +0000 (10:18 +0100)
commit32288f504035b6c359cc33ee615f74f14be2e38a
treed7ceff1bb26a8736a57a053498308e084285682a
parent8dd7c46a59756bdc29cb9783338b899cd3fb4b83
binder: use wake_up_pollfree()

commit a880b28a71e39013e357fd3adccd1d8a31bc69a8 upstream.

wake_up_poll() uses nr_exclusive=1, so it's not guaranteed to wake up
all exclusive waiters.  Yet, POLLFREE *must* wake up all waiters.  epoll
and aio poll are fortunately not affected by this, but it's very
fragile.  Thus, the new function wake_up_pollfree() has been introduced.

Convert binder to use wake_up_pollfree().

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Fixes: f5cb779ba163 ("ANDROID: binder: remove waitqueue when thread exits.")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20211209010455.42744-3-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/android/binder.c