ANDROID: GKI: fix up abi breakage in struct pipe_inode_info

In commit e6acf868ff ("pipe: make poll_usage boolean and annotate its
access") a field was changed from 'unsigned int' to 'bool' in struct
pipe_inode_info when it was determinied that the kernel was only
checking true/false for it.  This breaks the internal abi so put the
type back, while still keeping the original change that resolved a race
condition.

Bug: 161946584
Fixes: e6acf868ff ("pipe: make poll_usage boolean and annotate its access")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If5ebc17e4a198801e49257abef0f5e2ead94e668
This commit is contained in:
Greg Kroah-Hartman
2022-08-02 12:04:18 +02:00
parent 89405fc691
commit 6ebdc9fb8c
2 changed files with 2 additions and 2 deletions

View File

@@ -652,7 +652,7 @@ pipe_poll(struct file *filp, poll_table *wait)
unsigned int head, tail; unsigned int head, tail;
/* Epoll has some historical nasty semantics, this enables them */ /* Epoll has some historical nasty semantics, this enables them */
WRITE_ONCE(pipe->poll_usage, true); WRITE_ONCE(pipe->poll_usage, 1);
/* /*
* Reading pipe state only -- no need for acquiring the semaphore. * Reading pipe state only -- no need for acquiring the semaphore.

View File

@@ -71,7 +71,7 @@ struct pipe_inode_info {
unsigned int files; unsigned int files;
unsigned int r_counter; unsigned int r_counter;
unsigned int w_counter; unsigned int w_counter;
bool poll_usage; unsigned int poll_usage;
struct page *tmp_page; struct page *tmp_page;
struct fasync_struct *fasync_readers; struct fasync_struct *fasync_readers;
struct fasync_struct *fasync_writers; struct fasync_struct *fasync_writers;