summaryrefslogtreecommitdiffstats
path: root/Documentation/devices.txt
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2016-02-19 15:36:07 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-29 10:11:44 -0700
commit49db08c358873af11ba3c25401de88156fa5d365 (patch)
tree1a2cddaae3f112d0239cc61841efa4b8385985e6 /Documentation/devices.txt
parent00411b7b1e3ec477b75bb83ccd417c7609832db6 (diff)
downloadlinux-49db08c358873af11ba3c25401de88156fa5d365.tar.gz
linux-49db08c358873af11ba3c25401de88156fa5d365.tar.bz2
linux-49db08c358873af11ba3c25401de88156fa5d365.zip
chrdev: emit a warning when we go below dynamic major range
Currently a dynamically allocated character device major is taken from 254 and downward. This mechanism is used for RTC, IIO and a few other subsystems. The kernel currently has no check prevening these dynamic allocations from eating into the assigned numbers at 233 and downward. In a recent test it was reported that so many dynamic device majors were used on a test server, that the major number for infiniband (231) was stolen. This occurred when allocating a new major number for GPIO chips. The error messages from the kernel were not helpful. (See: https://lkml.org/lkml/2016/2/14/124) This patch adds a defined lower limit of the dynamic major allocation region will henceforth emit a warning if we start to eat into the assigned numbers. It does not do any semantic changes and will not change the kernels behaviour: numbers will still continue to be stolen, but we will know from dmesg what is going on. This also updates the Documentation/devices.txt to clearly reflect that we are using this range of major numbers for dynamic allocation. Reported-by: Ying Huang <ying.huang@linux.intel.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Alan Cox <alan@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/devices.txt')
-rw-r--r--Documentation/devices.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/Documentation/devices.txt b/Documentation/devices.txt
index 87b4c5e82d39..0a3588a9798d 100644
--- a/Documentation/devices.txt
+++ b/Documentation/devices.txt
@@ -3099,9 +3099,9 @@ Your cooperation is appreciated.
129 = /dev/ipath_sma Device used by Subnet Management Agent
130 = /dev/ipath_diag Device used by diagnostics programs
-234-239 UNASSIGNED
-
-240-254 char LOCAL/EXPERIMENTAL USE
+234-254 char RESERVED FOR DYNAMIC ASSIGNMENT
+ Character devices that request a dynamic allocation of major number will
+ take numbers starting from 254 and downward.
240-254 block LOCAL/EXPERIMENTAL USE
Allocated for local/experimental use. For devices not