binderfs: use __u32 for device numbers

This change “binderfs: use __u32 for device numbers” in Linux kernel is authored by Christian Brauner <christian [at]> on Mon Jan 21 12:01:20 2019 +0100.

binderfs: use __u32 for device numbers

We allow more then 255 binderfs binder devices to be created since there
are workloads that require more than that. If we use __u8 we'll overflow
after 255. So let's use a __u32.
Note that there's no released kernel with binderfs out there so this is
not a regression.

Signed-off-by: Christian Brauner <>
Signed-off-by: Greg Kroah-Hartman <>

This Linux change may have been applied to various maintained Linux releases and you can find Linux releases including commit 7d01740.

There are 4 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 include/uapi/linux/android/binderfs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/uapi/linux/android/binderfs.h b/include/uapi/linux/android/binderfs.h
index b41628b..8741047 100644
--- a/include/uapi/linux/android/binderfs.h
+++ b/include/uapi/linux/android/binderfs.h
@@ -22,8 +22,8 @@
 struct binderfs_device {
 	char name[BINDERFS_MAX_NAME + 1];
-	__u8 major;
-	__u8 minor;
+	__u32 major;
+	__u32 minor;

The commit for this change in Linux stable tree is 7d01740 (patch).

Leave a Reply

Your email address will not be published. Required fields are marked *