Commit 2e627b6
committed
binder: use wake_up_pollfree()
jira VULN-63551
cve-pre CVE-2021-47505
commit-author Eric Biggers <ebiggers@google.com>
commit a880b28
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: f5cb779 ("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>
(cherry picked from commit a880b28)
Signed-off-by: Brett Mastbergen <bmastbergen@ciq.com>1 parent acf21dc commit 2e627b6
1 file changed
+9
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4420 | 4420 | | |
4421 | 4421 | | |
4422 | 4422 | | |
4423 | | - | |
4424 | | - | |
4425 | | - | |
4426 | | - | |
| 4423 | + | |
| 4424 | + | |
4427 | 4425 | | |
4428 | | - | |
4429 | | - | |
4430 | | - | |
4431 | | - | |
| 4426 | + | |
| 4427 | + | |
4432 | 4428 | | |
4433 | 4429 | | |
4434 | 4430 | | |
4435 | 4431 | | |
4436 | | - | |
4437 | | - | |
4438 | | - | |
4439 | | - | |
| 4432 | + | |
| 4433 | + | |
| 4434 | + | |
| 4435 | + | |
| 4436 | + | |
4440 | 4437 | | |
4441 | 4438 | | |
4442 | 4439 | | |
| |||
0 commit comments