binderfs: reserve devices for initial mount
authorChristian Brauner <christian@brauner.io>
Fri, 11 Jan 2019 10:19:40 +0000 (11:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Jan 2019 12:42:15 +0000 (13:42 +0100)
commit36bdf3cae09df891b191f3955c8e54a2e05d67d0
tree0bbdd8f9aad41f102f8a1d6941c97c2bbe2215d4
parentc13295ad219d8bb0e47942d4cfc8251de449a67e
binderfs: reserve devices for initial mount

The binderfs instance in the initial ipc namespace will always have a
reserve of 4 binder devices unless explicitly capped by specifying a lower
value via the "max" mount option.
This ensures when binder devices are removed (on accident or on purpose)
they can always be recreated without risking that all minor numbers have
already been used up.

Cc: Todd Kjos <tkjos@google.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/android/binderfs.c