From 6ebdc9fb8cba013fc98c06b8e3ee76af20908efc Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 2 Aug 2022 12:04:18 +0200 Subject: [PATCH] ANDROID: GKI: fix up abi breakage in struct pipe_inode_info In commit e6acf868ff0e ("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: e6acf868ff0e ("pipe: make poll_usage boolean and annotate its access") Signed-off-by: Greg Kroah-Hartman Change-Id: If5ebc17e4a198801e49257abef0f5e2ead94e668 --- fs/pipe.c | 2 +- include/linux/pipe_fs_i.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/pipe.c b/fs/pipe.c index e08f0fe55584..671d7569dd65 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -652,7 +652,7 @@ pipe_poll(struct file *filp, poll_table *wait) unsigned int head, tail; /* 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. diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index c0b6ec6bf65b..fc5642431b92 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h @@ -71,7 +71,7 @@ struct pipe_inode_info { unsigned int files; unsigned int r_counter; unsigned int w_counter; - bool poll_usage; + unsigned int poll_usage; struct page *tmp_page; struct fasync_struct *fasync_readers; struct fasync_struct *fasync_writers;